Closed johntdyer closed 2 years ago
iaqualink documentation iaqualink source (message by IssueLinks)
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)
These errors are filling up my homeassistant log as well.
2022-08-16 16:45:42.264 ERROR (MainThread) [homeassistant.util.logging] 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: ''
2022-08-16 16:45:42.293 ERROR (MainThread) [homeassistant.util.logging] 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'
2022-08-16 16:45:42.303 ERROR (MainThread) [homeassistant.util.logging] 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'
2022-08-16 16:45:42.309 ERROR (MainThread) [homeassistant.util.logging] 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'
In my case there seem to be 4 instances of trying to cast a value that fail:
ValueError: could not convert string to float: ''
ValueError: could not convert string to float: 'absent'
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict'
I noticed something interesting when looking at the iAqualink entities - there were 4 entities that Home Assistant had "restored":
Those entities don't actually exist in my pool equipment. The number (4) of entities matches the number of distinct errors I was seeing in the logs. I disabled them in Home Assistant and the errors in the logs seem to have stopped.
This "fix" is probably just masking the underlying issue though.
Since updating to 2022.09.0b0 I am now getting the following error
2022-09-01 13:06:08.326 ERROR (MainThread) [homeassistant.util.logging] 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 533, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, 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)
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, 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'
2022-09-01 13:06:08.330 ERROR (MainThread) [homeassistant.util.logging] Exception in async_write_ha_state when dispatching 'iaqualink': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, 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'
The problem
I am constantly getting these errors, I think it has something to do w/ the temps they return when switching between pool mode and spa mode, since it only returns one temp at a time.
What version of Home Assistant Core has the issue?
Home Assistant 2022.7.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
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
Anything in the logs that might be useful for us?
Additional information
No response