šŸ”„ Advanced Heating Control

This errors I found in the HA Core protocols

Yes, sure. The error is thrown by ha template engine. But I think it depends on your automation configuration.

So disable all your AHC automations and enable them one by one after let them run for some minutes or trigger them by changing the target temperature until youā€™ve found the faulty one (when those errors occurs in your log).

I disabled all AHC automations, activated one by one and used the new vacation temperature to test. No error occurred and I canā€™t reproduce it.

Now I booted HA new and observe it. I only find warnings which I canā€™t assign:

click

Logger: homeassistant.helpers.script
Quelle: helpers/script.py:859
Erstmals aufgetreten: 14:02:31 (6 Vorkommnisse)
Zuletzt protokolliert: 14:14:06

Error in ā€˜choose[0]ā€™ evaluation: In ā€˜templateā€™ condition: TypeError: argument of type ā€˜NoneTypeā€™ is not iterable

Maybe this is something triggered by the AHC blueprint, but I donā€™t know. I deleted my own automations which used ā€œchooseā€ and searched for code where it is used. It is used by your blueprint, but this could just be a coincidence.

There is no choose block in the blueprint. :wink:

1 Like

I started having an issue with an unresponsive automation:

any guesses cant post the whole trace code as its too long

Have a look into the initial post (FAQ)

Ok, I see. Effect still the same for me :slight_smile:

Ah, I get it. So what Iā€™m looking for is a switch to simply ignore everything else, like a input ā€œforce_comfort_temperatureā€ and another input ā€œforce_AHC_offā€? The last one can of course be realized by switching the full automation to OFF, but then the heating will keep its last state (probably ON) instead of turning off and then never on again as long as forced off.

So even if the schedule is set to off and the presence sensor keeps triggering once in a while, f.i. because my dog is walking around, the AC will not turn off? How to make sure that the schedule is preferred and turns it off? I cannot really set the occupancy off to a shorter time period, because it is a simple PIR and thus goes to not detected when sitting still on the couchā€¦

Sorry for all the questions!

Just create a binary template sensor and combine your presence sensor with an input boolean.

{{ is_state('binary_sensor.YOUR_PRESENCE_SENSOR','on') and is_state('input_boolean.YOUR_HELPER','on') }}

And set this as your presence sensor.

Just have a look in the On/Off section and set an input boolean as winter mode entity, to enable/disable the automation. If disabled the last action is to set all climates to off.

If the sensor is set to on in this duration the 20 min will start count from 0 again. What you can do is:

  • debounce your sensor by wrapping it by a template sensor to make it less sensible
  • blacklist the time window with the presence schedule to make the heating schedule controlling the comfort /eco mode only
  • look for another kind of presence sensor, like media players, lights, ect. maybe there is always something on if the room is occupied

Your issues are all related to presence detection. Most presence sensors turns on and off multiple times in a short duration. So if you have set a activation time of 1 minute. Presence never kicks in comfort since the presence sensor is never on for at least one minute.

With every trigger, e.g. presence off, the automation action gets called and corrects your temperatures. Some presence sensor can be debounced in z2m for example in order to give a constant signal over a time period. If this not is the case you have to wrap your presence sensor by a template sensor. Like:

{% set presence_sensor = 'binary_sensor.presence' %}
{% set debounce_duration_seconds = 30 %}

