From ebe8c12c3245652aa22127fb7eb0d0b59a6c4862 Mon Sep 17 00:00:00 2001 From: Marius <33354141+Mariusthvdb@users.noreply.github.com> Date: Sat, 21 Sep 2019 17:24:41 +0200 Subject: [PATCH] correct templating example (#10402) Current example shows the same preferred template twice, without the template that would be the one to substitute.... --- source/_components/light.template.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/light.template.markdown b/source/_components/light.template.markdown index d7a564f0a21..f375aa0f1c9 100644 --- a/source/_components/light.template.markdown +++ b/source/_components/light.template.markdown @@ -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. 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 %}