It regulates temperature.
The switch is made of two different kinds of metals.
It activates a device when the temperature reaches a certain point.
Some can have dials to set the temperature.
They ensure that homes are never too hot or too cold for comfort.