kamaradclimber / heishamon-homeassistant

An integration for heatpumps handled by heishamon
Apache License 2.0
42 stars 22 forks source link

Exception in target_temperature_message_received #250

Open wltng opened 4 days ago

wltng commented 4 days ago

Every 5 minutes I get the following error message in the HA log:

2024-09-13 12:13:12.508 ERROR (MainThread) [homeassistant.components.mqtt.client] Exception in target_temperature_message_received when handling msg on 'panasonic_heat_pump/main/Z1_Heat_Request_Temp': '0'
Traceback (most recent call last):
File "/config/custom_components/aquarea/climate.py", line 357, in target_temperature_message_received
if self._attr_min_temp != None and self._attr_max_temp != None:
^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HeishaMonZoneClimate' object has no attribute '__attr_min_temp'. Did you mean: '_attr_min_temp'?

Using latest versions:

My Pana is set to external thermostat, so the provided climate entity cannot control the temperature.

Trying to change the temperature (which isn't possible when using external thermostat) results in:

2024-09-14 11:01:04.611 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139878762276336] Provided temperature 0.0 is not valid. Accepted range is 7 to 35
2024-09-14 11:01:11.020 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139878762276336] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 951, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/config/custom_components/aquarea/climate.py", line 263, in async_set_temperature
raise Exception(f"Unknown climate mode: {self._mode}")
Exception: Unknown climate mode: ZoneTemperatureMode.NAN`

Current attributes of the climate entity are:

hvac_modes: heat, off
min_temp: 7 
max_temp: 35 
current_temperature: 16 
temperature: 0 
friendly_name: Aquarea Zone 1 climate 
supported_features: 385
kamaradclimber commented 4 days ago

Hello,

thanks for reporting an issue. I'm really puzzled by this report:

:thinking:

kamaradclimber commented 4 days ago

https://github.com/kamaradclimber/heishamon-homeassistant/pull/251 will fix the second issue by disabling temperature set when heatpump is in external thermostat mode.

wltng commented 4 days ago

Thanks for your quick response.

In HACS it shows I have 1.13.0, when I go to Settings -> Devices and Services -> HeishaMon, I see 1.4.1

image

Maybe a removing and reinstalling would be the best option. I will check the new version and report back

wltng commented 4 days ago

I removed the intgration completely (aquarea folder in custom_components was gone) and reinstalled from scratch. With the new version 1.13.1 the errors no longer appear in the logs! The version number is however still 1.4.1 in the Settings page

kamaradclimber commented 4 days ago

Good catch, it seems the version of the integration there is taken from the manifest file while hacs uses the github release title.

wltng commented 2 days ago

For 2 days I haven't seen the error in the logs, but today I restarted HA, and somehow the same error has returned. The line is different now:

2024-09-16 16:43:20.238 ERROR (MainThread) [homeassistant.components.mqtt.client] Exception in target_temperature_message_received when handling msg on 'panasonic_heat_pump/main/Z1_Heat_Request_Temp': '0'
Traceback (most recent call last):
File "/config/custom_components/aquarea/climate.py", line 362, in target_temperature_message_received
if self._attr_min_temp != None and self._attr_max_temp != None:
^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HeishaMonZoneClimate' object has no attribute '__attr_min_temp'. Did you mean: '_attr_min_temp'?
kamaradclimber commented 1 day ago

For now, I cannot reproduce which is very frustrating 😓

wltng commented 1 day ago

Is there anything I can supply to help? If I change the system to internal thermostat the problem is gone immediately.

There is now also an additional warning (that was fixed in the previous update I think) [HEAT] Target temperature is not within expected range, this is suspicious. 0.0 should be within [10,30]

EDIT: The warning seems to have gone after a reboot of the HA system