I would like to further automate my garage door in the following way:
the garage door should close if the cars headlights (full/high beam) are turned on three times within 2 sec when the car left the garage. A light sensor is therefore installed at the garage wall.
Then a sensor should be turned on (and off again after i.e. 30 sec) - home assistant then can do the rest.
So the problem is how to detect three (or whatever number) consecutive high/low-transitions on an gpis.
Can anybody help me how to configure this in ESPHome?
Thank you in advance.
Walter