Heating That Reacts

Heating That Reacts

My heating used to run on a community blueprint in Home Assistant, working from a schedule and a home-or-away signal. It did the job, but it was a black box I couldn't tune, and it knew nothing about how quickly my flat actually warms. Gas is what pays for a wrong guess.

In early September I replaced it with a ladder of my own, then moved that ladder into a Python planner and ran the two side by side before the planner took over. Every five minutes it looks at the flat and picks one of twelve rungs, first match wins: a window left open, nobody home for a while, a scheduled comfort block, a pre-heat ahead of one, an eco setting for everything else. The safety and manual-override rungs sit above the economy ones. I'm hoping that reacting to the flat more closely, with timing it learns, adds up to less gas.

Learning how the flat behaves

Each week the planner refits how quickly the flat warms with the boiler running, from my own data, and the pre-heat uses that rate to time its start for 20 °C. It aims at the median warm-up, so it is sometimes a few minutes late. I tried letting outside temperature change the rate, and in a backtest that did worse than a fixed rate, so the live timing uses one learned rate. The latest fit has the flat gaining about 0.54 °C an hour with the boiler running and a 10 °C gap to outside, and the pre-heat currently works from 0.65 °C an hour.

It learns the flat, not the boiler. The fit never rewrites the ladder's own constants: the comfort targets, caps and debounces stay as I set them, and I get an alert if the fit moves far from the original numbers. What does move by itself is the warm-up rate behind the pre-heat, and the morning comfort start, which adjusts itself.

The lounge heater and Agile

The lounge has a 1.4 kW electric heater, and I'm on Agile. Home Assistant compares the live Agile price with gas and, when electric is the cheaper way to make a unit of heat, switches the heater on. That leaves a daft problem I haven't fixed yet: the heater warms one room while the boiler still fires for four, so both can run together and I pay twice for the same warmth.

The fix is written and tested, but it isn't switched on. When the heater is genuinely covering the lounge, the planner would drop the boiler to its eco setting. It would only do that if the lounge is the room that matters and every other room is above 16 °C, and only on the discretionary rungs. Frost, window, away, boost and holiday would never be touched. A cheap kettle is not a reason to let the flat get cold.

How I'll know if it worked

Gas is compared in kWh per heating degree-day, not pounds, because gas prices have moved too much in three years for cash to mean anything. The two baseline winters came in at 1.18 kWh per degree-day (winter 2024-25) and 0.89 (winter 2025-26), a baseline of 1.04. Both ran on the old blueprint, so the comparison is the blueprint against everything built since: the ladder, the learned timing and the adjusting morning start.

Gas per heating degree-day, kWh
Winter 2024-251.18
Winter 2025-260.89
Winter 2026-27too early to call

Winter 2026-27 has barely started. The planner won't publish a saving until it has 100 degree-days to compare, so there is no result yet, and I'm not going to pretend there is. The second baseline winter also includes a long spell away, which pulls that baseline down and makes it harder to beat, and the comparison is weather-normalised but not controlled. Anything else that changes between winters ends up in the number. The live planner page tracks it as the winter goes on.