🔥 Advanced Heating Control

Unfortunately it seems to still not totally work as expected. So I have 2 rooms which should only heat up to the scheduled plan when the guest mode is turned on, otherwise should run with eco temperature. Here’s the yaml for one of the rooms:

alias: Badezimmer EG
description: ""
use_blueprint:
  path: panhans/advanced_heating_control.yaml
  input:
    input_trvs:
      - climate.heizkorper_badezimmer_eg
    input_temperature_eco_static: 17
    input_temperature_comfort_static: 24
    input_temperature_comfort: input_number.badezimmer_eg_manual_comfort_temperature
    input_adjustments:
      - time: "00:02"
        scheduler: Arbeitswoche
        comfort: "20"
        calibration: "off"
      - time: "05:00"
        days:
          - Mon
          - Tue
          - Wed
          - Thu
          - Fri
        scheduler: Arbeitswoche
        comfort: "24"
        calibration: "off"
      - time: "06:30"
        days:
          - Mon
          - Tue
          - Wed
          - Thu
          - Fri
        scheduler: Arbeitswoche
        comfort: "20"
        calibration: "off"
      - time: "20:00"
        days:
          - Sun
          - Mon
          - Tue
          - Wed
          - Thu
        scheduler: Arbeitswoche
        comfort: "24"
        calibration: "off"
      - time: "22:15"
        days:
          - Sun
          - Mon
          - Tue
          - Wed
          - Thu
        scheduler: Arbeitswoche
        comfort: "20"
        calibration: "off"
      - time: "23:00"
        days:
          - Fri
          - Sat
        scheduler: Arbeitswoche
        comfort: "24"
        calibration: "off"
      - time: "00:30"
        days:
          - Sat
          - Sun
        scheduler: Arbeitswoche
        comfort: "20"
        calibration: "off"
      - time: "08:30"
        days:
          - Sat
          - Sun
        scheduler: Arbeitswoche
        comfort: "24"
        calibration: "off"
      - time: "09:30"
        days:
          - Sat
          - Sun
        scheduler: Arbeitswoche
        comfort: "20"
        calibration: "off"
      - time: "00:30"
        scheduler: Feiertag/Urlaub/Krankheit
        comfort: "20"
        calibration: "off"
      - time: "23:00"
        scheduler: Feiertag/Urlaub/Krankheit
        comfort: "24"
        calibration: "off"
    input_schedulers:
      - schedule.arbeitswoche
      - schedule.feiertag_urlaub_krankheit
    input_scheduler_selector: input_select.zeitplan_heizprofil
    input_mode_guest: input_boolean.guest_at_home
    input_proximity_distance: 5000
    input_liming_protection_time: "09:00:00"
    input_liming_in_winter: true
    input_mode_winter: input_boolean.heizmodus
    input_mode_outside_temperature: sensor.gw1100a_outdoor_temperature
    input_mode_outside_temperature_threshold: 20
    input_people_entering_home_duration:
      hours: 0
      minutes: 1
      seconds: 0
    input_people_leaving_home_duration:
      hours: 0
      minutes: 5
      seconds: 0
    input_liming_protection: true

However I find the room currently being automatically set to 20°C which is the temperature set in the schedule despite the fact the guest mode is turned off.

Am I wrong presuming that the guest mode should work exactly like persons. If turned off it should be like persons not being at home and then it should go to the Eco temperature? Anyways it seems to run the scheduled temperature although guest mode is turned off and no other person is configured for this room. Here’s a tracelog from the run which, if understanding it correctly, should not have been running: https://controlc.com/c7946a2f

Thanks a lot for the help, I really appreciate it!

The version of the blueprint would be nice to know since there was a similar issue that got fixed with the latest version.

There was also a bug with the liming protection that looks like your spikes that is already fixed.

It’s version 5.0.4_d
I was not aware of a new version. Just noticed it. So I will upgrade to the current 5.0.7. Will check again with that one.

1 Like

Can anyone help me. I want to setup this for multiple rooms (having Sonoff TRVs), all are provided heat from a single boiler. How can i make a call for heat when one room is at a lower temperature than the threshold set for a particular time of the day

