Shelley relay to open gate

Hello,

I have successfully setup a Shelley plus one to open my gate. I haven’t flashed the Shelley at all and I managed to add it to my home assistant as a switch. The problem I have is to open the gate I need to turn on and off the switch for the gate to open. Is there any way I can change this in home assistant so that when I toggle the switch (or even have it as a button) it opens the gate. For this it would need to toggle the relay open and then close so that the gate opens.

Many thanks

Did you figure this out yet? If not, I’m not exactly sure what you’re asking. I think maybe you want some way to have a button in the UI that, when pressed, causes the switch to turn on and then back off. If so, create a script that does this, maybe with a small delay. E.g.:

script:
  open_gate:
    sequence:
      - service: switch.turn_on
        entity_id: switch.XXX
      - delay: 1
      - service: switch.turn_off
        entity_id: switch.XXX

Replace “switch.XXX” with the actual entity ID of the Shelley switch.

Then, add a button to the UI whose tap action is calling that script. E.g.:

type: button
name: Open Gate
tap_action:
  action: call-service
  service: script.open_gate