doorsensor

noun
UK /ˈdɔːˌsɛnsə/
US /ˈdɔːrˌsɛnsər/

A small device that tells you when a door opens or closes.

The door sensor beeped when I opened the back door.


OTHER MEANINGS

2. A part in a car that notices when a door is not shut.

The car's door sensor warned us that a door was open.

3. A gadget that turns on lights when someone walks through a doorway.

The door sensor switched on the hallway light.

4. A safety device on a machine that stops it if a door is opened.

The door sensor shut off the machine when the panel opened.