Adaptive HVAC Preheat for Home Assistant (Learns Your System, Hits Comfort Time)

I’ve been working on a Home Assistant-based approach to solving a problem I’ve never seen handled well by thermostats:

:point_right: How do you use overnight temperature setback and still wake up to a warm house?

Most approaches force a tradeoff:

  • Start heating too early → lose energy savings
  • Start heating too late → cold mornings

What this does

This project implements an adaptive preheat controller that:

  • Learns how long your home actually takes to heat up
  • Automatically schedules when to start heating
  • Targets arrival at your desired comfort time

It runs entirely in Home Assistant (Pyscript) and works with any climate entity.


Key idea (what makes it different)

Instead of using thermostat heuristics, it:

  • Learns from real heating cycles
  • Stops learning at the moment the target temperature is first reached
  • Avoids bias from modulating/holding behavior
  • Continuously refines timing over time

This ended up being especially important for modulating systems.


What to expect

It’s adaptive—not perfectly exact every day.

But over time it:

  • Gets consistently close to your target time
  • Prefers slight earliness over lateness
  • Avoids the oscillation you see in many “smart recovery” features

Example use case

  • Night setback to 65°F
  • Comfort target 70°F at 7:00 AM

System learns how long your house takes to warm up and automatically starts preheat at the right time.


Repo / Details

Full project, documentation, and release here:

:point_right: GitHub - dbullendsl/hvac-comfort-start · GitHub


Feedback welcome

This has been running in a real system (modulating furnace) and has been surprisingly stable.

Curious if others have tried solving this problem—or have feedback on the approach.

1 Like