2017-04-09 02:43:06 +00:00
|
|
|
- platform: template
|
|
|
|
sensors:
|
|
|
|
garage_door:
|
2017-04-09 02:52:33 +00:00
|
|
|
unit_of_measurement: ''
|
2017-04-09 02:43:06 +00:00
|
|
|
value_template: >-
|
2017-04-09 02:50:01 +00:00
|
|
|
{%- if is_state("cover.garage_door", "open") %}
|
|
|
|
Open
|
|
|
|
{% elif is_state("cover.garage_door", "opening") %}
|
|
|
|
Opening
|
|
|
|
{% elif is_state("cover.garage_door", "closed") %}
|
|
|
|
Closed
|
|
|
|
{% elif is_state("cover.garage_door", "closing") %}
|
|
|
|
Closing
|
|
|
|
{% else %}
|
|
|
|
Unknown
|
|
|
|
{%- endif %}
|
2017-04-17 15:24:22 +00:00
|
|
|
icon_template: '{%- if is_state("sensor.garage_door", "unknown") %}mdi:sync-alert{%- elif is_state("cover.garage_door", "open") %}mdi:garage-open{% else %}mdi:garage{%- endif %}'
|