monitor home heating when you have multiple thermostats and smart radiator valves (TRV)


Reducing my use of heating energy involves measuring it to see where it’s not needed. My smart thermostats and radiator valves (TRV) help to ensure I’m not heating the house when I’m out and not heating rooms that I’m not occupying. But frankly, looking after several thermostats is insanely insanity-making.
I described my heating setup on another page. Below I show how I handle the thermostat heating times and temperatures that seem to disappear into Home Assistant. You’ll find the tricky code I used and hopefully comment (below) to improve on this. Here is what’s covered…
- control all your smart thermostats from a tiny Home Assistant dashboard
- understanding the climate entity and its attributes – step 1 of 3
- make a binary sensor template to find out when the thermostat kicks the boiler into action – step 2a of 3
- show, at a glance, when the heating runs each day in each room – step 2b of 3
- combine all your thermostats to make one binary_sensor to say when the house is heating – step 3a of 3
- create a history statistics sensor to tally how long the thermostat is in the state of ‘heating’ – step 3b of 3
- conclusion: your thermostat is clueless about how much the boiler is working!
- create a line of mini-graphs as shown above – with code sample
- extra 1: make a ‘mold indicator’ for a room
- extra 2: use a statistics card to see the average temperature of each room
- extra 3: make a template to see the average target temperature of each room
- extra 4: stop guessing how much heat the hot water cylinder needs.

control all your smart thermostats from the Home Assistant dashboard
When you have several thermostats there’s a need to see them at a glance. Home Assistant has a ’tile card’ that provides a compact room thermostat controller. The following is space saving and interactive.

first … understand the climate entity and its attributes in Home Assistant – step 1 of 3
A smart thermostat will update Home Assistant with several parameters which you can see in Developer tools > States. The main ‘state’ of the thermostat (a ‘climate’ entity) shows as ‘heat’ if you’ve set the schedule to heat at that moment. A further attribute (or component) of the climate entity is called ‘hvac_action’ – this kicks the boiler into action if it is colder than the temperature you set as the target temperature. The value of ‘hvac_action’ will be ‘heating’ or ‘idle’ but this varies with brands.

make a binary sensor template to find out when the thermostat kicks the boiler into action – step 2a of 3
We want to know the value of ‘hvac_action’ so we must ask the entity to tell us this. This is awkward as we need to create a binary_sensor which is either ‘on’ when it’s heating or ‘off’ otherwise:
- go to Settings > Devices > Helpers and create a new helper
- choose Template > Template a binary sensor
- add a name for the thermostat eg ‘bedroom – heating’ or ‘heat – bedroom’
- in the state section replace my climate entity with your climate entity: eg
- {{ is_state_attr(‘climate.tado_smart_radiator_thermostat_va32xxxx’, ‘hvac_action’, ‘heating’)}}
- see the image and add ‘power’. The dialogue will show if it’s worked.
- if you add this binary_sensor entity to a history graph you can see when each thermostat has been calling for heat from the central heating boiler.
- The entity just made is something like ‘binary_sensor.heat_bedroom’. As shown on the lovely history graph below, you may want to make a binary sensor like this for every thermostat in the house. Then you’ll have ‘binary_sensor.heat_kitchen’… and so on.

show at a glance when each room demands heat – add your binary sensors to the Home Assistant dashboard – step 2b of 3
- the binary_sensor that we made from ‘hvac_active’ shows when the room kicks the boiler into action. You can make a binary_sensor, as above, for every room that has a thermostat.
- edit the dashboard (top right of the main Home Assistant page)
- add a card – you want a history graph
- choose a timespan for the graph eg 24 hours
- add as many as you have of binary sensor entities eg binary_sensor.heat_bedroom

