mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-28 11:47:00 +00:00
Correct the example (#10362)
This commit is contained in:
parent
f8bc70f450
commit
6600466d45
@ -79,7 +79,7 @@ sensor:
|
||||
|
||||
### Startup
|
||||
|
||||
If you are using the state of a platform that takes extra time to load, the Template Sensor may get an `unknown` state during startup. To avoid this (and the resulting error messages in your log file), you can use `is_state()` function in your template. For example, you would replace {% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %} with this equivalent that returns `true`/`false` and never gives an `unknown` result:
|
||||
If you are using the state of a platform that takes extra time to load, the Template Sensor may get an `unknown` state during startup. To avoid this (and the resulting error messages in your log file), you can use `is_state()` function in your template. For example, you would replace {% raw %}`{{ states.cover.source.state == 'open' }}`{% 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