Thermostat
How does it know it's cold?
It has one thermometer and one rule. Slide the room from cold to warm, set the limit, then warm the sensor with your hand.
Fool it
Senses
Rule
Does
For grown-ups: what's really inside
A thermostat measures temperature with a sensor (thermistor, bimetal strip, or digital probe) and runs a threshold rule: if the reading is below the setpoint, call for heat. This figure is heat-when-cold only — the same shape as a night-light's dark-threshold, with a different modality.
Simplified: real thermostats leave a small gap between the temperature that turns the heat on and the one that turns it off, so the heater doesn't click on and off every few seconds. Many can cool as well as heat.