combine all your thermostats to make one binary_sensor to monitor when any part of the house is heating – step 3a of 3
This is tricky because instead of just one thermostat for the whole house we have several. The graphic above shows when each room is actively heating. What we do now is roll up each room’s activity into one binary_sensor for the whole house. (The history graph above shows this single most useful roll-up sensor together with the room thermostats).
# ADD THIS TO CONFIGURATION.YAML using FILE EDITOR
template:
# omit the line above if you already have a "template:" section in
# configuration.yaml
- binary_sensor:
name: 'house heating'
device_class: power
icon: mdi:fire
state: >-
{{ is_state('binary_sensor.heat_bedroom', 'on')
or is_state('binary_sensor.heat_hall', 'on')
or is_state('binary_sensor.heat_kitchen', 'on')
or is_state('binary_sensor.heat_living_room', 'on')
or is_state('binary_sensor.heat_office', 'on') }}
# THE STATE LINE DEFINES A WHOLE HOUSE SENSOR THAT IS 'ON' IF ANY ONE OF OUR ROOMS ARE ACTIVE
create a history statistics sensor to tally how long the thermostat is in the state of ‘heating’ – step 3b of 3
Bear with us… above we made binary_sensor/s called eg ‘heat – bedroom’ and ‘heat – kitchen’. We then combined them into one whole house binary_sensor that has the state of on when any one room is actively calling for heat. Finally we’ll make a sensor that will time and add up all of the ‘on’ events:
- go to Settings > Devices > Helpers and create a new helper
- choose History Statistics >
- give the new sensor a name eg ‘house heating today’
- choose the binary_sensor entity made just above eg ‘house – heating’
- in the state box just type ‘on’ and click next
- in the options enter a start time in code {{ now().replace(hour=0).replace(minute=0).replace(second=0) }}
- the awful code above means the time now with the hour, minute and seconds set to zero, ie midnight. Another way to put this is {{ today_at(’00:00′) }}
- enter an end time of {{ now() }}
- the history statistic will total up the heating time from midnight up to the time now.
- that’s it. You now have an entity to put in a history graph on the Home Assistant dashboard,


create a line of custom mini-graphs – code sample

