thomasgermain / vaillant-component

Multimatic integration for Home Assistant (also compatible with sensoAPP)
MIT License
135 stars 24 forks source link

climate.control_dhw and water_heater.control_dhw entities unavailable without circulation time program #238

Closed Lotsofblah closed 8 months ago

Lotsofblah commented 8 months ago

Setup: EcoTec Plus 435, VRC720f, VR921. No secondary circulation pump.

If I delete the circulation pump times in SensoAPP then climate.control_dhw and water_heater.control_dhw entities become unavailable. “This entity is no longer being provided by the multimatic integration. If the entity is no longer in use, delete in in settings“.

If I create a time program for the secondary circulation pump (which must be every day) then the two entities above re-appear.

thomasgermain commented 8 months ago

Any error in the logs ? Which version of the integration are you running ?

Lotsofblah commented 8 months ago

I am seeing this in v1.16.2 & v1.16.1. I has seen similar, water_heater only, behaviour in v1.15.x. Please let me know if the log excerpt below is not enough and you need full debug logs.
I am also seeing other issues related to climate.control_dhw; do you want another issues opened, or added to this issue? Thanks!

`This error originated from a custom integration.

Logger: custom_components.multimatic.coordinator Source: helpers/update_coordinator.py:290 Integration: Multimatic (documentation, issues) First occurred: 16:34:09 (6 occurrences) Last logged: 16:36:12

Unexpected error fetching multimatic_dhw data: cannot access local variable 'time_program_day' where it is not associated with a value Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/multimatic/coordinator.py", line 569, in _fetch_data_if_needed return await self._fetch_data() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/multimatic/coordinator.py", line 561, in _fetch_data return await getattr(self.api, self._method)() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/multimatic/coordinator.py", line 129, in get_dhw dhw = await self._manager.get_dhw() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 43, in wrapper return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 346, in get_dhw return mapper.map_dhw(dhw) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/model/mapper.py", line 474, in map_dhw circulation = map_circulation_from_dhw(dhw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/model/mapper.py", line 491, in map_circulation_from_dhw return _map_circulation(circulation, dhw_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/model/mapper.py", line 615, in _map_circulation func = _map_function(raw_circulation, "setting") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/model/mapper.py", line 423, in _map_function time_program = map_time_program(raw.get("timeprogram"), tp_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/model/mapper.py", line 215, in map_time_program result[day_of_week] = map_time_program_day(raw_time_program.get(day_of_week), key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymultimatic/model/mapper.py", line 249, in map_time_program_day return time_program_day ^^^^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'time_program_day' where it is not associated with a value `

thomasgermain commented 8 months ago

Could you explain what do you mean by "delete the circulation pump times" ? Could you show me the actual time program ?

Lotsofblah commented 8 months ago

Currently I have the non-existent circulation pump set to run from 00:00 to 00:10 every day. With this circulation time program I have climate.control_dhw and water_heater.control_dhw entities. IMG_3621

If I delete this time programme from each day, so that there is no circulation pump time program then both entities are unavailable. To delete I select each of the daily circulation time program, then select ‘Delete this time period’. IMG_3622

The result is no time periods for the circulation pump. IMG_3626

thomasgermain commented 8 months ago

Release https://github.com/thomasgermain/vaillant-component/releases/tag/1.16.3 should fix the issue.

Please, let me know if it works

Lotsofblah commented 8 months ago

Hi. This resolve my issue. Thank you for working this so quickly.