Articles

Home Assistant Heating Setup: Room Schedules, Geofencing and Smart TRVs

7 October 2026 11 min read

If you’ve ever come home to a freezing house, or realised the heating has been blasting all day while nobody was in, this one’s for you. I’m going to walk you through the smart heating setup I run in Home Assistant. It uses a smart thermostat, smart radiator valves, separate temperature sensors for more accurate readings and, if you have one, an outdoor sensor so the heating switches itself on in autumn and off again in spring.

Most of what I write about is Apple Home, and that isn’t changing. But I’ve been using Home Assistant for the last 7 or 8 months, and when something is this useful and this easy to set up, I want to share it. This is the exact setup I used last winter and I’ll be running it again as the weather turns.

You’ll only need a small amount of YAML, and I’ve put all of it in the written guide on my GitHub so you can copy and paste as you go.

What this Home Assistant heating setup does

By the end of this guide you’ll have:

  • An individual heating schedule for every room, with each TRV and the main thermostat following its own timetable
  • Geofencing, so the house isn’t being heated when nobody is home
  • Automatic summer and winter switching based on the outdoor temperature, so you never have to remember to turn the heating off in May
  • More accurate room temperatures, because your TRVs read from a proper sensor instead of the one sitting next to a hot radiator
  • An optional boiler control automation if you use a relay like the Aqara T2 Relay, or your TRVs can’t call for heat on their own

And it costs nothing extra, assuming you already have the hardware.

The smart heating kit I’m using

You don’t need exactly the same devices as me. Here’s what I’ve got so you can see how it fits together.

Boiler

My boiler is a Viessmann with built in WiFi, which means it connects straight to Home Assistant. If yours doesn’t have WiFi, an Aqara T2 Relay can do the same job. I made a separate video on that, Can Aqara run your smart heating?, if you want to see it in action.

Thermostat and radiator valves

My main thermostat is part of the Habi Smart Heating System. It has a receiver box wired to the boiler and a wireless thermostat that sits in the living room. Upstairs I have three Habi Smart TRV valves on the radiators.

These are all set up in the Habi app first, which is what lets the TRVs call for heat from the boiler. They’re then exposed to Home Assistant over Matter. If your TRVs can’t call for heat, don’t worry, I cover a workaround at the end.

Temperature sensors

For room temperatures I use an Aqara temperature sensor, plus the built in sensors in my HomePod mini speakers, which sync across to Home Assistant. If you want to do the same, I’ve got a video on getting HomePod temperature readings into Home Assistant. Outside, I’ve got a SwitchBot Outdoor Meter.

Step 1: Create a heating schedule for each room

Home Assistant has a Schedule helper that’s perfect for this. To create one:

  1. Go to Settings
  2. Open Devices & Services
  3. Click the Helpers tab
  4. Click Create Helper and choose Schedule
  5. Draw your heating times onto the weekly grid
  6. Click each time slot and add additional data in the format temp: 20, using whatever temperature you want for that slot

Do this for every day and every time slot, then create another schedule for each room you want to control. I’ve got five: bathroom, bedroom, spare room, office and downstairs.

It’s a bit fiddly the first time. Once it’s done, though, you rarely touch it again.

Step 2: Use Better Thermostat for accurate TRV readings

Here’s the thing about TRVs. Their temperature sensor sits right next to the radiator, so they almost always think the room is warmer than it really is. The fix is to make them use an external temperature sensor instead.

I’d only bother doing this for your TRVs. A wall thermostat is usually placed somewhere sensible and reads fine on its own.

The integration that does all the clever offsetting for you is called Better Thermostat. It’s installed through HACS (the Home Assistant Community Store), so you’ll need that set up first.

Once Better Thermostat is installed:

  1. Go back to Devices & Services
  2. Click Add Integration and search for Better Thermostat
  3. Give it a name, for example “Bedroom Thermostat”
  4. Select the real thermostat, which is your TRV
  5. Select the temperature sensor you want it to use, which is your external room sensor
  6. If you have an outdoor sensor, select it here too. You can also add a weather entity
  7. Set the outdoor temperature at which the thermostat should switch off
  8. Set a tolerance. This stops the valve constantly flicking on and off around the target temperature
  9. Save, then repeat for each TRV

You now have your room schedules and a set of better, more accurate thermostats. Time to tie it all together.

Two things to set up before the automations

1. A “should we be heating?” check

In my automations I check what mode my boiler is in. That tells Home Assistant whether heating season is on or off. If your boiler isn’t connected, create a Toggle (input boolean) helper instead, under Devices & Services, Helpers, Create Helper. Call it something like “Heating Season”. This is the thing we’ll automate later, so you never have to switch the heating off in summer and back on in winter yourself.

2. A “is anyone home?” check

The automations also check whether someone is in. If everyone in your house has the Home Assistant app, you can use their presence directly. In my house not everyone does, so I use a virtual switch that turns off when the last person leaves and on when the first person gets back. That way family members can stick with Apple Home and it all still works.

Step 3: Create an automation for each room schedule

Head to Settings, then Automations & Scenes, and click Create Automation. You’ll make one of these for each schedule. I name mine “Set [room] temperature”, so “Set bedroom temperature” and so on.

When

Use a State trigger and pick your room’s schedule. This means the automation runs whenever a new time slot starts.

