🔥 Advanced Heating Control

No, the Blueprint is designed to provide such features for stupid thermostats. But I will think about preset support.

Thanks for reporting. I will check this.

Yes, this is atm not possible but on my list.

Correct!

No need to switch if v4 works for your needs. Mainly I’d refactored the code to make it easier to implement new features and give a better and faster support.

I think there is a custom quirk for the Xiaomi/Aqara Thermostats out there for zha to get native calibration working. But if you don’t you can enable generic calibration so the temperature difference will be add to the target temperature. But don’t be confused, because then the thermostats no longer display the set temperature, but the corrected temperature to compensate for the temperature difference.

3 Likes

Sorry guys I need some more help to get this up and running. Thanks to @panhans I achieved the first step by implementing this template.

{% set t_room_target = states('input_number.zusatzheizung_temp_input') | float %}
{% set t_outside = states('sensor.temperatur') | float %}
{% set climates = 'climate.smart_thermostat' %}
{% set level = states('input_number.zusatzheizung_kurve') | float %}
{% set inclination = 0.7 %}
{% set highest_target_temp = climates | expand 
            | selectattr('state','in',['heat','auto']) 
            | map(attribute='attributes.temperature') 
            | sort(reverse=true) 
            | first | default(0) %}
{% set dar = t_outside - t_room_target | float %}
{{ (t_room_target + inclination - (level * dar * (1.4347 + float(0.021) * dar + float(247.9) * float(10**-6) * dar**2))) | int }}

With this template I can adjust the level of the curve and the room temperature.
For those of you trying to help me, a “short” explanation of my setting:
Basically this is an additional floor heating system to my heating pump (which is already added to HA by modbus). This additional floor heating consists of a 3 way mixing valve, a water pump, outside temperature and a heating curve steering the valve based on the outside temperature. On KNX I’m having one address for open valve and another one for closing valve. Under no circumstances these addresses should be activated simultaneously! I added climate in configuration.yaml but this “just” switches heating on and off but not closing the valve.
What I’d like to implement is a smooth, controlled open / close procedure of the valve to achieve the target temperature.
I’d really appreciate if someone could help me to get this implemented. I’d love to use this AHC because I’m also controlling “open window”, away etc. The overall goal is to transform “everything” from EIBPORT V3 - KNX Home Server Visualisierung & Hausautomation to HA.
Thanks

Thanks @panhans the generic calibration works fine for me. Do i have to trigger this automation frequently to not overheat or is this done by the blueprint itself to make sure the target temperature is always set in the room?

the automation will be triggered everytime the temperature changed, so there is a calibration timeout to avoid calibration in small timespans and to avoid closing/opening the valve to often!
Have a look in Post #1 under “hints & FAQ”…

:fire: Advanced Heating Control v5.2 :fire:

So, if anyone is interested: With the latest version dynamic valve positioning is supported if your thermostats support this. :slight_smile:

Feedback is welcome!

3 Likes

I think I can see the same behaviour when

  • Force Eco Temperature is On
  • Window is open
  • Force Eco Temperature changes to Off while the window is open

It will restore the eco temperature since that was set before the window was opened and never trigger again to go to the comfort temperature since the Force trigger will not happen again.

Not sure how one would resolve that though without triggering the Force variable again.

what is dynamic valve Position?

Some thermostats provide an entity for the valve position. With the last update you can enable dynamic valve positioning to set the valve opening depending on the difference between the target and room temperature.

So the valve doesn’t act like a stupid relay anymore. This causes the thermostat to open and close in a smooth transition as the local temperature approaches the target temperature.

2 Likes

Still have randomly the issue that the temperature calibration with an external thermometer sets the actual temperature to (actual temperature - 0.5C) after a Home Assistant restart, and to a randomly higher temperature after that. It fixes itself once the thermometer changes its value and triggers the automation.

Is there any function in the automation that would add -0.5C or any other offset?

