Skip to content
Mechna Academy
  • How does it decide?
DecisionSignalsLearningMistakesTry itCheck itOlder readersQuestionsSourcesRelated
How does it decide? / Smart thermostat

How does a smart thermostat decide when to heat or cool?

Answer first

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.

DecisionPossible 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?

  1. Watch for a while. It notes when people change the setting and whether people seem to be home.
  2. Find the pattern. It looks for times that repeat, such as warmer at 6:30 every school morning.
  3. 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.
  4. 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.

ItemValuesScore at starting weights
Plan A: keep it warm all nightEnergy used (toy units): 9; Minutes someone is home and cold: 0; Times someone fixes it by hand: 09
Plan B: start heating at 6:00Energy used (toy units): 3; Minutes someone is home and cold: 5; Times someone fixes it by hand: 08
Plan C: start heating at 6:30Energy used (toy units): 2; Minutes someone is home and cold: 20; Times someone fixes it by hand: 123
Plan D: no heat this morningEnergy used (toy units): 0; Minutes someone is home and cold: 90; Times someone fixes it by hand: 292

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

  1. Stanford University: Speech and Language Processing, chapter 4, logistic regression (features, weights and bias) (opens another website)
  2. FTC: Buying or selling a smart home? Read this. (opens another website)
  3. Department of Energy: programmable and smart thermostats (opens another website)
  4. ENERGY STAR: smart thermostats FAQ (opens another website)

Related machines

  • How does a weather forecast decide if it will rain?↗
  • How does a robot vacuum decide where to go?↗

On this page

What decision does it make?What does it look at?How does it learn the rule?Where can it go wrong?Try itCheck itFor older readersQuestionsSourcesRelated machines

Nothing you do on these pages is sent anywhere. There are no cookies and no ads.

Mechna Academy teaches how machines like this decide.

For grown-ups: privacy For grown-ups: how Mechna Academy works