šŸ”„ Advanced Heating Control

Hi @panhans I can’t seem to find your GH to raise an issue there? Do you have a link for me pls? Thanks :wink:

It’s referenced in the initial post under Source Code. But here you are. :wink:

1 Like

Hi
Firstly thanks so much for creating and maintaining this blueprint. Exceptional work!

I am running in to an issue with the Proximity feature whereby it doesn’t seem to trigger until I (or someone else) is physically Home.

I have setup a zone called ā€œHomeā€ using he Proximity Integration which runs a couple of miles from my house.
I have the Proximity Duration set to 5sec.
And the Proximity Distance is 5000.

The automation does not seem to trigger pre-heating of my house until I physically arrive home. I assume this is related to connecting to Wi-Fi to signal a presence.

Any ideas what I am doing wrong?

Just wanted to import the new Version 5.4 with the breaking change.

There is a little warning while importing:

Now, I am wondering how to import the new blueprint Version 5.4 (which has the same name as Version 5.3) besides my existing AHC automations. So i can switch between them until everything works fine.

In other words - i do not want the new AHC blueprint to overwrite my existing AHC automations.

Is it enough to ā€œTake Controlā€ over the existing AHC automations?

I’m having trouble with my setup of AHC in one of my rooms. I have a person set up, and presence sensor. an eco temp and a comfort temp. no schedule.

after manually setting a higher temperature, even though the person is ā€œawayā€ and no presence is detected, it doesnt set the temp to eco. if i read the trace correct i see it reacting to the person leaving but still setting it to comf temp.

trace: https://controlc.com/f4377937

Thx for answer @panhans

But how do you set the Temperature for exemple to 12C (because Vacation temperature is lower as the Eco Temperature)
If i am not here for 8hours i will give 17C but i i am not there 2 weeks i can five 12 oder 14C
And where do you give the ā€œworkday sensorā€ in the Automation ? Currently i use the workday sensor integration.
Thx a lor

HI @panhans, I would love to be able to setup the debug panel the way you have if you could share the necessary yaml. Many thanks for the great BP

Thank you @panhans, I’ll take a look at the template switch you shared and/or potentially grouping my thermostats into a ā€˜master’ that I can use to trigger the Shelly if any are calling for heat.

Hi the problem with this solution is that you are limited with 2 Temparature :confused:

The soltuion dont work for peaple with a timeline with 3 Temperature like that

Would be better that the bluprint can check all 15 min the new Confort value

Also if you give a new Confort value on your dashbord it will be only checked after a switch timeline between eco / confort

Would be nice to be have the option to give that he have to check every 15min if there is a new Confort value

Preheating should happen if someone of your proximity sensor is in a range of 5000 and minimum 5sec towards that zone. Could you check the history of your proximity sensor if it gets the state towards?

I think you have to rename the old version. Just have a look at the top and set some prefix to its name for example.

Hmm… your eco temp is 20° and your thermostat is already set to this value:

"temperature_comfort_of_entity": 19,
"temperature_eco_of_entity": 20,
"temperature_comfort": 19,
"temperature_away": 19,
"temperature_eco": 20,
"target_temperature": 20,
"climates_information": [
  {
    "entity_id": "climate.thermostat_study",
    "state": "heat",
    "temperature": 20,
    "current_temperature": 18.2
  }
]

Yes, maybe it’s a little missleading but have a look to frost protection. There you can set a duration and a target temp that is the backup if nobody is home for that specified duration.

I will share this, when I am home. Maybe I will provide a dynamic version if needed.

Why you are limted? You can set the comfort entity and eco entity as you like with the schedule integration.

As I said this is not needed, since the automation gets triggered whenever the target temperature change but not if its in eco mode and the comfort temp gets a change since this has no impact to the actual logic.

Hmm… your eco temp is 20° and your thermostat is already set to this value:

