home-assistant-configuration/sensors/smartthings.yaml

18 lines
701 B
YAML
Raw Normal View History

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-18 14:59:15 +00:00
icon_template: '{%- if is_state("cover.garage_door", "closed") %}mdi:garage{%- elif is_state("cover.garage_door", "open") %}mdi:garage-open{% else %}mdi:sync-alert{%- endif %}'