Zigbee Solution for Detecting Closed Circuit (Arlo Doorbell Press)

Esphome would be a lot easier, but the door sensor from Xiaomi Xiaomi MCCGQ01LM control via MQTT | Zigbee2MQTT can be used for this.

There is a long thread here somewhere. Found it. Portable rain drop sensor made with Xiaomi door sensor