🔥 Advanced Heating Control

Could you put this into a code block?

Bildschirmfoto 2024-11-29 um 08.04.05

Thanks you already for your time!! I’m using a lighter version without all the extras and just schedule and away mode and that already is amazing!

Hello Sir,

thanks for your amazing blueprint.
Works like a charm with Tado devices.

I’ve got some Adax electro heater. Works as well, but the problem is, when the target temp is 18 °C, the heater holds the temp but it turns on and of every 30 secs.
My home power battery turns crazy to change power input this much.

Is there a way to turn the heater on when target temp - 0.5 and turn heater off when target temp + 0.5 to reduce the on and offs?

Thank you.
Regards

I am a little bit confused. Looks like a snippet from my blueprint, isn’t it? Shouldn’t this be a trace log of this blueprint?

How is your heater controlled by home assistant? Is it a switch or controlled by a climate entity?

I have set up a few TRV’s with this amazing blueprint.

But i have some questions/issues:
In one room I have set it up with a schedule, an external temp sensor, a person home/away sensor, an outside sensor. So I was expecting that the home/away sensor would be the first thing that would either allow or block the heating to start. Today, when the outside temp dripped below the threshold, the heating was shortly set to comfort temp, even though nobody was at home. It was just for 8 seconds, but still enough to fire the heater etc. This confuses me a bit. Should the fact that you are away not be the first reason to not even continue the automation and just keep the heating off?

Hi forum, hi panhans!

@panhans: thx for this blueprint - great work!

I tried to set up this blueprint. My thermostates are Homematic devices.
To keep things simple, I startet with this configuration:

alias: AHC Büro
description: ""
use_blueprint:
  path: panhans/heating_control.yaml
  input:
    input_trvs:
      - climate.thermostat_buro
    input_temperature_minimum_static: 15
    input_persons:
      - person.jens
    input_temperature_comfort_static: 21
    input_people_entering_home_duration:
      hours: 0
      minutes: 5
      seconds: 2
    input_people_leaving_home_duration:
      hours: 0
      minutes: 5
      seconds: 2
    input_windows:
      - binary_sensor.2_tur_buro_contact
    input_time_based_temperature_change_valve_target:
      - time: "00:00"
        days:
          - Mon
          - Tue
          - Wed
          - Thu
          - Fri
          - Sat
          - Sun
        comfort: "14"
        eco: "15"
    input_tweaks: []
    input_tweaks_experimental:
      - physical_temperature_change

I want to achieve that I can manually set the heating temperature with my Homematic ip thermostat (HMIP-WTH-2). Therefore I activated the (experimental) tweak “Physical Temperature Change”.
The issue is, that nearly immediately after manually changing the temperature to a different value than the blueprint says, the thermostat temperature is being set to the comfort value.
What am I doing wrong? Any help is appreciated…

Thx Jens

another issue i have is it looks like after opening a door and being set to OFF, temp is not going back to either eco or comfort when closing the door.
In my history of the thermostat, i see the blueprint actually reacting to the closing of the door, says “turned to HEAT”, but the target temp is still at 7 degrees (i have no idea where this 7 comes from by the way). And it stays at 7 for the rest of the day. (i have activated ‘legacy restore’ at the door/window section hoping it would fix it, but it doesnt)

Disable physical change please. It has an issue if window got opened and the thermostats only lower temperatures during airing instead of turning them off.

First of all thanks for this great blueprint!
Since updating to 5.0.8 from 4 (I created new automations for this as described in the upgrade FAQ) I got an issue though, I defined a input boolean in Winter Mode / Automation Toggle and it will lower the temperature to 5° when it is set to “off”, but if it gets set back to “on” by an automation the temp stays at 5°. If I manually toggle it to off and on again the temperatures will get set to the comfort temp, it just does not work if an automation sets the input boolean.
Edit: Never mind, it works! For reference, I use an automation to disable all heating when I open windows on opposing sides of my flat. I changed the delay for window open/closing in the heating automation to 0 seconds and now everything works again!

@coyote1 @mauritsivs

1 Like

