Advanced scheduled heating control with calibration and window detection

Hi together,

I want to share my heating control blueprint. So, what do you get?

New Features

  • option to force the minimum temperature instead of switching TRVs off when window is open

Core features

  • heating based on a scheduler (on = comfort temperature, off = minimum temperature)
  • only heating if defined persons are at home
  • support for TRVs without off mode (will be set to minimum temperature if window is open or winter mode is off)

Optional Features

  • window open detection (when open trv goes off)
  • party mode independent of scheduler (heats if on)
  • winter mode - heating control on/off (if winter mode is on → heating control is on)
  • external sensor for trv calibration
  • 2nd holiday scheduler and input boolean to switch between regular and holiday scheduler
  • presence sensor: You can define a time window before your scheduler turns off next time. If that sensor turns off the trv will be set to your minimum temperature. Presence sensor could be a motion sensor or a binary sensor based on your lights. So you are able to turn down temperature when you go to bed earlier.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
Source Code

If you have questions or feature request, feel free to comment this thread.



very nice. Is it possible to switch back to the previous temperature after x hours of manual intervention?

Maybe you can trigger the heating automation using another like this:

description: ""
mode: restart
  - platform: state
      - climate.your_trv
    attribute: temperature
condition: []
  - delay:
      hours: 2
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: automation.trigger
    data: {}
      entity_id: automation.your_heating_automation
1 Like

Hi panhans!

Thanks for providing this! I tried implementing it today, but I failed. First one obvious thing:
The window entity is not optional and I am not able to save the automation if I have no window sensor.
I fixed that by creating a new sensor, which extracts the window detection of my thermostat (Fritz! Thermo)

  - platform: template
        unique_id: d62d73da-7839-4cb4-8dd4-5a83b1f52923
        friendly_name: "Heizung-Helfer-Fenster-Proxy"
        device_class: window
        value_template: "{{ state_attr('climate.wohnbereich_linkes_fenster', 'window_open') }}"

But it didn’t help:
No matter what I try, the automation always sends an off state to the thermostat.
Do you have any idea, what I am doing wrong?

My config:

(both winter_mode and party_mode entities are helpers and set to off, at least one person is present, window state is closed, schedule is marked 9-22)

1 Like

Hmm, I have one automation without window running atm. I’ll try to set up a new one.
If winter mode is off heating is always off. Try to set it to on.

That works, thank you! I am used to something like “Summer-Mode”, so my thinking got mixed up.

Great work! Super easy to set up and works as intended!
Nevertheless, the party mode doesn’t override my schedule. Is it a known issue or do you need further details?

I’d faced that issue a few days ago and fixed it this week. Maybe you try to update the blueprint.

1 Like

Works like a charm! Thank you!

1 Like

thx you very much, it works great,
would it be possible to make this work with a separate temperature sensor?

What should the external sensor do? Do you want the outside temperature to turn on/off heating?

thx for your answer,

i hoped to use a different temp sensor for the room,
my thermostats temperature is reporting way to high degrees. (i tried to offset the temperature, but its a total mess)
with an option for a different room temp sensor, one could just simply choose a sensor of choice.

hope that makes sense

This blueprint only controls temperature. There are other blueprints/automations for your issue. It also depends by your valves, integration and calibration attribute.

The most calibration automation can be used parallel to this blueprint. If you’re using tuya and z2m this thread could help you:

@panhans: I am just trying your blueprint as well. Why don’t you have multiple window entities? Like this you have to create a template and combine all window contacts if your room has more than one. I just made a new one and changed it to multiple. I would also like to add thermometers to the blueprint, that are used as current temperature, because the ones at the valves are not a good choice in some cases. Will see how I can do that

  1. Home assistant blueprints cant handle multiple optional entities used as trigger entities. There is an issue opend for that and also some threads here in the community but for most people not a big thing. Dont know if its ever be possible. So I must decide if I go with one optional window entity or multiple window support. Since some people use the build in window open mechanism I decide to chose the first option. Other blueprints are using time based periodical checks but I am not a friend of this kind of polling.

  2. For using an external temperatur entity for calibration I wrote something one post above. Since this is much wanted I will dive into to see what I can do for this blueprint.

Ah yes, just setting the windows to multiple breaks the automation. Pity that this isn’t supported.

Haven’t read your post above. Will have a look into it. Thx

And you dont need a template. Simply create a helper and group your windows and select this group as your window entity. :wink:

Yes, thank you. Works like a charm

The blueprint is great apart from that. I could get rid of my complicated automations. I had one automation for turning the heaters on and one for turning them off. Horrible…

When the external temperature sensors are implemented, the blueprint will be perfect! :wink:

1 Like


Thanks for this amazing blueprint, I got one question.
My EvoHome Systems requires the preset mode to Permanent otherwise it will follow a strange inside build schedule…

How can I add the preset mode to the Blueprint?
For Example, HVAC Mode Heat + Preset Mode: Permanent

Second question is, I can’t set the temperature to 19.5 in the Blueprint, am I doing something wrong?

Hope you can help me out with this!

1 Like

I found something like this that works for me but I am not sure where I can leave this code in the blueprint:

service: climate.set_preset_mode
preset_mode: permanent
entity_id: climate.living_room