thats odd, its the input_number eco temp that somehow is set to 20 while my static eco temp is 15… any idea what could cause this? is it maybe that when the its currently in ECO mode and i set the TRV manually to 20 that it changes this ECO temp instead of the Comfort temp? is this expected behaviour? in my logic, a manual change of the TRV, either through for example a thermostat-card in lovelace or on the phisical knob on TRV, it would set the comfort temp.

For sure physical change / sync. I will check if there is a new proper way to check what triggers the temperature change. But that’s why its labeled as experimental.

1 Like

My automations do have a different name (with a prefix)
Renaming the old blueprint does not work.
Maybe there“s no way doing what i“d like to do.

it had its downfalls when you gave new versions of the blueprint a new name (no more re-import) now we can re-import the new version — which everybody seemingly just did.

So will I (with some time in case sth breaks - with the breaking change)

Automations runs really nice, no need to update other than wanting to be stay with the development

Keep up your good work and thanks a lot

Ah, sry. You have to copy the blueprint file with a new file name, clone your automation, open it in yaml mode and link the referenced blueprint to the renamed copy.
Then you can simply update the blueprint and you are able to fallback.

Hi,

Sorry, am completely new to HA. Have a home built thermostat on the MySensors platform. All functional, and have been using to Domoticz for 7 years with it.
Am looking at migration to HA, have used your thermostat blueprint, however it sets the set point value to 7 degrees, or Zero degrees. The only values I have set are 18.5 and 21 Degrees. I have a schedule, a presence and location enabled, and it’s not working for me. Hoping you can point out my mistakes! also first post on here, don’t see where to attach files?

at the moment, I wish to simply vary the set point if people are home, and by schedule.
the thermostat is otherwise fully functional, I can change the set point, state etc, no problem through the UI.

I have my own simple automations, which work, i.e. set the setpoint at a couple of times through the day.
I have tried placing the trace in here, but it is way to large to post, it is rejected as over 32Kb

Many thanks
Nigel

Let me know what you need from me, and I’ll try to get it to you by fileshare one way or another.

Just use a service like Github Gist or Controlc and paste the link in here.


FIY: I have a few feature requests and will take a look at them over the weekend. In addition, the next version will allow you to change the temperature via the physical devices or the UI, i.e. the thermostat cards. After the temperature change, the values are written to the comfort/eco entities and all other thermostats in the respective automation are synchronized. Temperature changes made by automation can now finally be distinguished and thus blocked.

Hi - I use the Advanced Heating Control blueprint with generic climate thermostats and discovered that the liming protection workflow was not functioning correctly. Internal blueprint logic blocked both the liming-ON and liming-OFF phases under certain configurations, preventing AHC from applying the required temperature changes. As a result, the thermostat could remain stuck at its maximum temperature after a liming cycle, which in turn caused incorrect heating‑demand and pump behavior across the system.

After analyzing automation traces, the problem was found to stem from three separate logic conditions inside the blueprint. Below is a concise summary of the patches applied to restore full liming functionality.


  1. Patch: Allow liming-ON to run even in minimal configurations

Issue:
AHC sets no_changes = true when no persons, schedules, presence sensors, or proximity entities are configured.
In these ā€œminimal setups,ā€ this condition unintentionally blocked liming entirely — the blueprint refused to apply any temperature updates, including the maximum-temperature command during liming-ON.

Patch:
Adjusted no_changes so that it does not block liming when liming protection is active:

no_changes = (minimal_config_conditions) AND NOT is_liming_protection

This preserves the original behavior for all other cases while allowing liming-ON to function properly.


  1. Patch: Treat liming-OFF as a valid change trigger

Issue:
The liming-OFF template trigger (temperature_change_liming_protection_off) fired at the correct time, but AHC did not classify it as a ā€œchange trigger.ā€
Because of this, even though the blueprint correctly calculated the reset temperature internally, the reset action was never executed.

Patch:
Updated change_trigger to explicitly treat the liming-OFF trigger as a valid change event:

trigger.id == 'temperature_change_liming_protection_off' → change_trigger = true

