Hi:
in a simple auto switch off relay output how could I make it only once run the switch-on?
I mean: in this example I have a switch on HA dashboard, when I select the slider it turn on and after 500 ms turn off automatically. BUT if I switch on and off twice in 0,5 sec it STAY on until I made another click… Thanks in advance.
- platform: gpio
pin: GPIO22
id: outRELAY
- platform: template
name: "Open X"
icon: "mdi:gate"
turn_on_action:
- switch.turn_on: outRELAY
- delay: 500ms
- switch.turn_off: outRELAY