correct templating example (#10402)

Current example shows the same preferred template twice, without the template that would be the one to substitute....
This commit is contained in:
Marius 2019-09-21 17:24:41 +02:00 committed by Franck Nijhof
parent ce854badb9
commit ebe8c12c32

View File

@ -86,7 +86,7 @@ Template Light may get an `unknown` state during startup. This results
in error messages in your log file until that platform has completed loading. 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. If you use `is_state()` function in your template, you can avoid this situation.
For example, you would replace 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 with this equivalent that returns `true`/`false` and never gives an unknown
result: result:
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %} {% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}