The display above shows a graph of recent temperatures. They are colour coded so that cold (or essentially not-heating rooms show as blue and heated rooms show as red. Of course those thresholds might need tweaking but I’ll review this. You can start with a horizontal stack and add the yaml code for any many custom mini-graph cards as required. The custom mini-graph requires HACS – it takes seconds to find and install. It’s very well established and seemingly trusted.

type: custom:mini-graph-card
entities:
- entity: sensor.tado_smart_radiator_thermostat_va2187xxx_current_temperature
name: kitchen
update_interval: 60
height: 120
hours_to_show: 8
align_state: right
show:
name: false
icon: false
state: true
line_width: 9
decimals: 0
color_thresholds:
- value: 12
color: "#2751a3"
- value: 17
color: "#d9941c"
- value: 19
color: "#fc0303"
how accurate is the calculated hours ‘calling for heat’ vs actual burn time? Answer: your thermostat is clueless about what the boiler is doing.
Above I showed how to get Home Assistant to total the ‘call for heat’ in each room. The ‘call for heat’ value came from the thermostat attribute ‘hvac_action’. In a 24 hour sample this calculates as 8.0 hours total ‘house heating’ time. My smart thermostats however are NOT smart enough to know whether the boiler is actually burning oil.

As it happens I have a sensor that is wired into the burner circuit that does this. It’s not smart (perhaps it could be) but it counts the hours that the boiler is active. In the sampled 24 hours, the sensor recorded 5.6 hours – there is much less oil burning going on. The boiler was active 100 * 5.6/8.0 = 70% of the time (while the outdoor temperature was between 3°C and 6°C. Wind speed was 7 mph).


I put a temperature sensor on the pipe that returns water from the house radiators. A plumber would call this the ‘boiler return’. (The sensor is an unmodified Sonoff TH16). Above you see the house heating total of ‘hvac_action’ together with the boiler return temperature over 24 hours. Clearly the boiler stops heating from time to time. The boiler gets hot if the circulation pump doesn’t carry water away. (This isn’t a problem as such – it indicates a boiler that’s making more heat than the house can remove – it’s caused by poor pump circulation, boiler kW / nozzle too big, radiators not big enough or sludge in the system).
extra 1 of 4: make a ‘mold indicator’ for a room
The mold indicator essentially works out whether a cold surface in the room is close to the point where moisture will condense on it. I found it meaningful (graph below) as I’ve noticed that my extractor fan fires off at good times and usefully improves the ‘mold indicator’ value. You need four pieces of information for this rough and ready measurement:
- the room humidity – this might come from the smart TRV device
- the room temperature – this might come from the smart TRV device
- the outside temperature – this might come from a weather entity or a outdoor sensor you own
- the temperature of a cold, and therefore mold sensitive surface in the room. Use the above to calculate the ‘calibration factor’ which is
= (room temperature - outdoor temperature) / (cold surface temp - outdoor temperature)
. In other words, subtract the outdoor temperature from each of the room temperature and the cold surface temperature. Then divide highest by the lowest to obtain a factor of about 1.5.
- go to Settings > Devices > Helpers and create a new helper
- choose ‘Mold Indicator’. For the name add eg ‘house bedroom’
- fill in the form using the entities just mentioned. Put 1 in the calibration or do the calculation.
- edit the Home Assistant dashboard and add a history graph for the mold sensor (which in this example might be sensor.mold_index_house_bedroom).


extra 2 of 4: what is the average temperature of each room?
Knowing the average room temperature is a bit of an academic exercise but seeing these on a bar graph can highlight anomalies in my setup: eg am I heating any room unnecessarily?
- edit the dashboard (top right of the main Home Assistant page)
- add a card – you want the Statistics Card
- set the parameters – you want the mean; 24 hours; bar chart
- add two or more temperature entities, like this:


extra 3 of 4: what is the average target temperature of each room?
I wondered if it might be useful to know the average target temperature of each room thermostat. The thermostat climate entity has a set temperature attribute called ‘temperature’. To ‘get at this’ we need to use template code .. but just follow along:
- go to Settings > Helpers > Create a Helper
- choose Template > Template a sensor
- for a name put ‘target – bedroom’
- for state template enter the following code replacing my climate entity with yours. The curly arrows enclose what gets ‘printed’ to the sensor. The state_attr () is a function that selects the attribute of an entity. The attribute follows a comma. By convention put single quotes around items. The | float(‘0’) or bar float ensures that temperature will be treated as a number. The (0) ensures that the template sensor has a value.
- {{ state_attr(‘climate.tado_smart_radiator_thermostat_va366’, ‘temperature’) | float(‘0’) }}

extra 4 of 4: how much heating does the hot water cylinder need?
This is useful if you don’t have a combi boiler – in other words – your hot water is heated and stored in an insulated cylinder. The first tip is that, (unless you’ve a lot of people washing) you don’t need or want to be heating this all the time. Even if it has a thermostat.
Your hot water cylinder is typically heated on a separate schedule that you’ll find in the thermostat app / wall programmer. You’ll realise that you need to guess how long to heat the water cylinder for each day. For less guesswork do obtain a temperature measuring device connected to Home Assistant. My solution used a Sonoff TH Elite with a temperature probe plus ewelink app plus Home Assistant sonoff integration – basically just something than transmits its temperature.

There appear to be two heating periods at 10am and 4pm. Overall the water is kept too hot for people who are out during the day. There’s little point in heating water before it’s needed. The graph shows the time needed for heating the hot water cylinder. It also shows that when it’s nor heated it loses 10°C over 12 hours
- tip: try to schedule your hot water heating at the same time that you’re heating the radiators. This is preferable to heating up the boiler just for heating washing water.
- tip: it helps to know that water at 50°C is ‘hot’ and a shower at 40°C feels ‘too hot’.
- on my boiler the water heats slowly – rising 10°C in 120 mins – so I might schedule 90 minutes of ‘top-up’ hot water heating in the early morning and/or 60 minutes of water heating at say, 6pm.
- tip: one cylinder-full of hot water can last us a day or provide a couple of showers plus kitchen washing. The hot water cylinder temperature loses 10°C over 12 hours so a newly heated hot cylinder to 50°C should be good for a shower 12 hours later.