Documentation additions (#3654)

This commit is contained in:
Aaron Bach 2017-10-30 10:28:35 -06:00 committed by Paulus Schoutsen
parent 0582ebc39e
commit 257dea75e6
4 changed files with 212 additions and 0 deletions

View file

@ -186,3 +186,31 @@ switch:
{% endif %}
```
{% endraw %}
### {% linkable_title Change The Entity Picture %}
This example shows how to change the entity picture based on the day/night cycle.
{% raw %}
```yaml
switch:
- platform: template
switches:
garage:
value_template: "{{ is_state('cover.garage_door', 'on') }}"
turn_on:
service: cover.open_cover
data:
entity_id: cover.garage_door
turn_off:
service: cover.close_cover
data:
entity_id: cover.garage_door
entity_picture_template: >-
{% if is_state('cover.garage_door', 'open') %}
/local/garage-open.png
{% else %}
/local/garage-closed.png
{% endif %}
```
{% endraw %}