diff --git a/atom.xml b/atom.xml index 2666bd2abd..d3bb23b726 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
The template
platform creates switches that combine components.
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.
-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:
# Example configuration.yaml entry
switch:
@@ -105,8 +105,8 @@
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 ‘{{ states.switch.source.state }}’ with this equivalent that returns true/false and never gives an unknown result:
-‘{{ is_state(‘switch.source’, ‘on’) }}’
+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 {{ states.switch.source.state }}
with this equivalent that returns true/false and never gives an unknown result:
+{{ is_state('switch.source', 'on') }}
Examples
In this section you find some real life examples of how to use this switch.
Copy switch
diff --git a/sitemap.xml b/sitemap.xml
index 409943fd8f..a6b790c4e2 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -3884,62 +3884,62 @@
https://home-assistant.io/demo/frontend.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/index.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00
https://home-assistant.io/static/mdi-demo.html
-2017-08-20T15:24:29+00:00
+2017-08-20T18:49:35+00:00