ESP home - button

Hello,
I am currently rewriting my awning control, it has been running on an ESP8266 with 2 relays and ESPHome for a long time.

What the woman’s wish is would be a button.
As long as she presses the button, the awning extends, if she goes down, she stays put.

How can you realize something like that?

  • Press software button Relay1 closes
  • Release software button Relay1 opens

But how?

Thank you for your help!
Gerald

Assuming the button would be connected to a GPIO, you could use ESPHome’s binary sensor automation, specifically on_press and on_release triggers.

on_press is triggered when the button is first pressed down (Relay1 closes). on_release is triggered when button press ends (Relay1 opens).

ESPHome Automations page has a lot of examples.