Hi panhans, great automation - was just confused by having to create separate automations per room at first. Currently (5.0.7), I am only a bit stuck with having my burner on a separate automation, and trying to use an average temperature helper as the calibration offset. Not sure why, but it tries to set temperature to max allowed offset and does not go down (it also does not show up in the dropdown at “room temperature sensor” - but if I paste the name in, it is accepted and resolves). But it seems the temperature is not accepted, when looking at the traces. So I switched to one temperature server, but it still does not work as expected.

My expectation would be: on switching to eco → go lower than eco temp, then slowly increase, as house cools, on switching to comfort → go higher than comfort until house heats up and then settle for comfort temp.

However, right now as target temp is 23, actual temp is 21.2 it sets the temp of the burner to 28 (23+ the 5 max).

"value_temperature_sensor": 21.2,
"valid_temperature_sensor": true,

"target_temperature": 23,
"changes": {
  "climate.vscotho1_200_11_heizung": [
    {
      "mode": "heat",
      "temp": 28
    }
  ]
},

For the individual room, the thermostate value however does not go up to 25 but stays at 23.

I could also set a template to calculate the average temperature by hand, would that be better? Or am I doing something completely silly?

Hi,

First of all, thank you for this amazing component! It’s been incredibly useful for managing heating in my setup.

I was wondering if there is (or could be) support for integrating this with the Scheduler Card? It would be great to combine the scheduling flexibility of the Scheduler Card with the advanced functionality of this heating control component.

If this is already possible, could you please provide some guidance on how to set it up?

Thanks in advance!

Panhans, sorry for this silly question: It’s possible to upgrade from v4 to v5 without recreating all the automations, right? I just change the filepath to the one of v5 in the v4 yaml?

“For everyone who’s coming from v4: Disable your old automations (for backup) and setup your new automations with the v5 blueprint from scratch.”

Seems that you have to redo it.

1 Like

Thanks a lot! :slight_smile: Seems like apart from early dementia, I am getting blind as well.

1 Like

How do you build a heating plan with AHC when you have shift changes or are on holiday?

I think you can take the sample “Calendar Based Scheduler Selector Sensor” from the helpful snippets and adapt that

Hey,

i want to have a third temperature to one room. So my goal is the following for the bathroom:

  1. Eco Temperature
  2. Comfort Temperature
  3. High Temperature

So i want to have the third Temperature for peak times if some is at home. Is this possible in a way?

Sure, this is the YAML for the room I pasted the graph for:

alias: Heizung großes Bad
description: ""
use_blueprint:
  path: panhans/heating_control.yaml
  input:
    input_trvs:
      - climate.bad
    input_temperature_minimum_static: 15
    input_temperature_comfort_static: 21
    input_schedulers:
      - schedule.scheduler_bad
    input_time_based_temperature_change_valve_target:
      - time: "06:00"
        comfort: 25
      - time: "06:45"
        comfort: 21
    input_tweaks: []
    input_windows:
      - binary_sensor.fenster_bad_alarm
    input_liming_protection: true
    input_liming_protection_day: Sun
    input_liming_protection_time: "15:00:00"
    input_away_options: []
    input_mode_winter: input_boolean.sommer
    input_invert_winter_mode_value: true
    input_mode_party:
      - timer.grosses_bad_waschemodus

I’m not quite sure how to copy the YAML for the Scheduler. Basically, it’s on between 6 AM and 10 PM.

I noticed the same behaviour in a different room, which has a similiar configuration. It’s completely independent of the the room I pasted the YAML for. But there is one thing that I find suspicious: the thermostats use a shared Scheduler. Could that somehow be related to the problem I am facing?

Hi there
cant figure out custom action script working.
Cant get condition to pass while trv is in work and heats atm.

if:
  - condition: template
    value_template: "{{is_heating}}"
then:
  - target:
      entity_id: switch.heating_l1
    action: switch.turn_on
    data: {}

I have 3 bedrooms with radiators with trv. and central heating line across bedrooms only. so i want to make it of kinda each trv to request heating while they activates to heating mode on to turn on pump on that line. i already implement automation to turn of pump when all trv triggered heating stop state. would much appreciate for help or advice

