Tweaking garage door sensor

This commit is contained in:
Jeffrey Stone 2017-04-08 22:43:06 -04:00
parent c44c8e9d6f
commit f951d48906
1 changed files with 10 additions and 6 deletions

View File

@ -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 %}