And if

Add two conditions:

  • We should be heating. For me that’s checking the boiler mode. For you it might be checking that your Heating Season helper is on
  • Someone is home

Then do

Add a Climate: Set temperature action, target the room’s thermostat (the Better Thermostat version for TRVs), and toggle on Target temperature. Switch the field to YAML or template mode and use this, swapping in your own schedule name:

{{ state_attr('schedule.bedroom_climate_schedule', 'temp') | float(0) }}

That pulls the temperature from the current schedule slot and makes sure it’s formatted as a number. Also set the HVAC mode to Heat.

Because my TRVs can call for heat, that’s all I need. Changing the target temperature is enough to fire up the boiler. If yours can’t, keep reading, it’s covered further down.

Repeat this for each of your room schedules.

Step 4: Geofencing automations

Everyone has left

Create a new automation. The trigger is the last person leaving home (or, in my case, my virtual switch turning off). For the action, set each thermostat’s target temperature to your frost protection temperature. I use somewhere around 10 to 12°C, but pick what suits your home.

Because the room schedule automations already check that someone is home, they won’t override this while the house is empty. Nothing to worry about there.

Someone arrives home

Create another automation that triggers when the first person gets home (or when my virtual switch turns on). Under the actions, add a Climate: Set temperature action for each thermostat. For each one, set the HVAC mode to Heat and use the same template as before, pointing at that room’s schedule.

Now, when you walk through the door, every room jumps straight to whatever temperature it should be at for that time of day.

If you want to be extra careful, add a condition under And if to check that you should be heating at all. Otherwise you could come home on a warm June afternoon and have the radiators kick in.

Step 5: Automatic summer and winter switching

This is my favourite bit. No more remembering to turn the heating off when it gets warm, or scrambling to turn it back on during the first cold snap.

Cold outside: heating on

Create an automation called “Cold Outside”. Use a Numeric state trigger on your outdoor sensor, set to below 10°C for 12 hours. If it’s been under 10 degrees for half a day, it’s probably time for the heating.

For the action I change my boiler mode to auto. If you went down the helper route, turn on your Heating Season helper instead. (I also change one other thermostat here, but that’s my electric underfloor heating in the bathroom, so you can ignore it.)

Warm outside: heating off

Create the summer version and call it “Warm Outside – Boiler Off”. The trigger is your outdoor sensor being above 18°C for 8 hours. The action switches the boiler mode to off, or turns your Heating Season helper off.

Feel free to tweak those numbers. They’re what work for my house in the UK, but a draughty old terrace might want the heating on a bit sooner.

And that’s the full setup. Room by room schedules, geofencing, accurate TRV readings and automatic seasonal switching, all running in Home Assistant for free.

Optional: Boiler control for relays and TRVs that can’t call for heat

If your boiler is switched by an Aqara T2 Relay or similar, or your TRVs can’t tell the boiler to fire up on their own, you need one more automation. I call mine “Boiler Control”.

This is also the approach to use if you’d rather go all in on Aqara. Pair the T2 Relay with Aqara Radiator Valves and this automation turns the boiler on whenever any of the valves want heat.

When

Trigger it when the current action (the hvac_action attribute) changes on any of your thermostats. Remember, our other automations are changing the thermostats’ modes and targets, so this will catch every change.

And if

Leave this empty.

Then do

Add a Choose action with one option and a default.

Option 1 uses a Template condition. Paste in the code below and replace the entity names with your own thermostats:

{{ expand('climate.bedroom_thermostat',
          'climate.office_thermostat',
          'climate.spare_room_thermostat',
          'climate.downstairs_thermostat')
   | selectattr('attributes.hvac_action', 'eq', 'heating')
   | list | count > 0 }}

In plain English, it checks whether anything in the house is currently calling for heat. If it is, the action for Option 1 turns your relay switch on.

For the Default action (nothing is calling for heat), turn your relay switch off.

Save it, and you’re done.

Frequently asked questions

Do I need a WiFi boiler for this Home Assistant heating setup?

No. If your boiler isn’t connected, use an Aqara T2 Relay to switch it and a toggle helper in place of the boiler mode checks. The boiler control automation above handles the rest.

Why use external temperature sensors with TRVs?

TRVs measure the temperature right next to the radiator, which is the warmest spot in the room. An external sensor on the other side of the room gives a much more realistic reading, and Better Thermostat adjusts the TRV to match.

Does everyone in the house need Home Assistant for geofencing?

Not necessarily. I use a virtual switch that follows presence in Apple Home, so family members don’t need Home Assistant installed at all.

Can I use a different outdoor sensor?

Yes. Any outdoor temperature sensor that shows up in Home Assistant will do. You could even use a weather integration, although a physical sensor like the SwitchBot Outdoor Meter tends to be more accurate for your actual garden.

Links and downloads

All the YAML from this guide is in the smart heating setup guide on GitHub. Here’s everything else I mentioned in one place.

Products

Related videos

Some of the product links above are affiliate links. If you buy through them I may earn a small commission at no extra cost to you.

Got a question, or found a tweak that works better for your house? Leave a comment below, I read them all. And if this saved you a few quid on your heating bill, you can always buy me a beer.

Written by Mark's Tech Blogs

Reviews smart home tech hands-on, in his own house, before it goes on the channel.

Leave a comment