From 0a23a4b77cdded1e5ecbec112ab2e9715b694572 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 25 May 2018 15:07:26 +0200 Subject: [PATCH] Remove line breaks --- source/_components/switch.template.markdown | 26 ++++++--------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/source/_components/switch.template.markdown b/source/_components/switch.template.markdown index cfcb54d0929..6e968992407 100644 --- a/source/_components/switch.template.markdown +++ b/source/_components/switch.template.markdown @@ -15,16 +15,13 @@ logo: home-assistant.png The `template` platform creates switches that combines components. -For example, if you have a garage door with a toggle switch that operates the -motor and a sensor that allows you know whether the door is open or closed, -you can combine these into a switch that knows whether the garage door is open -or closed. +For example, if you have a garage door with a toggle switch that operates the motor and a sensor that allows you know whether the door is open or closed, you can combine these into a switch that knows whether the garage door is open or closed. -This can simplify the GUI and make it easier to write automations. You can mark -the components you have combined as `hidden` so they don't appear themselves. +This can simplify the GUI and make it easier to write automations. You can mark the components you have combined as `hidden` so they don't appear themselves. -To enable Template Switches in your installation, add the following to your -`configuration.yaml` file: +## {% linkable_title Configuration %} + +To enable Template Switches in your installation, add the following to your `configuration.yaml` file: {% raw %} ```yaml @@ -83,15 +80,7 @@ switch: ## {% linkable_title 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 %}`{{ 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 %} +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 %} ## {% linkable_title Examples %} @@ -121,8 +110,7 @@ switch: ### {% linkable_title Toggle Switch %} -This example shows a switch that takes its state from a sensor, and toggles -a switch. +This example shows a switch that takes its state from a sensor and toggles a switch. {% raw %} ```yaml