Closed Kjellosan closed 9 months ago
Do you have an installation on Thermia Online that is offline? I had my Danfoss unit replaced and therefor had to add a new installation on Thermia Online. Since there's no way to delete an installation on Thermia Online the old installation was still there as offline.
Up until version 2.18 everything worked fine but after the update all my sensors (except the heat pump itself) was listed as "unavailable") . After reinstalling the integration none of sensors got listed. I called Thermia customer support and got them to delete my old installation. I then reinstalled the integration and all the sensors got listed as expected.
However, I still get an error when trying to set "operation mode".
@Kjellosan please check if you still have issues with the latest version. Also, can you control everything without issues at Thermia Online website?
Hi, I got the same problem. Also tried to reinstall. Classic model (Diplomat/Diplomat Duo). The thermia website works fine.
I ran example.py and got following: `Enter api type (1 = classic, 2 = genesis): 1 Connected: True Creating debug file Debug file created
All available register groups: ['REG_GROUP_OPERATIONAL_OPERATION', 'REG_GROUP_OPERATIONAL_STATUS', 'REG_GROUP_TEMPERATURES', 'REG_GROUP_OPERATIONAL_TIME', 'REG_GROUP_HEATING_CURVE', 'REG_GROUP_HEAT_PUMP', 'REG_GROUP_HEATING_CURVE2', 'REG_GROUP_HOT_WATER', 'REG_GROUP_IMMERSION_HEATER', 'REG_GROUP_SOFTWARE_VERSIONS', 'REG_GROUP_CALIBRATION'] Available registers for 'REG_GROUP_HEATING_CURVE' group: ['REG_HEATING_HEAT_CURVE', 'REG_HEATING_HEAT_CURVE_MIN', 'REG_HEATING_HEAT_CURVE_MAX', 'REG_HEATING_CURVE_PLUS5', 'REG_HEATING_CURVE_0', 'REG_CURVE_MINUS_5', 'REG_HEATING_STOP', 'REG_ROOM_FACTOR']
Other temperatures Supply Line Temperature: 25 Desired Supply Line Temperature: 21 Return Line Temperature: 21 Brine Out Temperature: 19 Brine In Temperature: 20 Cooling Tank Temperature: None Cooling Supply Line Temperature: None
Operational status
Traceback (most recent call last):
File "example.py", line 67, in
Trying to attach debug.txt, getting an error. debug.txt on dropbox
Not sure if same issue, but after restarting my integration failed with the following errors:
homeassistant | 2023-04-21T15:05:49.316172265Z 2023-04-21 17:05:49.311 DEBUG (MainThread) [custom_components.thermia] Finished fetching thermia data in 2.284 seconds (success: True)
homeassistant | 2023-04-21T15:05:50.160746468Z 2023-04-21 17:05:50.154 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up thermia platform for sensor
homeassistant | 2023-04-21T15:05:50.160913669Z Traceback (most recent call last):
homeassistant | 2023-04-21T15:05:50.160954632Z File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
homeassistant | 2023-04-21T15:05:50.161055723Z await asyncio.shield(task)
homeassistant | 2023-04-21T15:05:50.161081167Z File "/config/custom_components/thermia/sensor.py", line 227, in async_setup_entry
homeassistant | 2023-04-21T15:05:50.161102093Z if heat_pump.operational_status is not None:
homeassistant | 2023-04-21T15:05:50.161121740Z File "/usr/local/lib/python3.10/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 622, in operational_status
homeassistant | 2023-04-21T15:05:50.161142203Z return current_operation_mode[0]
homeassistant | 2023-04-21T15:05:50.161161758Z IndexError: list index out of range
homeassistant | 2023-04-21T15:05:50.167268559Z 2023-04-21 17:05:50.163 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform thermia
homeassistant | 2023-04-21T15:05:50.167375465Z Traceback (most recent call last):
homeassistant | 2023-04-21T15:05:50.167401057Z File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
homeassistant | 2023-04-21T15:05:50.167423927Z await asyncio.gather(*tasks)
homeassistant | 2023-04-21T15:05:50.167445390Z File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
homeassistant | 2023-04-21T15:05:50.167636053Z await entity.add_to_platform_finish()
homeassistant | 2023-04-21T15:05:50.167664886Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 823, in add_to_platform_finish
homeassistant | 2023-04-21T15:05:50.167686590Z self.async_write_ha_state()
homeassistant | 2023-04-21T15:05:50.167707497Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 568, in async_write_ha_state
homeassistant | 2023-04-21T15:05:50.167728534Z self._async_write_ha_state()
homeassistant | 2023-04-21T15:05:50.167749848Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 632, in _async_write_ha_state
homeassistant | 2023-04-21T15:05:50.167771200Z state = self._stringify_state(available)
homeassistant | 2023-04-21T15:05:50.167792347Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _stringify_state
homeassistant | 2023-04-21T15:05:50.167813569Z if (state := self.state) is None:
homeassistant | 2023-04-21T15:05:50.167944123Z File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 211, in state
homeassistant | 2023-04-21T15:05:50.168021270Z if (is_on := self.is_on) is None:
homeassistant | 2023-04-21T15:05:50.168177842Z File "/config/custom_components/thermia/binary_sensors/operational_status_binary_sensor.py", line 76, in is_on
homeassistant | 2023-04-21T15:05:50.168889720Z ].operational_status
homeassistant | 2023-04-21T15:05:50.169009719Z File "/usr/local/lib/python3.10/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 622, in operational_status
homeassistant | 2023-04-21T15:05:50.169042515Z return current_operation_mode[0]
homeassistant | 2023-04-21T15:05:50.169913539Z IndexError: list index out of range
homeassistant | 2023-04-21T15:05:50.172460761Z 2023-04-21 17:05:50.170 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up thermia platform for binary_sensor
homeassistant | 2023-04-21T15:05:50.172563963Z Traceback (most recent call last):
homeassistant | 2023-04-21T15:05:50.172658073Z File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 312, in _async_setup_platform
homeassistant | 2023-04-21T15:05:50.172684758Z await asyncio.gather(*pending)
homeassistant | 2023-04-21T15:05:50.172706128Z File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
homeassistant | 2023-04-21T15:05:50.172728480Z await asyncio.gather(*tasks)
homeassistant | 2023-04-21T15:05:50.172750664Z File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
homeassistant | 2023-04-21T15:05:50.172772923Z await entity.add_to_platform_finish()
homeassistant | 2023-04-21T15:05:50.172794534Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 823, in add_to_platform_finish
homeassistant | 2023-04-21T15:05:50.172816293Z self.async_write_ha_state()
homeassistant | 2023-04-21T15:05:50.172837311Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 568, in async_write_ha_state
homeassistant | 2023-04-21T15:05:50.172859052Z self._async_write_ha_state()
homeassistant | 2023-04-21T15:05:50.172879718Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 632, in _async_write_ha_state
homeassistant | 2023-04-21T15:05:50.172901144Z state = self._stringify_state(available)
homeassistant | 2023-04-21T15:05:50.172922329Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _stringify_state
homeassistant | 2023-04-21T15:05:50.172943977Z if (state := self.state) is None:
homeassistant | 2023-04-21T15:05:50.172965143Z File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 211, in state
homeassistant | 2023-04-21T15:05:50.172992587Z if (is_on := self.is_on) is None:
homeassistant | 2023-04-21T15:05:50.173014050Z File "/config/custom_components/thermia/binary_sensors/operational_status_binary_sensor.py", line 76, in is_on
homeassistant | 2023-04-21T15:05:50.173035994Z ].operational_status
homeassistant | 2023-04-21T15:05:50.173057308Z File "/usr/local/lib/python3.10/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 622, in operational_status
homeassistant | 2023-04-21T15:05:50.173079419Z return current_operation_mode[0]
homeassistant | 2023-04-21T15:05:50.173100474Z IndexError: list index out of range
Mine is working again - not sure why. Noticed it after I rebooted the system, but not sure if that was the reason or it did so earlier.
Still doesn't work for me
So, got the issue again. Looks like it is a combination of two things: 1) Thermia Online has issues:
2) The integration fails when creating sensors (but water_heater entity works for automation purposes). Could look like it is because of the operational status ("-").
I attempted fixing it with the latest release 3.1.1.
Thanks! It appears stable for both pumps we have it running for - will let you know if any issues pop up.
I have got messages:Object water_heater.thermia 2875893 unavailable
I have got messages: Object water_heater.thermia 2875893 unavailable Object sensor.none_active_alarms unavailable. My pump is Thermia Diplomat
Mine has been stable since the update (I manually deleted a bunch of sensors with the "none_" prefix).
Seems like Thermia still has issues with their operational statuses (still just "-").
For me operational status is unkonown
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state numerical_value = int(value) ValueError: invalid literal for int() with base 10: 'RADIATORPUMP'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.hem_operational_status has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: RADIATORPUMP (<class 'str'>)
Updated to HA 2023.5.2 and Operating System 10.1 this morning and now i have the same issue as eljobo. Never had any problems before that. I have a Thermia Diplomat Inverter (genesis). I run 3.1.1 of ha-thermia-heat-pump-integration
Operational Status state: unavailable
2023-05-12 14:49:23.407 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state numerical_value = int(value) ValueError: invalid literal for int() with base 10: 'IDLE' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 406, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.hem_operational_status has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: IDLE ()
Also have some issues. Mostly Operational status.
Logger: homeassistant.components.sensor Source: components/sensor/init.py:583 Integration: Sensor (documentation, issues) First occurred: 14:02:22 (2 occurrences) Last logged: 14:02:22
Error adding entities for domain sensor with platform thermia Error while setting up thermia platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state numerical_value = int(value) ValueError: invalid literal for int() with base 10: 'STATUS_NO_DEMAND'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.hossna_109_operational_status has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: STATUS_NO_DEMAND (<class 'str'>)
Same issues with "Operational status" all the other functions work.
Logger: homeassistant.components.sensor Source: components/sensor/init.py:583 Integration: Sensor (documentation, issues) First occurred: 12:28:27 (2 occurrences) Last logged: 12:28:27
Error adding entities for domain sensor with platform thermia Error while setting up thermia platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state numerical_value = int(value) ValueError: invalid literal for int() with base 10: 'STATUS_PASSIVE_COOL'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.q_operational_status has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: STATUS_PASSIVE_COOL (<class 'str'>)
I've got similar issues after recently installing the integration. Operational Status is always unknown. Heating and Hot Water status often show unknown and then, randomly, show the correct status ON/OFF.
Any plans to fix these issues?
Hi! Sorry for the long delay! What are you using the operational status for? As far as I can tell, Thermia is now not returning a valid value for Operational status, or can you see anything that makes sense on the Thermia Online website?
Can you use operation status state to get the current state as well, or is this something completely different for your heat pumps?
Thanks for the reply. Yes you’re absolutely correct that the operational status is not shown online. I was hoping it would show what status the heat pump was in but it seems this isn’t shown online.
Just tested with one of the pumps I have access to: It also showed "-" before I turned it on.
@effinamon do you also have no status in Home Assistant when you have "Running" status in online?
This is the different statuses for me when I go to https://www.online-genesis.thermia.se/details It's in swedish
@effinamon do you also have no status in Home Assistant when you have "Running" status in online?
Also no status ("unknown").
Please update to the latest release and check status - it should be fixed now and not show "unknown" anymore.
Thanks now working perfectly 👍😊
Updated to 3.3.0 but i cant test since i get this
2024-01-08 12:13:34.647 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Thermia (***username***) for thermia Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/thermia/__init__.py", line 38, in async_setup_entry thermia = await hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/thermia/__init__.py", line 39, in <lambda> lambda: Thermia(username, password, api_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ThermiaOnlineAPI/__init__.py", line 17, in __init__ self.heat_pumps = self.fetch_heat_pumps() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ThermiaOnlineAPI/__init__.py", line 24, in fetch_heat_pumps heat_pumps.append(ThermiaHeatPump(device, self.api_interface)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 89, in __init__ self.update_data() File "/usr/local/lib/python3.11/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 126, in update_data self.__running_operational_statuses = self.__get_running_operational_statuses() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 485, in __get_running_operational_statuses current_operation_mode = [ ^ File "/usr/local/lib/python3.11/site-packages/ThermiaOnlineAPI/model/HeatPump.py", line 486, in <listcomp> value.name AttributeError: 'dict' object has no attribute 'name'
Closing this as it should be working as expected now. In regards to the issue @ReconOperator reported, please update to the latest 3.3.1
version and if there are still issues, report them in #69.
If there are still issues with the "unknown" status, please create a new issue.
Have been using this for a while and it has worked fine. However a while ago the integration failed. I had to delete the integraton and reinstall it but now I only have one entity: The water heater. What have changed? I used to see most of the stats on the heat pump.
I log in to the classic api and have a Thermia Diplomat TW6.