Restoring heating after you get home without wiping your own choices
Heating goes off when you leave. When you get back you want the schedule again, but not in zones you deliberately set differently.
- Published
- Reading time
- 3 min read
- Level
- Advanced
- Tested on HA
- 2026.10
The simplest away-mode automation is two rules long: everyone out, everything off; someone home, everything back to auto. That works for exactly one week, and then you come home to a guest room merrily heating itself. Or worse: the attic heating you turned on by hand from your phone for a job gets switched off again en route by your own automation.
The problem is that "turn everything back on" has no idea what was on before you left:
- A zone you had already switched off (guest room, attic in summer) suddenly fires up when you get home.
- A zone you adjusted by hand from your phone while you were out gets overwritten without ceremony.
The rules
- On departure: remember each zone's mode, then switch everything off.
- Zones that were already off before you left stay off.
- Zones changed by hand during your absence are left alone.
- Every remaining zone goes back to auto, meaning the Tado schedule.
Remembering with a helper
Create an input_text helper, for example input_text.verwarming_voor_vertrek, and store which zones were on as JSON:
- action: input_text.set_value
target:
entity_id: input_text.verwarming_voor_vertrek
data:
value: >
{{ states.climate | selectattr('state', 'ne', 'off')
| map(attribute='entity_id') | list | to_json }}
Mind the 255-character limit, because you will hit it sooner than you think. With a lot of zones, pick shorter names or move to the variable integration.
Spotting manual changes
Every state change in Home Assistant carries a context with it. If context.user_id is populated, a human made that change rather than an automation. When that happens while the alarm mode is set to away, add the zone to a "manual" list. A second input_text is enough; a label on the entity works just as well.
Restoring
When you get home, walk the stored list, strip out the manual zones and set the rest back to auto. Do that in a single climate.set_hvac_mode call with a list of entities, because with Tado every separate call costs you another slice of your daily budget (see also Tado without a subscription).
Wait a moment after a restart
Router-based presence is unreliable for the first few minutes after a restart, because Home Assistant has not seen the clients again yet and everyone briefly looks away. Give your away automation a short delay after startup. Skip that, and an ordinary update leaves your whole house cold.
Frequently asked questions
Why not just use Tado's own away mode? It runs on geofencing in the Tado app and wants Auto-Assist. With Home Assistant you use your own presence, which you can also tune far more precisely.
How does Home Assistant know everyone is out? Through people with multiple trackers. Presence with UniFi covers how to combine Wi-Fi and GPS.
Does this work for air conditioners too?
Yes, because any climate entity fits the same list. Just make sure the air conditioner and radiator in one room do not end up fighting each other.