HC-SR04 Ultrasonic Sensor
The HC‑SR04 ultrasonic sensor is the goofy-looking part of my garage door opener, but it worked surprisingly well. I used it to measure distance to the door and then turned that into an open/closed state in ESPHome with a little logic.
You'll be taken to Amazon to complete your purchase.