The Hall Effect Magnetic and Proximity Sensor Module can be used to detect the presence (or absence!) of nearby objects such as magnets. This sensor accepts a GND and +5V supply, and has a single digital output which goes low (GND) when a magnetic field is detected.
The linear sourcing output voltage is set by the supply voltage and varies in proportion to the strength of the magnetic field. It has a reduced current consumption of only 6 mA typically at 5 Vdc help make this sensor energy efficient.