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 %}