Switch toggle on/off

I have a couple of switches that I created in a esp32. I want them to go on then off for a 1/2 second. Basically I need it to operate much like a momentary button for a garage door. Where can I find a way to do this? Is it done within the esp32 yml?

Thanks

Assuming you are using ESPHome, there is an example here: GPIO Switch — ESPHome

Thanks Tom, that was exactly what I was wanting. I need to spend more time at ESPHome. :))

Ed

Tip: in future when posting about ESPHome use the forum ESPHome category :+1:

Gotcha
Thanks again