{{ is_state(presence_sensor,'on') or (is_state(presence_sensor,'off') and (now() - ['binary_sensor.presence'] | expand | map(attribute='last_changed') | first).total_seconds() <= debounce_duration_seconds)

So the template sensor returns on if your presence sensor is on or if itā€™s off and changed its state before X seconds. So it turns off after 30 sec in this example.

//EDIT: Or better this:

binary_sensor:
  - platform: template
    sensors:
      your_custom_presence_entity:
        device_class: presence
        friendly_name: "Presence"
        delay_off:
          seconds: 30
        value_template: >
          {{ is_state('binary_sensor.YOUR_PRESENCE_SENSOR') }}

Bug or Feature? Question about AWAY Mode Behavior

Hi everyone,

First off, I want to say thank you for this amazing blueprint! Itā€™s been working great for heating my entire house, and I truly appreciate the effort put into it.

I do have a question about the AWAY mode behavior, though. Hereā€™s what Iā€™ve observed:

When I activate AWAY mode, it subtracts an offset from the comfort temperature, which seems to work only when my schedule is set to Comfort mode. For example:

  • Comfort temperature: 21Ā°C
  • Eco mode temperature: 19Ā°C
  • AWAY offset: -7Ā°C

With this setup:

  • When the house is empty during a time scheduled for Comfort mode, the target temperature is 21 - 7 = 14Ā°C.
  • However, when the house is empty during a time scheduled for Eco mode, the target temperature remains at 19Ā°C, and the AWAY offset doesnā€™t seem to apply.

This feels inconsistent to me. I would have expected AWAY mode to always set the target temperature to 14Ā°C when Iā€™m gone, regardless of the scheduled mode (Comfort or Eco).

Is this behavior intentional (a feature), or could it be a bug? Iā€™d love to hear your thoughts or suggestions!

Thanks in advance for your help!

thanks a lot @panhans , i just created entities for comfort and eco temp for one automation.
should i create 2 of those for each automation?
seems to work much better as now the temp change properly
fyi i have 7 automation for the full house

@jeremy.piaia
The idea of away mode is to lower the temperature a little bit if comfort is set and youā€™re away for a while to prevent the rooms from cooling down too much.
It seems like youā€™re looking for something like the frost protection feature. There you can define a target temperature that will be set when nobody is home for a certain duration.

@niouniou49
Great! It depends on your heating zones or temperatures. If the rooms can be grouped together and they always on the same temperatures you can add the same entities but if you want different temperatures per room you have to set up multiple entities.

1 Like

@panhans
Maybe you can give me a hint how to do this:

I already created two helpers for the temperature but I donā€™t know you this can be combined.

Thanks, thatā€™s great! Very clear and very smart.

I just have a follow-up question: Can I combine Away and Anti-Frost modes? Hereā€™s the setup I have in mind:

  1. Comfort: 21Ā°C
  2. Eco: 17Ā°C
  3. Offset for Away Mode: 3Ā°C
  4. Anti-Frost: 10Ā°C, with a fallback duration of 1 hour

Now, assuming I leave the house during a scheduled Comfort period, my understanding is as follows:

  • Upon leaving, the temperature will immediately drop to 21 - 3 = 18Ā°C (Away mode).
  • After 1 hour of absence, the temperature will be further reduced to 10Ā°C (Anti-Frost mode).

Can you confirm if this logic is correct?

P.S. Itā€™s long overdue that I buy you a coffee for all this helpful blueprint!

@tschaegged
At first this blueprint is designed to work fully automatically. For me I donā€™t want to change temperatures manually. So if you want automatic temperature changes, just have a look into the heating adjustments. There you can define when temperature changes should happen. You can filter them by days or schedules. So the temperature changes only happen when a specific schedule is enabled or for certain weekdays.

If you want to change the temperatures manually with presets you have to write your own automation based on selectors in order to set the values of the eco and comfort entity.

@jeremy.piaia
Yes, exactly. This should work exactly as you thought it would.

And thanks for the coffee! :pray:

Hello.
I canā€™t solve the problem that when I get home, the home assistant puts me in the ā€œotthonā€ state, my automation doesnā€™t work, but if I change it to ā€œhomeā€ in the status interface, everything works. Iā€™m using the Hungarian interface.

Really? The home state is language independent at least in the backend. Did you set a custom zone around your home?

I use the default setting for ā€œhomeā€, I need another circle around home, because of the Geofency app.

Itā€™s been working perfectly fine so far, today I noticed itā€™s cold.

Yes, so you have a zone in a zone. I donā€™t know how home assistant select the zone youā€™re in.

A workaround would be you setup the proximity integration, get rid of the persons in your AHC configuration and set the proximity device in the configuration.

Maybe it needs another option to set a custom zone for being home.