How does a smart thermostat decide when to heat or cool?
A smart thermostat decides when to heat or cool a home. It looks at the time, the temperature and when people turn the dial by hand, and learns the household's schedule. Then it weighs two things against each other: keeping people comfortable and not wasting energy. Change how much it cares about each, and its choice changes.
In one line: A program that learns when a home is busy or empty and picks when to heat or cool it.
Last reviewed: 25 October 2026 3 min read
What decision does it make?
All day, the thermostat keeps choosing what to do next: heat, cool or wait. The hard part is timing, because a house takes a while to warm up or cool down.
| Decision | Possible answers |
|---|---|
| What should it do right now? | Heat: start warming the house. Cool: start cooling it. Wait: do nothing for now. |
What does it look at?
- Time and day. A school-day morning is different from a Saturday morning.
- Temperature. It measures how warm the room is now and how far that is from the setting.
- Hand changes. Each time someone turns the dial up or down, that is a clue about what they want and when.
- Who is home. Some thermostats can tell whether people are home, away or asleep, and adjust.
How does it learn the rule?
- Watch for a while. It notes when people change the setting and whether people seem to be home.
- Find the pattern. It looks for times that repeat, such as warmer at 6:30 every school morning.
- Make a schedule. It builds a plan for each day. Some models learn from experience the best way to warm the house up or cool it down.
- Keep adjusting. New hand changes are new examples, so the schedule can shift when the family's days change.
Where can it go wrong?
- Days that break the pattern. On a sick day or a holiday, it may still turn the heat down because nobody is usually home.
- A wrong guess about who is home. If it thinks nobody is home, it may turn the heat down while someone is still there.
- Caring about the wrong thing. The weights set the trade-off. A thermostat that cares only about energy can leave people cold.
Try it
Toy example: the family gets up at 6:30 and leaves at 8:00. Move the sliders to change what the thermostat cares about, and see which morning plan it picks. The lowest score wins.
Toy example with invented numbers: four heating plans for a school-day morning and their energy used, cold minutes and hand changes.
| Item | Values | Score at starting weights |
|---|---|---|
| Plan A: keep it warm all night | Energy used (toy units): 9; Minutes someone is home and cold: 0; Times someone fixes it by hand: 0 | 9 |
| Plan B: start heating at 6:00 | Energy used (toy units): 3; Minutes someone is home and cold: 5; Times someone fixes it by hand: 0 | 8 |
| Plan C: start heating at 6:30 | Energy used (toy units): 2; Minutes someone is home and cold: 20; Times someone fixes it by hand: 1 | 23 |
| Plan D: no heat this morning | Energy used (toy units): 0; Minutes someone is home and cold: 90; Times someone fixes it by hand: 2 | 92 |
Check it
How does a smart thermostat learn a family's schedule?
Answer: From when they change the setting and when the house is busy. Hand changes and signs that people are home are the examples it learns from.
You set "energy used" to 0. Which plan wins?
Answer: Plan A: keep it warm all night. If energy costs nothing in the score, the plan with no cold minutes wins, even though it wastes the most energy.
Why might it get a holiday morning wrong?
Answer: It follows the usual school-day pattern. It learned the usual pattern, and a holiday breaks it.
For older readers
In the toy, each plan gets a weighted sum: every feature is multiplied by its weight and the results are added. That is the same building block as a linear model. In machine learning, weights are parameters found during training, not set by hand. Picking the plan with the lowest total cost is an optimization: the weights decide the trade-off between comfort and energy.
Questions
A house takes time to warm up. If the thermostat learned that people get up at 6:30, it may start heating earlier so the house is warm by then.
Yes. Turning the dial is how you tell it what you want, and it uses those changes to update its schedule.
The FTC suggests removing personal information from all the connected devices in a home and then resetting them before the home is sold.
Sources
- Stanford University: Speech and Language Processing, chapter 4, logistic regression (features, weights and bias) (opens another website)
- FTC: Buying or selling a smart home? Read this. (opens another website)
- Department of Energy: programmable and smart thermostats (opens another website)
- ENERGY STAR: smart thermostats FAQ (opens another website)