Skip to content

Commit 0a23a4b

Browse files
committed
Remove line breaks
1 parent 9c2f516 commit 0a23a4b

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

source/_components/switch.template.markdown

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,13 @@ logo: home-assistant.png
1515

1616
The `template` platform creates switches that combines components.
1717

18-
For example, if you have a garage door with a toggle switch that operates the
19-
motor and a sensor that allows you know whether the door is open or closed,
20-
you can combine these into a switch that knows whether the garage door is open
21-
or closed.
18+
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.
2219

23-
This can simplify the GUI and make it easier to write automations. You can mark
24-
the components you have combined as `hidden` so they don't appear themselves.
20+
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.
2521

26-
To enable Template Switches in your installation, add the following to your
27-
`configuration.yaml` file:
22+
## {% linkable_title Configuration %}
23+
24+
To enable Template Switches in your installation, add the following to your `configuration.yaml` file:
2825

2926
{% raw %}
3027
```yaml
@@ -83,15 +80,7 @@ switch:
8380
8481
## {% linkable_title Considerations %}
8582
86-
If you are using the state of a platform that takes extra time to load, the
87-
Template Switch may get an `unknown` state during startup. This results
88-
in error messages in your log file until that platform has completed loading.
89-
If you use `is_state()` function in your template, you can avoid this situation.
90-
For example, you would replace
91-
{% raw %}`{{ states.switch.source.state == 'on' }}`{% endraw %}
92-
with this equivalent that returns `true`/`false` and never gives an unknown
93-
result:
94-
{% raw %}`{{ is_state('switch.source', 'on') }}`{% endraw %}
83+
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 %}
9584

9685
## {% linkable_title Examples %}
9786

@@ -121,8 +110,7 @@ switch:
121110

122111
### {% linkable_title Toggle Switch %}
123112

124-
This example shows a switch that takes its state from a sensor, and toggles
125-
a switch.
113+
This example shows a switch that takes its state from a sensor and toggles a switch.
126114

127115
{% raw %}
128116
```yaml

0 commit comments

Comments
 (0)