šŸ”„ Advanced Heating Control

Will have a look into this later this day.

1 Like

look to post #1
Holiday is to switch between two different schedulers, what you mean is away/frost protection.
Winter means heating season => heating needed.
Party mode is a not so good term for ā€œsomeone manually changed tempā€.
Guest mode means not using presence.

Ideas for better naming and descriptions are welcome. Itā€™s nearly the hardest part at all. :rofl:

Only this blueprint with an external sensor

Could you check out and test again?

I also discovered that. It heats sometimes over the target temperature. Iā€™ll try to find a workaround in my blueprint (Automate your Bosch Thermostat 2). The blueprint from @panhans is a bit overkill for me anyhow :nerd_face:

1 Like

yes, I will test it the next days and come back with results :slight_smile:

1 Like

Here you go -

Off Instead Of Minimum Temperature enable but trv is idle

Could you share the number of the version you are using? Additional a trace log downloaded after executing the automation would be great. (See initial post)

Hi,
still trying to figure out why one of my Airzone climate entities is not getting triggered by the automation. When I read your answer I enabled splitting but for some reason the automation would no longer activate my heating system when I was expecting it to be, and I rolled that back. I have just enabled it again and reduced the service call spacing, hoping to see if by tuning the service call spacing, I get the results Iā€™m after.

In the mean time, I noticed something in the logs. In particular, ā€œhab_polā€ has triggered 140 occurrences this week and it is the climate entity preceding the entity that was originally not getting activated by the automation.

Logger: homeassistant.components.automation.automatic_heating_v4_hab_pol
Source: helpers/script.py:476
Integration: Automation (documentation, issues)
First occurred: January 28, 2024 at 6:31:10 AM (140 occurrences)
Last logged: 6:31:10 AM