This ensures liming-OFF enters AHC’s normal change-processing path.


  1. Patch: Allow the thermostat reset to run even when no_changes = true

Issue:
Even after the liming-OFF trigger was recognized, the final action block still refused to run.
The blueprint only applies changes when:

(not no_changes) OR (no_changes AND state_window)

During liming-OFF:
no_changes = true
state_window = false

This made the reset action impossible, even though the correct target temperature was computed.

Patch:
Extended the action condition so that a liming-OFF event always allows the temperature reset to execute:

Allow action if:
    • liming-OFF trigger fired
    • OR original conditions pass

This preserves all original logic and simply adds a necessary exemption for liming-OFF.


Final Outcome

After applying all three patches:

• Liming-ON is no longer blocked in minimal configurations.
• Liming-OFF reliably resets the thermostat to the correct ECO/normal temperature.
• The thermostat no longer becomes stuck at maximum setpoint after liming.
• Heating-demand and pump automations behave normally again.
• All patches are minimal, safe, and backward‑compatible with the rest of AHC.

If helpful, I can provide a unified diff or PR-ready patch.

1 Like

@panhans liegt das an deim tempalte sensor?

Logger: homeassistant.helpers.template
Quelle: helpers/template/__init__.py:1750
Erstmals aufgetreten: 18:45:00 (27 Vorkommnisse)
Zuletzt protokolliert: 20:24:00

Template variable error: 'trigger' is undefined when rendering '{{ trigger.event.data.is_force_max_temperature }}'
Template variable error: 'trigger' is undefined when rendering '{{ trigger.event.data.active_scheduler }}'
Template variable error: 'trigger' is undefined when rendering '{{ trigger.event.data.entry_time }}'
Template variable error: 'trigger' is undefined when rendering '{{ trigger.event.data.state }}'
Template variable error: 'trigger' is undefined when rendering '{{ trigger.event.data.last_trigger_id }}'

Many thanks for the tips @panhans.

I’ve now got 6 Sonoff TRVZBs set up and created a binary sensor that tracks whether any of them are calling for heat:

{{ is_state_attr('climate.dining_room_trvzb','hvac_action', 'heating') or  is_state_attr('climate.lounge_trvzb_1','hvac_action', 'heating') or  is_state_attr('climate.lounge_trvzb_2','hvac_action', 'heating') or  is_state_attr('climate.kitchen_trvzb','hvac_action', 'heating') or  is_state_attr('climate.master_bedroom_trvzb','hvac_action', 'heating') or  is_state_attr('climate.office_trvzb','hvac_action', 'heating') }}

I’ve set up a simple automation to toggle my central heating boiler (Shelly relay) control on/off depending on whether the climate control sensor indicates heat is required. Obviously, the TRVs are getting their temperature set according to the schedule I’ve used and all seems to be going well in that respect. Comfort/Eco temperatures are set as per the schedule.

The one new element I’ve subsequently introduced in one room is presence detection. I was expecting AHC PD to override the schedule behaviour and only switch the TRV to comfort temperature if someone is in the room, otherwise just stay in Eco irrespective of the schedule i.e. don’t got to comfort temp if the room isn’t being used. Unfortunately, this doesn’t seem to be happening. Even when the room is unoccupied, the temperature is still staying at comfort level.

Hi @panhans,

ich habe leider keine Mƶglichkeit gefunden, dich direkt zu kontaktieren, daher gezwungen, hier zu posten, du kannst mein Post nachtrƤglich lƶschen.

Wir haben deine großartige AHC verwendet und es hat uns sehr viel geholfen. Dafür wollen wir dich sehr gerne unterstützen und den Betrag über https://ko-fi.com/panhans spenden lassen.
Wäre es für dich möglich, uns dafür eine Quitung oder Beleg erstellen lassen, damit ich diese an unsere Buchhaltung weiterleiten kann?
Sag einfach Bescheid, wie ich dich kontaktieren kann.

VG
Benjamin