This sounds very promising!
Thanks for the great blueprint! I just have a question and I just can’t seem to find the proper answer yet. I try to make an automation for cooling using my AC. Now I have to set comfort and eco temperature. Does this mean then that I have to set the eco temperature to a higher value than the comfort temperature, as a higher temperature is accepted when I’m gone? Hope somebody can help me out…
I just found the setting ‘off instead of eco’. Is that the way to go?
Enhancement Request: Latch-Based Presence Detection Mode
Summary
Add support for “latch-based” presence detection mode to prevent excessive heating on/off cycling and improve energy efficiency.
Current Behavior
The blueprint currently uses continuous presence-based control:
- Presence detected → heating ON (comfort temperature)
- Presence lost → heating OFF (eco temperature)
- Presence detected again → heating ON again
Problem with Current Approach
This creates excessive cycling in real-world scenarios:
Example scenario:
- Person enters room for 10 minutes → heating turns ON
- Person leaves for 20 minutes → heating turns OFF
- Person returns for 15 minutes → heating turns ON again
- Person leaves again → heating turns OFF again
Result:
- Room never reaches comfortable temperature
- High energy consumption from constant startup cycles
- Heating system wear from frequent on/off switching
Proposed Enhancement: Latch-Based Mode
Logic Overview
Add a new mode that uses an input_boolean helper as a “heating allowed/blocked” controller:
Helper States:
ON: Heating is allowed/active for the entire period
OFF: Heating should remain off
Automation Logic
Turn Helper ON (Latch heating ON):
Trigger: First presence detected in room
- Conditions:
- Helper is currently OFF
- Within active time period (e.g., 5 PM – 10 PM)
- Action: Set helper ON → Enable heating
Turn Helper OFF (Release latch):
- Trigger: Preset time reached (e.g., 10 PM)
- Action: Set helper OFF → Disable heating
Key Benefits
- Energy Efficiency: Heating stays ON during active period regardless of occupancy changes
- Comfort: Room maintains temperature throughout the evening
- System Protection: Eliminates excessive on/off cycling
- Flexibility: Users can manually override via helper if needed
Backward Compatibility
This would be an additive enhancement - existing users can continue using the current continuous mode, while new users can opt for latch-based mode.
Thank you for considering this enhancement! This would make an already excellent blueprint even more energy-efficient and practical for real-world usage patterns.
I created my heating control with similar features in Node Red anoint time ago.
I plan to move it to HA for quite a while, but it will be a shitload if work.
Will have a look if your blueprint can replace it. Does it support open / close at dawn / dusk or only time schedules?
Hi there,
I migrated my smart home from HomeKit to Home Assistant two weeks ago and started using AHC straight away.
So far, everything is working fine. I have schedules setup that are carried out through the day to switch between Eco and Comfort temperature. However, as I also use Away capabilities, I expected AHC to substract the Away Temperature Offset from my Eco temperature, no matter the time.
I just came to realise that AHC actually substracts the Away Temperature Offset from my Comfort temperature when I’m away and the schedule is in an On-Timeframe and when not in that timeframe, it just sets to Eco temperature when I’m away.
Am i overseeing some setting or is it not possible to have the Away Temperature offset substracted from the Eco temperature independent of the schedule? Even a static away temperature would be fine for me.
Thanks in advance!
Hey, Firstly fantastic setup for this, Thank you!
I’ve been using it for a number of years (since v3 I think) and it’s fantastic. Just a few queries, I’ve kinda dealt with them but figured I should probably just ask if there’s a better way to handle these.
- AHC Blueprint Local Version script doesn’t appear to work. I’ve added the sensors to my config file as per the below and the latest version check works but not the local.
# --- AHC version sensors ---
command_line:
- sensor:
unique_id: ahc_blueprint_version_latest
name: AHC Blueprint Latest Version
command: "curl https://raw.githubusercontent.com/panhans/HomeAssistant/refs/heads/main/blueprints/automation/panhans/advanced_heating_control.yaml"
value_template: >-
{{ value | regex_findall('\*\*Version\*\*:(.+\d+\.\d+\.\d+)', '\1') | first | trim }}
scan_interval: 3600
- sensor:
unique_id: ahc_blueprint_version_local
name: AHC Blueprint Local Version
command: "cat /config/blueprints/automation/panhans/advanced_heating_control.yaml"
value_template: >-
{{ value | regex_findall('\*\*Version\*\*:(.+\d+\.\d+\.\d+)', '\1') | first | trim }}
scan_interval: 3600```
- My Tado TRV’s even when switched off appear to constantly recalibrate, this is draining the batteries pretty regularly, and I wondered if I have just set something up wrong with the automations. I am using the setup as per the images here: Google Drive. It feels as though every few weeks I’m having to change batteries in one or more TRV’s. Would really appreciate some guidance if you are able.
We have Tado SRVs as well and ours seem to calibrate regularly, even when off. I’m using Panasonic eneloop batteries and not had to recharge any of them in the last 5 months.
This is a typical setup for one of our rooms. I stop the SRV calibrating overnight so they don’t disturb us:
alias: Cloakroom Heating
description: Controls heating in the Cloakroom only
use_blueprint:
path: panhans/advanced_heating_control.yaml
input:
input_temperature_eco: input_number.heating_eco_temperature
input_trvs:
- climate.cloakroom
input_temperature_comfort: input_number.heating_comfort_temperature_cloakroom
input_force_max_temperature: input_boolean.boost_heating
input_min_instead_of_off: true
input_persons:
- person.xxx_xxxxx
- person.xxx_xxxxxx
input_people_entering_home_duration:
hours: 0
minutes: 0
seconds: 30
input_people_leaving_home_duration:
hours: 0
minutes: 1
seconds: 0
input_presence_sensor: binary_sensor.cloakroom_occupied
input_presence_reaction_on_time:
hours: 0
minutes: 0
seconds: 10
input_presence_reaction_off_time:
hours: 0
minutes: 5
seconds: 0
input_scheduler_presence: schedule.general_heating_schedule
input_away_offset: 2
input_away_presence_mode: true
input_away_presence_ignor_people: true
input_windows:
- binary_sensor.cloakroom_window_contact
input_mode_winter: input_boolean.cloakroom_heating_on
input_temperature_sensor: sensor.h5075_b444_temperature
input_calibration_key_word: offset
input_calibration_generic: false
input_generic_calibration_offset: 5
input_calibration_timeout:
hours: 0
minutes: 0
seconds: 30
input_custom_condition_calibration:
- condition: state
state: "off"
entity_id: input_boolean.we_are_in_bed
Have you got the AHC Template Sensors set up? They give quite a bit of insight into how each room is setup and also give the time of the last calibration in the attributes. The room above hasn’t calibrated since yesterday at 2145.
@panhans Do you see any chance to add a dedicated Away-Temperature to the blueprint? Or an option to choose wether the Away offset should be subtracted from either the Comfort or the Eco-Temperature? ![]()
Thank you for this. I’ll look at getting the THC’s set up and see if I can figure out what’s going on.
Appreciate your detailed feedback so far.
I also would like that instead of the actual temperature.
If its almost going to be warm later in the day, I don’t need my radiator to turn on in the morning.
Perhaps this has already been discussed. The following problem: I would like to use this blueprint for my air conditioning system, which can heat in winter and cool in summer. Winter is no problem, but summer mode is. Is there any way I can set it so that it does not use temperatures below a threshold value, but only above a threshold value? Example: In summer, the indoor temperature is above 25 degrees, and then it should be cooled until 23 degrees is reached.
Hey, so I tried to set up the AHC template sensors and they don’t appear to be working/pulling any data. Using the below:
- trigger:
- trigger: event
event_type: ahc_event
event_data:
automation: "1736115875785" # edit this to your automation id
binary_sensor:
- name: "AHC Bedroom Data" # give the sensor a name
unique_id: AHC_Bedroom # and ofcourse an ID
state: "{{ trigger.event.data.state }}"
attributes:
mode: "{{ trigger.event.data.mode }}"
automation: "{{ trigger.event.data.automation }}"
is_person_defined: "{{ trigger.event.data.is_person_defined }}"
is_proximity_defined: "{{ trigger.event.data.is_proximity_defined }}"
is_anybody_home: "{{ trigger.event.data.is_anybody_home }}"
is_guest_mode: "{{ trigger.event.data.is_guest_mode }}"
active_scheduler: "{{ trigger.event.data.active_scheduler }}"
state_scheduler: "{{ trigger.event.data.state_scheduler }}"
state_presence_sensor: "{{ trigger.event.data.state_presence_sensor }}"
state_presence_scheduler: "{{ trigger.event.data.state_presence_scheduler }}"
state_presence: "{{ trigger.event.data.state_presence }}"
state_proximity_arrived: "{{ trigger.event.data.state_proximity_arrived }}"
state_proximity_way_home: "{{ trigger.event.data.state_proximity_way_home }}"
is_force_max_temperature: "{{ trigger.event.data.is_force_max_temperature }}"
active_party_entity: "{{ trigger.event.data.active_party_entity }}"
party_temp: "{{ trigger.event.data.party_temp }}"
is_away: "{{ trigger.event.data.is_away }}"
state_window: "{{ trigger.event.data.state_window }}"
is_frost_protection: "{{ trigger.event.data.is_frost_protection }}"
is_liming_protection: "{{ trigger.event.data.is_liming_protection }}"
state_outside_temp: "{{ trigger.event.data.state_outside_temp }}"
entry_time: "{{ trigger.event.data.entry_time }}"
thermostats: "{{ trigger.event.data.thermostats }}"
hvac_mode: "{{ trigger.event.data.hvac_mode }}"
temperature_comfort: "{{ trigger.event.data.temperature_comfort }}"
temperature_eco: "{{ trigger.event.data.temperature_eco}}"
target_temperature: "{{ trigger.event.data.target_temperature}}"
set_max_temperature: "{{ trigger.event.data.set_max_temperature}}"
last_trigger_id: "{{ trigger.event.data.last_trigger_id}}"
last_calibration: "{{ iif(trigger.event.data.calibration_trigger, now(), this.attributes.last_calibration)}}"
last_temperature_change: "{{ iif(trigger.event.data.change_trigger, now(), this.attributes.last_temperature_change)}}"
Hi All,
In a General Sense how would one go about try to achieve this task, using this blueprint, Based on the outdoor temperature of a Sensor, using the Upper Limit to decide the HVAC Entitys Mode Eg Heat for Below outside 20C and if above 20C then for the mode to switch to Auto/Cool.
Outside Temp Sensor is an Entity Sensor from the HVAC Unit self. which is not an issue, i can see there would be a possibility using ’ Custom Action’ under Custom settings section of the automation, i just dont know ENOUGH to figure this one out. any help is appreciated
Second this one.
The automation has to trigger at least once to pull data in. This is one of my sensors:
- trigger:
- platform: event
event_type: ahc_event
event_data:
automation: automation.en_suite_bathroom_heating #CHANGE YOUR AUTOMATION ENTITY-ID HERE
binary_sensor:
- name: "AHC En Suite Data" #SET A NAME FOR YOUR SENSOR
unique_id: AHC En Suite Data #SET A UNIQUE ID
state: "{{ trigger.event.data.state }}"
attributes:
mode: "{{ trigger.event.data.mode }}"
automation: "{{ trigger.event.data.automation }}"
is_person_defined: "{{ trigger.event.data.is_person_defined }}"
is_proximity_defined: "{{ trigger.event.data.is_proximity_defined }}"
is_anybody_home: "{{ trigger.event.data.is_anybody_home }}"
is_guest_mode: "{{ trigger.event.data.is_guest_mode }}"
active_scheduler: "{{ trigger.event.data.active_scheduler }}"
state_scheduler: "{{ trigger.event.data.state_scheduler }}"
state_presence_sensor: "{{ trigger.event.data.state_presence_sensor }}"
state_presence_scheduler: "{{ trigger.event.data.state_presence_scheduler }}"
state_presence: "{{ trigger.event.data.state_presence }}"
state_proximity_arrived: "{{ trigger.event.data.state_proximity_arrived }}"
state_proximity_way_home: "{{ trigger.event.data.state_proximity_way_home }}"
is_force_max_temperature: "{{ trigger.event.data.is_force_max_temperature }}"
active_party_entity: "{{ trigger.event.data.active_party_entity }}"
party_temp: "{{ trigger.event.data.party_temp }}"
is_away: "{{ trigger.event.data.is_away }}"
state_window: "{{ trigger.event.data.state_window }}"
is_frost_protection: "{{ trigger.event.data.is_frost_protection }}"
is_liming_protection: "{{ trigger.event.data.is_liming_protection }}"
state_outside_temp: "{{ trigger.event.data.state_outside_temp }}"
entry_time: "{{ trigger.event.data.entry_time }}"
hvac_mode: "{{ trigger.event.data.hvac_mode }}"
temperature_comfort: "{{ trigger.event.data.temperature_comfort }}"
temperature_eco: "{{ trigger.event.data.temperature_eco}}"
target_temperature: "{{ trigger.event.data.target_temperature}}"
set_max_temperature: "{{ trigger.event.data.set_max_temperature}}"
last_trigger_id: "{{ trigger.event.data.last_trigger_id}}"
last_calibration: "{{ iif(trigger.event.data.calibration_trigger, now(), this.attributes.last_calibration)}}"
last_temperature_change: "{{ iif(trigger.event.data.change_trigger, now(), this.attributes.last_temperature_change)}}"
and it’s currently showing
mode: comfort
automation: automation.en_suite_bathroom_heating
is_person_defined: true
is_proximity_defined: false
is_anybody_home: true
is_guest_mode: false
active_scheduler: null
state_scheduler: false
state_presence_sensor: true
state_presence_scheduler: true
state_presence: true
state_proximity_arrived: false
state_proximity_way_home: false
is_force_max_temperature: false
active_party_entity: null
party_temp: null
is_away: false
state_window: false
is_frost_protection: false
is_liming_protection: false
state_outside_temp: null
entry_time: ""
hvac_mode: "off"
temperature_comfort: 19
temperature_eco: 12
target_temperature: 19
set_max_temperature: false
last_trigger_id: calibration_sensor_change
last_calibration: "2025-09-12 07:39:48.664091+01:00"
last_temperature_change: "2025-05-17 08:57:52.807176+01:00"
icon: mdi:radiator
friendly_name: AHC En Suite Data
Make sure you have the automation name or id correct and make sure the automation is enabled, active and triggering.
I am still on V4 and want to Upgrade to V5 These days.
I was Wondering if the calibration is supported for Eve Thermostat as well?
These Thermostats Provide an Offset entity since last Updates
I have discovered a problem. When a window is open and a trigger is set during this time (e.g. outside temperature), the device switches on and does not switch to eco mode or remains off.
You were right. I’d set the ID wrong before. They’re working now.
So based on the below and my setup, the thermostat should be attempting to reach 22°C, however for some reason, it has set the target temperature on the TRV to 18°C.
I also noticed all of the template sensors mention “aggressive_mode” for the last Trigger ID, however aggressive mode is off.
EDIT: Think this is related to the new Tado API limits. As the app works fine but HASS is reporting Unavailable for a few of the TRV’s now. Will try migrate the entire setup to Homebridge so it’s local only. See if that works to avoid the Tado API.
Mode: comfort
Automation: automation.heating_8
Is person defined: true
Is proximity defined: true
Is anybody home: true
Is guest mode: false
Active scheduler: schedule.bedroom_rooms_schedule
State scheduler: true
State presence sensor: false
State presence scheduler: false
State presence: false
State proximity arrived: true
State proximity way home: false
Is force max temperature: false
Active party entity: Unknown
Party temp: Unknown
Is away: false
State window: false
Is frost protection: false
Is liming protection: false
State outside temp: true
Entry time
Thermostats: climate.front_living_room
Hvac mode: auto
Temperature comfort: 22
Temperature eco: 18
Target temperature: 22 °C
Set max temperature: false
Last trigger ID: aggressive_mode_above_temp_sensor_change
Last calibration: 15 September 2025 at 17:57:04
Last temperature change: 15 September 2025 at 18:41:34
Struggling to use this blueprint as it seems to be changing another room’s heating.
I’m controlling a thermostat via tuya integration, but the control seems to be getting reloaded:
trigger: event
event_type: automation_reloaded
id: temperature_change_reload
Changing a different thermostat! From logbook:
Main Bedroom Thermostat Zone changed to Heat triggered by automation Guest Bathroom Schedule triggered by event ‘automation_reloaded’
Any help would be very appreciated!