Advanced Heating Control v4 - Airzone: Choose at step 4: default: If at step 1: If at step 1: If at step 2: Error executing script. Unexpected error for call_service at pos 1:
Advanced Heating Control v4 - Airzone: Choose at step 4: default: If at step 1: If at step 1: Error executing script. Unexpected error for if at pos 2:
Advanced Heating Control v4 - Airzone: Choose at step 4: default: If at step 1: Error executing script. Unexpected error for if at pos 1:
Advanced Heating Control v4 - Airzone: Choose at step 4: default: Error executing script. Unexpected error for if at pos 1:
Advanced Heating Control v4 - Airzone: Error executing script. Unexpected error for choose at pos 4:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 713, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 675, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 907, in entity_service_call
    raise result from None
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1497, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 731, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 224, in async_set_temperature
    await self._async_update_hvac_params(params)
  File "/usr/src/homeassistant/homeassistant/components/airzone/entity.py", line 203, in _async_update_hvac_params
    await self.coordinator.airzone.set_hvac_parameters(_params)
  File "/usr/local/lib/python3.11/site-packages/aioairzone/localapi.py", line 499, in set_hvac_parameters
    res = await self.put_hvac(params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioairzone/localapi.py", line 473, in put_hvac
    return await self.http_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioairzone/localapi.py", line 159, in http_request
    resp: ClientResponse = await self.aiohttp_session.request(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 500, in _request
    with timer:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 735, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError

Coincidentally, the climate entity that was not getting started by the automation was the last one in automation definition:

alias: Advanced Heating Control v4 - Airzone
description: ""
use_blueprint:
  path: panhans/heating_control_v4.yaml
  input:
    input_trvs:
      - climate.a_comedor
      - climate.a_h_jan
      - climate.a_h_noah
      - climate.a_h_pol
      - climate.a_h_suite

[CONFIG CONTINUES]

I just changed the order and left hab_pol as the last entity in that list. No idea if this means that hab_pol will be the last entity to be triggered by your automation, but if it is the case, any error from hab_pol crawling up during execution, wonā€™t have an impact on problematic entity ā€œh_suiteā€.

alias: Advanced Heating Control v4 - Airzone
description: ""
use_blueprint:
  path: panhans/heating_control_v4.yaml
  input:
    input_trvs:
      - climate.a_comedor
      - climate.a_h_jan
      - climate.a_h_noah
      - climate.a_h_pol
      - climate.a_h_suite

[CONFIG CONTINUES]

Even if changing the order might mitigate the issue and allow for the automation to activate the impacted entity, I think understanding this error message is important as it may help improve the blueprint and or the Airzone integration.

@panhans is there anything in that log error message that may lead to any conclusion? There clearly is a message suggesting a service_call failed
Error executing script. Unexpected error for call_service at pos 1:

Iā€™m crossing my fingers hoping the reduced spacing in the service call split option is the way anyway.

Hi @panhans, I set up the ref version again for aqara thermostat. It seems that its running without issues so far. Great!! I also set up a version with two bosch thermostats in one room with v4 beta6 which also works as expected. One more question about the automation: If I not fill in minimum and maximum static temperature I be able to set up temperature by myself in UI or manual right? best regards!

Looks to me the REST api behind your integration returns an HTTP error.
The order of the trvs has no impact. Try to disable all automations, navigate to dev tools and try to set the hvac mode of your climate using a service call and look if the error occurs again.
I donā€™t think its blueprint dependent. But a trace log whe error occurs is always welcome but be sure the trace you share results in that error.

Did calibration of the bosch trvs works out of the box or didnā€™t you check the calibration?

If you want to adjust the comfort temperature in the ui you have to go with a helper. I personally just use a helper for comfort temperature. The one for minimum was requested by someone.

After a while it seems calibration does not work as expected. If I was running automation first everything looks nice. But now the calibration does not work correctly. You can see it below ā€žHeizungā€œ in the cards. On the left side there is calibrated temperature on thermostat and on the right side target temperature. First screenshot is Bosch with two thermostats in one room, second one aqara.


Whats exactly wrong? Target is 19Ā°C, right? Room temperature 19.9Ā°C and vavles are nearly closed. Donā€™t forget heating systems are some kind of sluggish. The radiator is still hot when target is reached, the valve closes but the room still heats up a little until it holds the temperature level stable.

//Edit: the values of the number entities for calibration would be interesting

Yes, but should the calibrated temperature in thermostat after offset calibration not should be the same (or nearly the same) as room temperature?

Values: I am just a litte noob, could you explain how to find out?

This is what z2m shows for states:
{
ā€œbatteryā€: 100,
ā€œboostā€: ā€œOFFā€,
ā€œchild_lockā€: ā€œUNLOCKā€,
ā€œdisplay_brightnessā€: 7,
ā€œdisplay_ontimeā€: 10,
ā€œdisplay_orientationā€: ā€œnormalā€,
ā€œdisplayed_temperatureā€: ā€œmeasuredā€,
ā€œlinkqualityā€: 255,
ā€œlocal_temperatureā€: 19.5,
ā€œlocal_temperature_calibrationā€: -1,
ā€œoccupied_heating_setpointā€: 19,
ā€œpi_heating_demandā€: 85,
ā€œremote_temperatureā€: 0,
ā€œrunning_stateā€: ā€œheatā€,
ā€œsetpoint_change_sourceā€: ā€œexternallyā€,
ā€œsystem_modeā€: ā€œheatā€,
ā€œupdateā€: {
ā€œinstalled_versionā€: 889787668,
ā€œlatest_versionā€: 889787668,
ā€œstateā€: ā€œidleā€
},
ā€œvalve_adapt_processā€: false,
ā€œvalve_adapt_statusā€: ā€œsuccessā€,
ā€œwindow_openā€: ā€œOFFā€,
ā€œupdate_availableā€: null
}

It seems the calibration only allow full rounded values. So you always have a delta of +/- 0.5Ā°C.

//EDIT: but youā€™re may right my calibration also doenst work as expected. seems in the refactored version is a little bug.

Maybe a hint. But Bosch also allow 0,1 steps. But I used the option force to full rounding in blueprint. I now deactivated it and will see if it has an impact. (For Bosch setup I use v4 beta6)

But there seems to be an issue with calibrating in ref version (I test it with aqara setup). Room temperature is 17,9, target temperature 19 and calibration says 19,1 so its not really heating. If you want to have a look, heres the trace log: be202f70 - SyntaxError: JSON.parse: unterminated string at line 717 column 70 of the JSON...

Could you reimport the refactored blueprint, please? There was a comment in the version before that result in a faulty trace log.

As I understand the aqara and bosch gets calibrated by just set the current temperature in its number entity. So there is no calculation needed.

What I donā€™t get is that calibration of the bosch work. I never implemented this. Are you sure the calibration of the bosch thermostats isnā€™t be done by another integration / blueprint?

You could enable debuging by adding some lines in you configuration.yaml (exxplained initial post). Then youā€™ve got some more logging information including the values when calibration got set.

//EDIT: The bosch should work like mine :smiley: also should work with previous versions.