From d1e6b18ab91c9feacbe9f30785d4cbce59c68b54 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 8 Apr 2017 22:50:01 -0400 Subject: [PATCH] Tweaking garage door sensor --- sensors/smartthings.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sensors/smartthings.yaml b/sensors/smartthings.yaml index e84da5a..7b5849f 100644 --- a/sensors/smartthings.yaml +++ b/sensors/smartthings.yaml @@ -3,8 +3,14 @@ garage_door: unit_of_measurement: '%' value_template: >- - {%- if states.cover.garage_door } - {{ states.cover.garage_door }} - {% else %} - {{ states.sensor.garage_door.state }} - {%- endif %} + {%- 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 %}