Thanks for the wonderful Blueprint!
I have a question, I’m using this with a Tado Radiator Thermostat. Works well so far. The only thing I noticed is that on the Dashboard the Thermostat is always showing the heating mode even if the room temperature is under the set point.

All three are currently idling. The left one is using your Blueprint. The other two are using Tado schedules. Is this expected because from tados perspective the temp is manually set? Any workarounds?

Thanks

I thought you wanted to get the config? :slight_smile:
But there is nothing to trace, it just doesn’t fire when using the on or off boolean for the presence as a test

Hi,

replying to my own post (2206):

I found, that I used an old blueprint version (4.x). I updated to the actual version 5.09. I read that for “Physical Temperature Change” to work, it is required to have entities for ECO and Comfort temperature defined.
I created “dummy” entities of the type “input-value”, set the min value to 19,5 degrees, the max value to 20,5. My heating plan configures the temperature to 20 degrees.

If i now decrease the valve manually to 17,5 degrees, the temperature will be set correctly, seconds later, it will be set to the min value of my dummy entity (==> 19,5) and then the temperature is set according to the heating-plan (==> 20,0).

Here the commented extract from the log file.

Manually increasing the temperature to 23,5 degrees shows the same behavior. Only difference is, that the max temperature of the dummy entity (==> 20,5) instead of the dummy min temperature is set.

Any ideas what going on there?

regards
Jens

@Tomibeck
Mode heat means manual mode. The automatic mode is the internal schedule. Its just the operation mode but not the currently active hvac mode (idle).
Some thermostats offer more modes but mainly they are just presets.

@victoroos
That’s not the config. It’s cut off. It’s just a blueprint snippet and starts with trigger variables. Just navigate to your automation and toggle to yaml mode.

Hey,
I now upgraded my Blueprint to V5 but my Frost Protection is still not working.
I set it to 12hours to test the function.
My presence is done via Iphone App and Geofence which is working good. I also checked that the person really was 12h away, which is true.
Can you help me?

All the best
Tino

alias: 🔥 WZ_Heating_Control_V2
description: ""
use_blueprint:
  path: panhans/advanced_heating_control.yaml
  input:
    input_trvs:
      - climate.hm_tc_it_wm_w_eu_leq1214931
    input_temperature_comfort_static: 20.5
    input_temperature_eco_static: 17.5
    input_adjustments:
      - time: "06:30"
        comfort: "20.0"
        calibration: "off"
      - time: "11:00"
        comfort: "20"
        calibration: "off"
      - time: "16:30"
        comfort: "20.5"
        calibration: "off"
      - time: "21:30"
        comfort: "19.5"
        calibration: "off"
      - time: "22:30"
        comfort: "18.0"
        calibration: "off"
    input_mode_party:
      - input_boolean.besuch
    input_party_legacy_restore: true
    input_persons:
      - person.tino
    input_people_leaving_home_duration:
      hours: 0
      minutes: 15
      seconds: 2
    input_away_offset: 2
    input_away_scheduler_mode: false
    input_away_presence_mode: false
    input_windows:
      - binary_sensor.hm_sec_sco_leq1468341
    input_window_legacy_restore: true
    input_window_open_temperature: 5
    input_frost_protection_duration:
      hours: 12
      minutes: 0
      seconds: 0
      days: 0
    input_frost_protection_temp: 16
    input_liming_protection: true
    input_mode_winter: input_boolean.heizautomatik

for the “Physical Temperature Change” is it still neccessarry to deactivate calibration and aggressiv mode?

:fire: Advanced Heating Control 5.1 :fire:

:new: force eco mode

:new: entity ids instead of numbers in temperature adjustments for eco or comfort possible

:adhesive_bandage: fix frost protection not triggering

:adhesive_bandage: fix physical change when windows are open

3 Likes

Hello,
I notice in the logs the following issue:

