Garage Door Automation Help

Like every home automation project i normally bite off more than i can chew. The garage door automation project is no exception. I have an Ecolink tilt sensor and a GoControl FS20z-1 both installed without issue and recognized on HA. The issue is that the relay is recognized as a switch and shuts off power to the unit when the button is pressed. I have read in several other places that i need to change the switch type to a momentary switch to return to the original state but i am clueless on how to do it. Suggestion?

afaik HA doesnt yet support momentary switches,

I have a few things (also doors…) that require momentary, so what I have is a bit messy but works.

An automation that

When SWITCH.DOOR changes to ON
turn SWITCH.DOOR to OFF

This way as soon as you turn on the switch, it turns off.

You could also try a script that turns it on, waits 1 second, then turns it off.

But if it has not completed turning to on and updating its state, it might get stuck in ON so I use both a script and the automation above.

The script gives you a nice little ‘ACTIVATE’ button instead of the on / off toggle.

A script, as mentioned above, will do the trick. I use a script to simulate a keypress through GPIO to a relay hat for my garage opener, works a treat.

garage_door:
alias: Garage Door
sequence:
- service: switch.turn_on
entity_id: switch.gpio21
- delay:
seconds: 0.5
- service: switch.turn_off
entity_id: switch.gpio21

I did this with a script.

From automation.yaml:

################################
### garage door momentary switch
################################
- alias: Garage Door Reset
  hide_entity: True
  trigger:
    - platform: time
      seconds: '/4'
  condition:
    condition: state
    entity_id: switch.garageswitch_switch
    state: "on"
  action:
    service: switch.turn_off
    entity_id: switch.garageswitch_switch

from configuration.yaml:

### Garage door opener
  garage_door:
    alias: Garage Door
    sequence:
      - event: LOGBOOK_ENTRY
        event_data:
          name: EVENT
          message: "Garage door opener clicked."
      - service: switch.turn_on
        data:
          entity_id: switch.garageswitch_switch

I hate to be such a Noobian… The top script would be inserted & modified in the automation.yaml & the lower is placed in the configuration.yaml, correct? Is the configuration.yaml missing something as things are getting mucked up as written. Like i said total noob. Any advice would be appreciated.

That is correct. I looked back over my configuration and did not see anything. The part from the configuration.yaml goes under Scripts: