home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.81k stars 30.51k forks source link

Issues with iAqualink Integration #75372

Closed 951ryan closed 2 years ago

951ryan commented 2 years ago

The problem

Logger: homeassistant.util.logging Source: util/logging.py:116 First occurred: 10:56:16 AM (4 occurrences) Last logged: 10:56:16 AM

Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 281, in state_attributes self.target_temperature, File "/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py", line 105, in target_temperature return float(self.dev.state) ValueError: could not convert string to float: '' Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value return int(self.dev.state) ValueError: invalid literal for int() with base 10: 'absent' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 388, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 54, in native_value return float(self.dev.state) ValueError: could not convert string to float: 'absent' Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 388, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value return int(self.dev.state) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list' Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 388, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value return int(self.dev.state) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict'

Host Operating System Home Assistant OS 8.2 Supervisor Version supervisor-2022.07.0 Version core-2022.7.5 Installation Type Home Assistant OS Python Version 3.10.5 Operating System Version 5.15.45

What version of Home Assistant Core has the issue?

core-2022.7.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

iAqualink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/iaqualink/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

iaqualink documentation iaqualink source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @flz, mind taking a look at this issue as it has been labeled with an integration (iaqualink) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

markus99 commented 2 years ago

Seeing some of the same issues after upgrading to 2022.7.5:

Logger: homeassistant.util.logging
Source: util/logging.py:116
First occurred: 11:32:47 AM (56 occurrences)
Last logged: 11:39:17 AM

Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 281, in state_attributes self.target_temperature, File "/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py", line 105, in target_temperature return float(self.dev.state) ValueError: could not convert string to float: ''
Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value return int(self.dev.state) ValueError: invalid literal for int() with base 10: 'absent' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 388, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 54, in native_value return float(self.dev.state) ValueError: could not convert string to float: 'absent'
Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 388, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value return int(self.dev.state) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
Exception in async_write_ha_state when dispatching 'iaqualink': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 388, in state value = self.native_value File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value return int(self.dev.state) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict'

As well as:

Logger: homeassistant.components.sensor
Source: components/iaqualink/sensor.py:54
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 11:32:29 AM (2 occurrences)
Last logged: 11:32:29 AM

Error adding entities for domain sensor with platform iaqualink
Error while setting up iaqualink platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 52, in native_value
    return int(self.dev.state)
ValueError: invalid literal for int() with base 10: 'absent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 641, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 776, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 388, in state
    value = self.native_value
  File "/usr/src/homeassistant/homeassistant/components/iaqualink/sensor.py", line 54, in native_value
    return float(self.dev.state)
ValueError: could not convert string to float: 'absent'

and

Logger: homeassistant.components.climate
Source: components/iaqualink/climate.py:105
Integration: Climate ([documentation](https://www.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22))
First occurred: 11:32:16 AM (2 occurrences)
Last logged: 11:32:16 AM

Error adding entities for domain climate with platform iaqualink
Error while setting up iaqualink platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 641, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 776, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 281, in state_attributes
    self.target_temperature,
  File "/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py", line 105, in target_temperature
    return float(self.dev.state)
ValueError: could not convert string to float: ''
johntdyer commented 2 years ago

this is still happening

https://github.com/home-assistant/core/issues/75277