BenPru / luxtronik

Luxtronik integration for Home Assistant
MIT License
68 stars 23 forks source link

Errors in latest version #66

Closed SchumacherFM closed 1 year ago

SchumacherFM commented 1 year ago

Hello Ben,

I've got several errors with the latest Home Assistant 2023.1.4 / Frontend 20230110.0 - and latest code of your repo.

Below is the error log. If they are duplicates of some other tickets. Feel free to close this one.

Also it looks like that all sensor data is getting updated only after restart of HASS and then never again.

Thanks!

hass         | /config/custom_components/luxtronik2/climate.py:254: RuntimeWarning: coroutine 'LuxtronikThermostat._async_control_heating' was never awaited
hass         |   self._async_control_heating()
hass         | RuntimeWarning: Enable tracemalloc to get the object allocation traceback
hass         | 2023-01-15 20:19:11.705 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.luxtronik2_pump_frequency (<class 'custom_components.luxtronik2.sensor.LuxtronikSensor'>) is using native unit of measurement 'Hz' which is not a valid unit for the device class ('temperature') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
hass         | 2023-01-15 20:19:11.721 WARNING (MainThread) [Luxtronik.Parameters] Parameter 'Unknown_Parameter_1136' not found
hass         | 2023-01-15 20:19:11.730 WARNING (MainThread) [Luxtronik.Parameters] Parameter 'Unknown_Parameter_1137' not found
hass         | 2023-01-15 20:19:18.771 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform luxtronik2
hass         | Traceback (most recent call last):
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities
hass         |     await asyncio.gather(*tasks)
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 709, in _async_add_entity
hass         |     await entity.add_to_platform_finish()
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 804, in add_to_platform_finish
hass         |     self.async_write_ha_state()
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
hass         |     self._async_write_ha_state()
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
hass         |     state = self._stringify_state(available)
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
hass         |     if (state := self.state) is None:
hass         |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 855, in state
hass         |     value = self.native_value
hass         |   File "/config/custom_components/luxtronik2/sensor.py", line 835, in native_value
hass         |     return value if self._factor is None else round(value * self._factor, 2)
hass         | TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
hass         | 2023-01-15 20:19:18.789 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up luxtronik2 platform for sensor
hass         | Traceback (most recent call last):
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 297, in _async_setup_platform
hass         |     await asyncio.gather(*pending)
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities
hass         |     await asyncio.gather(*tasks)
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 709, in _async_add_entity
hass         |     await entity.add_to_platform_finish()
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 804, in add_to_platform_finish
hass         |     self.async_write_ha_state()
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
hass         |     self._async_write_ha_state()
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
hass         |     state = self._stringify_state(available)
hass         |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
hass         |     if (state := self.state) is None:
hass         |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 855, in state
hass         |     value = self.native_value
hass         |   File "/config/custom_components/luxtronik2/sensor.py", line 835, in native_value
hass         |     return value if self._factor is None else round(value * self._factor, 2)
hass         | TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

Additionally, some icons are missing ;-)

Screenshot 2023-01-15 at 20 37 27

BenPru commented 1 year ago

@SchumacherFM Thanks for your logs. That was very helpful. I think its fixed with 2023.01.15 The icons comes then this is a ha core integration.

SchumacherFM commented 1 year ago

thanks a lot!