I recently installed a zigbee garage door opener, its giving me a sensor and a toggle. The toggle doesn’t reflect the actual position of the door. I have a template sensor for a similar situation to simultaneously show the state and be able to control it in the UI for my TV. However, the garage door takes a long time to open, is there a way to set a delay for the toggle to update based on the sensor?
switch:
- platform: template
switches:
living_room_tv:
value_template: "{{ is_state('binary_sensor.living_room_tv_power_state', 'on') }}"
turn_on:
service: script.turn_on
target:
entity_id: script.living_room_power
turn_off:
service: script.turn_on
target:
entity_id: script.living_room_power
icon_template: >-
{% if is_state('binary_sensor.living_room_tv_power_state', 'on') %}
mdi:television-classic
{% else %}
mdi:television-classic-off
{% endif %}