I have a garage opener that requires a short ‘press’ to activate it.
My current ESPHome config I always felt was a bit of a hack. How do I convert this into a ‘Button’?
switch:
- platform: gpio
pin: GPIO4
name: "Garage Door 1 Relay"
id: relay
restore_mode: ALWAYS_OFF
internal: true
- platform: template
name: "Garage Door 1"
icon: "mdi:gate"
turn_on_action:
- switch.turn_on: relay
- delay: 500ms
- switch.turn_off: relay
Do I need the 2 parts?