Fridge light
How does it know the door is open?
It has a tiny magnetic switch and one rule. Open or close the door, then trick the reed with a magnet.
Door
Fool it
Senses
Rule
Does
For grown-ups: what's really inside
Many fridge doors hide a magnet. On the frame sits a reed switch — two thin metal contacts that close when a magnet is near. Door shut: magnet near, reed closed, light OFF. Door open: magnet away, reed open, light ON. The machine never sees a door; it only feels that magnetic field.
Simplified: many fridges use a small push button that the closed door presses, instead of a magnet and a reed switch. Either way, the light only knows what its switch tells it.