Not planned, but you could set every entity, e.g. temperatures ect., you uses in this blueprint also e.g. an input boolean for the guest mode to trigger heating.
Could you send me a screenshot of the state and the attributes of a example schedule?

I want to stay with on board home assistant entities but if I can open something for those kind of custom schedule without any big change I will do.

Possible, but it’s maybe difficult because some selectors changed drastically. I would recommend to set it up from scratch like @Bernhard76 said.

Can you explain the conditions for each individual temperature?

Could you also reveal the version of Blueprint that you are currently using?

I would recommend something independent like a custom template switch, that check whether at least one of your TRV is in mode heat and also checks if the measured temperature is lower than the target temperature. Don’t forget to edit your climates and if possible also try to read the code :smiley: :

switch:
  - platform: template
      switches:
        boiler:
          value_template: >
            {% set climates = ['climate.CLIMATE_1',
                      'climate.CLIMATE_2',
                      'climate.CLIMATE_3'] %}

            {% set heat = climates | expand | selectattr('state','eq','heat') | list | count > 0 %}

            {% set result = namespace(r=none) %}

            {% for climate in climates %}
              {% if result.r == none %}
                {% set result.r = state_attr(climate,'temperature') > state_attr(climate,'current_temperature') %}
              {% else %}
                {% set result.r = result.r or state_attr(climate,'temperature') > state_attr(climate,'current_temperature') %}
              {% endif %}
            {% endfor %}

            {{ heat and result.r }}
          turn_on:
            action: switch.turn_on
            target:
              entity_id: switch.heating_l1
          turn_off:
            action: switch.turn_off
            target:
              entity_id: switch.heating_l1

The high Temperature should have the same conditions like the comfort temp but with a other temp.
I can also do it with an automation just adjust the eco temp based on a sheduler.

Couldn’t you realize this with help of the heating adjustments?

- time: "20:00"
  comfort: "23"
- time: "23:00"
  comfort: "21"

Good Morning,
I am new to Homeassistent but got my immigration from FHEM more or less working over the last month.
This heating control works really good, but I have one problem.

I would like to use the away mode and frost protection.
They are connected to my “person” which is triggered via homeassistent app with geofence.
But it looks like i cant get it working.
When I am away, the heating control just switches to eco temperature and back to schedule when I am home.
But I would like to also get the frost protection working, when I am not at home for longer time. Its not triggering.

I hope, you can help me.

alias: WZ_Heating_Control
description: ""
use_blueprint:
  path: panhans/heating_control.yaml
  input:
    input_trvs:
      - climate.hm_tc_it_wm_w_eu_leq1214931
    input_temperature_minimum_static: 17.5
    input_temperature_comfort_static: 20.5
    input_persons:
      - person.tino_richter
    input_people_leaving_home_duration:
      hours: 0
      minutes: 15
      seconds: 2
    input_schedulers: []
    input_away_offset: 2
    input_away_options:
      - presence
    input_windows:
      - binary_sensor.hm_sec_sco_leq1468341
    input_window_open_temperature: 5
    input_mode_party:
      - input_boolean.besuch
    input_mode_winter: input_boolean.heizautomatik
    input_time_based_temperature_change_valve_target:
      - time: "06:30"
        comfort: "20.0"
        calibration: "off"
      - time: "11:00"
        comfort: "19.5"
        calibration: "off"
      - time: "16:30"
        comfort: "20.0"
        calibration: "off"
      - time: "21:30"
        comfort: "19.5"
        calibration: "off"
      - time: "22:30"
        comfort: "18.0"
        calibration: "off"
    input_frost_protection_temp: 15.5
    input_frost_protection_duration:
      hours: 12
      minutes: 0
      seconds: 0
      days: 1

Hey, thanks for your feedback. The version of the blueprint is missing. It looks like you are using v4 atm. You should migrate your automation to v5 at first. Thanks!

Hi,
thanks for the great Blueprint.
I was using version 4 and have now switched to version 5. I have deleted all automations from V4, deleted the script and downloaded version 5 again.
Unfortunately, nothing is changed anymore. I have created a simple automation, a thermostat and no other sensors. But nothing happens.
What could be the reason for this?
I also entered additional sensors once, but it didn’t work there either.

Here is the TraceFile:
https://controlc.com/30aa5083

Thx Herbert