SONOFF DW2 433MHz RF Wireless Door Window Sensor Works with RF Bridge R2 Gateway

The light is triggered when there is motion. You can set up linkage in the smart scene of the eWeLink app to connect sensors and lights, so that you can open the door to trigger the opening and closing of the corridor lights.

eBay