Momentary switch GPIO

Hi,

I want to open/close my front gate wit HA directly with the RPi GPIO. My gate only has only 1 input. When you send a impuls, it opens. If you send it again, it closes.
I only see a switch component for GPIO, but I need a momentary switch. I could create a automation which turns off the switch right after it was turned on, but maybe someone knows a better approach?

Thanks!

you are probably going to want to use a script. With a script you can call the turn on service, then wait a second then call the turn off service.