diff --git a/sensors/smartthings.yaml b/sensors/smartthings.yaml index 822564c..e84da5a 100644 --- a/sensors/smartthings.yaml +++ b/sensors/smartthings.yaml @@ -1,6 +1,10 @@ -- platform: mqtt - name: "Garage Door" - state_topic: "smartthings/Garage Door/contact" - qos: 0 - unit_of_measurement: "" - value_template: '{{ value.x }}' +- platform: template + sensors: + garage_door: + unit_of_measurement: '%' + value_template: >- + {%- if states.cover.garage_door } + {{ states.cover.garage_door }} + {% else %} + {{ states.sensor.garage_door.state }} + {%- endif %}