I just got one trace from it where the trigger id is ‘calibration_aggressive_mode_above_temp_thermostat_current_temp_change’, but I do not have any aggressive mode configured.

Last week I added a new function to delay the execution of the automation after a restart so that it is not executed until home assistant is fully initialized. have you tried it? You can find it under tweaks.

Don’t be confused by the trigger names. It is responsible for aggressive mode, calibration and also for temperature changes.

Not yet, but it’s configured now.
BTW: Do you have a hint to integrate the version checks into the configuration.yaml?
Mine is not working:

command_line:
  - sensor:
      unique_id: "ahc_blueprint_version_latest"
      command: "curl https://raw.githubusercontent.com/panhans/HomeAssistant/refs/heads/main/blueprints/automation/panhans/advanced_heating_control.yaml"
      name: "AHC Blueprint Latest Version"
      value_template: "{{ value | regex_findall('\\*\\*Version\\*\\*:(.+\\d+.\\d+.\\d+)', '\\1') | first | trim }}"
      scan_interval: 3600 # every hour
  - sensor:
      unique_id: "ahc_blueprint_version_local"
      command: "cat /config/blueprints/automation/panhans/advanced_heating_control.yaml"
      name: "AHC Blueprint Local Version"
      value_template: "{{ value | regex_findall('\\*\\*Version\\*\\*:(.+\\d+.\\d+.\\d+)', '\\1') | first | trim }}"
      scan_interval: 3600 # every hour

The sensor states are always empty.

Which operating system do you run home assistant on? Did you whitelist the local blueprint directory in your configuration?

1 Like

Ha! Right after your answer, the latest blueprint version is shown (5.2.1), but the local one not.
As I can read the config, the directory should be withelisted:

homeassistant:
  allowlist_external_dirs:
    - /config/blueprints/automation/panhans

The latest blueprint version was not available while it was on version 5.2, the installed one

Oh, I will check this. Maybe there is something wrong with the regex expressions.

1 Like

It is already delayed, on the graph you can see the correct temperature for that delay after a restart.
I had it setting the temperature value to the TRV with an external automation that also triggers on HA restart (and on change, and at least every 30min if no change) for a while, does not show wrong values there either.

I will leave it with that external automation for now. Just wondering where AHC would pull these temperature values from, not a single temperature value in my home automation setup was 19.9C or 21.4C at those moments.

Thanks @panhans for that very useful integration!
Today I found an issue when using the proximity sensor to start heating. I’ve set the proximity distance to 500, proximity is using meters (m) as value of measurement. But even when I’m quite far away of my monitored home zone, heating kicks in whenever I’m traveling in home direction. Might be a misinterpretation of return values here? Maybe 100.000m are considered as 100m instead of 100000m or 100km? Just guessing here, but might be worth a look?

Thanks

@fritz9473
I did a fix to this issue last week. Are you on the latest version?

This is fixed with the latest version.

First, thank you for this great blueprint.

I’ve two problems though with away mode and frost protection, which are not working or I miss something.

My config looks like this:

  • Comfort temp.: 20
  • Eco temp. 19
  • Persons: 2 persons
  • Away Temperature Offset: 3
  • Scheduler Away Mode: enabled
  • Frost Protection Temperature: 15

Problems:

  • temperature does not return to comfort/eco when someone came back home and currently in frost protection, so the temp. stays at 15°
  • with frost protection off (as it’s currently not working)
    • when outside of comfort schedule time (eco mode), and all persons leave, the temp. stays in eco mode (19°) not 17° (20-3)

PS: the values are just for testing the automation

Hi, thanks for your feedback. I’d just tested frost protection and is works flawlessly with your configuration. It also jumps back to comfort / eco temperature.

Just download and share a trace log with me when you think comfort / eco should kick in.

This is a wanted behavior. Away temp is set when the schedule is on and you leave the house for a short duration, otherwise eco is set.

Wow, rapid development here…I updated two weeks ago, so your right, wasn’t on latest version. Thanks for the heads up!