mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Update binary_sensor.template.markdown (#10007)
The example was corrected, but is now wrong, so I have made it wrong again, which is now correct
This commit is contained in:
parent
18501783b3
commit
6953727b94
@ -85,7 +85,7 @@ Template Binary Sensor may get an `unknown` state during startup. This results
|
||||
in error messages in your log file until that platform has completed loading.
|
||||
If you use `is_state()` function in your template, you can avoid this situation.
|
||||
For example, you would replace
|
||||
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}
|
||||
{% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %}
|
||||
with this equivalent that returns `true`/`false` and never gives an unknown
|
||||
result:
|
||||
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user