Is it possible with ESPHome/ESP32 to have e.g. a window reed sensor (the type of sensor is not that important) on a GPIO pin where the state is continuously read but then also use the same GPIO pin as a wakeup_pin to wakeup the ESP32 from deep sleep.
The idea is to have the ESP32 deep sleep most of the time, but then wakeup when a window is opened.
When I try it I get a compile error about using the same pin multiple times.
My solution (which I have not confirmed fully yet) is to use two different GPIO pins but then connect them to the same wire of the window reed sensor. I then use one of the GPIO pins to read the state of the window reed sensor and the other GPIO pin as a wakeup_pin.
But this seems wasteful (and I am not even sure if it will work electronically), so does anybody know what the correct way to wire and configure this is?
Later I will have more sensors waking up the ESP32 (e.g. several window reed sensors, a leak sensor, PIR sensor etc), so if I have to use two GPIO pins each time I will run out more quickly.