This sensor is essentially a reed switch, encased in an ABS plastic shell. Normally the reed is 'open' (no connection between the two wires). The other half is a magnet. When the magnet is less than 13mm (0.5") away, the reed switch closes. They're often used to detect when a door or drawer is open,..
This is the Magnetic Door Switch Set, a small reed switch assembly specifically designed to alert you when doors, drawers, or any other aperture opens. These types of switches are primarily used in home security systems. One half of the assembly set on a window or door frame and the other attached t..