From fc8c1b1938038cf5e1019f2b3b2cd7ce0b8a4584 Mon Sep 17 00:00:00 2001 From: tomlut <10679300+tomlut@users.noreply.github.com> Date: Wed, 17 Jul 2019 17:44:05 +1000 Subject: [PATCH] Corected template example (#9875) The two templates under 'Considerations were identical'. --- source/_components/switch.template.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/switch.template.markdown b/source/_components/switch.template.markdown index ec083f7a53b..d98e57f85eb 100644 --- a/source/_components/switch.template.markdown +++ b/source/_components/switch.template.markdown @@ -76,7 +76,7 @@ switch: ## Considerations -If you are using the state of a platform that takes extra time to load, the Template Switch 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 %} with this equivalent that returns `true`/`false` and never gives an unknown result: {% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %} +If you are using the state of a platform that takes extra time to load, the Template Switch 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 %}`{{ 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 %} ## Examples