2024-12-02 22:55:19.951 ERROR (MainThread) [homeassistant.components.automation.bedroom_advanced_heating_control_2] Error rendering variables: ValueError: Template error: float got invalid i
nput 'None' when rendering template '{% set n = namespace(dict=[]) %}
{% if is_native_calibration_trigger %}

  {% for valve in valves_calibration_common %}

    {% set calibration_entities = device_entities(device_id(valve)) |
                                expand | selectattr('domain','in','number') |
                                selectattr('entity_id', 'search', input_calibration_key_word) |
                                map(attribute='entity_id') | list %}

    {% if calibration_entities | count > 0%}

      {% set calibration_entity = calibration_entities | first %}
      {% set step = state_attr(calibration_entity, 'step') | float %}
      {% set min_calibration_value = state_attr(calibration_entity,'min') | float %}
      {% set max_calibration_value = state_attr(calibration_entity,'max') | float %}
      {% set thermostat_temperature = state_attr(valve, 'current_temperature') | float %}
      {% set offset_old = states(calibration_entity) | float(0) %}

      {% set new_calibration_value = value_temperature_sensor | float - (thermostat_temperature - offset_old) %}

      {% if is_aggressive_mode_calibration %}           
        {% set temp_diff = state_attr(valve,'temperature') | float(target_temperature) - value_temperature_sensor %}

        {% if temp_diff * factor < input_aggressive_mode_range * -1 %}
          {% set new_calibration_value = new_calibration_value + input_aggressive_mode_offset * factor %}
        {% elif temp_diff * factor > input_aggressive_mode_range %}
          {% set new_calibration_value = new_calibration_value - input_aggressive_mode_offset * factor %}
        {% endif %}
      {% endif %}

      {% set new_calibration_value = iif(new_calibration_value > max_calibration_value, max_calibration_value, new_calibration_value) %}
      {% set new_calibration_value = iif(new_calibration_value < min_calibration_value, min_calibration_value, new_calibration_value) %}

      {% set round_size = iif('.' in (step | string) and not is_rounded_values, (step | string).split('.')[1] | length, 0) %}

      {% set offset_new = ((new_calibration_value | float(0) / step) | round(0) * step) | round(round_size) | float %}

      {% if (float(offset_old) - float(offset_new)) | abs >= float(input_calibration_delta) %}
        {% set n.dict = n.dict + [(calibration_entity, [{'value': offset_new, 'valve': valve}])] %}
      {% endif %}

    {% endif %}

  {% endfor %}
{% endif %}
{{ dict.from_keys(n.dict) }}' but no default was specified

Not sure if it needs some delay to get the value from the other sensor or something else

Ooh, I’m sorry, of course

alias: Livingroom heating
description: ""
use_blueprint:
  path: panhans/advanced_heating_control.yaml
  input:
    input_trvs:
      - climate.living_room
    input_temperature_sensor: sensor.ph_motion_lr_temperature
    input_temperature_comfort_static: 19.5
    input_temperature_eco_static: 16
    input_persons:
      - person.victor
      - person.floris
    input_schedulers:
      - schedule.lr_heating_sc
    input_away_offset: 4.5
    input_away_presence_mode: false
    input_away_scheduler_mode: true
    input_windows:
      - binary_sensor.livingroom_windows
    input_people_leaving_home_duration:
      hours: 0
      minutes: 5
      seconds: 0
    input_reset_temperature: true
    input_mode_guest: input_boolean.guest
    input_calibration_delta: 0.5
    input_mode_party: []
    input_min_instead_of_off: false
    input_physical_change: true
    input_presence_reaction_off_time:
      hours: 0
      minutes: 0
      seconds: 10
    input_presence_sensor: input_boolean.ha_test_toggle
    input_mode_outside_temperature: sensor.flawlessvictorious_outdoor_temperature
    input_mode_outside_temperature_threshold: 17.5
    input_presence_reaction_on_time:
      hours: 0
      minutes: 0
      seconds: 10
    input_away_presence_ignor_people: false
    input_scheduler_presence: schedule.lr_heating_motion_sc

I just tested something,
When ia llow teh away offset on presence based it works. However, I want to not apply the away offset but the eco temperature. Is that possible as well? Away si way lower then eco.

I’m a very happy user of this blueprint and have a feature request. This is inspired by the official Tado app.

Right now the weather adaptation is based on outside temperature. But what about sun condition? My apartment doesn’t need heating if the sun is shining even though outside is like 4-5 degrees. The apartment goes up to 22-23 in that case. So if that day is sunny, reduce heating.