Hi
I have a cover that just works on a single pulse from a contact.
I’m trying to make a template where the stop button only reacts after the binary_sensor has changed in the last 20 seconds. This means that the cover is still moving and I can be stopped… but the stop button isn’t working…
(if it’s longer then I wil close/open it again when I use switch.turn_on
kelderpoort_sensor:
friendly_name: "Kelderpoort"
unique_id: kelderpoort_sensor
value_template: "{{ is_state('binary_sensor.poort_kelder', 'on') }}"
open_cover:
- condition: state
entity_id: binary_sensor.poort_kelder
state: "off"
- action: switch.turn_on
target:
entity_id: switch.kelder_poort
close_cover:
- condition: state
entity_id: binary_sensor.poort_kelder
state: "on"
- action: switch.turn_on
target:
entity_id: switch.kelder_poort
stop_cover:
- condition: state
entity_id: binary_sensor.poort_kelder
state: "{{ now() - timedelta(seconds = 20) < states.binary_sensor.poort_kelder.last_updated }}"
- action: switch.turn_on
target:
entity_id: switch.kelder_poort