From 6953727b9485129d818dc60018a95ad620719bbd Mon Sep 17 00:00:00 2001 From: James Date: Wed, 31 Jul 2019 09:11:59 +0100 Subject: [PATCH] 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 --- source/_components/binary_sensor.template.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/binary_sensor.template.markdown b/source/_components/binary_sensor.template.markdown index d57dd513cdf..3eff2ecfb53 100644 --- a/source/_components/binary_sensor.template.markdown +++ b/source/_components/binary_sensor.template.markdown @@ -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 %}