ha-dyson
ha-dyson copied to clipboard
ValueError in log file
This probably initiates from the libdyson itself but as Home Assistant logs this on Dyson Local, I'll report it here:
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 519, in async_update_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 "/config/custom_components/dyson_local/utils.py", line 18, in __get__
value = super().__get__(obj, type)
File "/config/custom_components/dyson_local/sensor.py", line 337, in state
return self._device.formaldehyde
File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_pure_humidify_cool.py", line 110, in formaldehyde
return int(self._get_environmental_field_value("hcho"))
File "/usr/local/lib/python3.9/site-packages/libdyson/dyson_device.py", line 292, in _get_environmental_field_value
return int(value)
ValueError: invalid literal for int() with base 10: 'NONE'
HASS 2022.4.2 Dyson Local v0.16.4-4 libdyson 0.8.11 (based on Dyson Local installation log) The error message bundle comes every 30 seconds so I assume on every state poll of the device.
It seems like Dyson-local is asking your Dyson pure humidify+cool for formaldehyde readings while it doesn't support it. It's a bug with my experimental formaldehyde sensor. It should be fixed by the next release.
It seems like Dyson-local is asking your Dyson pure humidify+cool for formaldehyde readings while it doesn't support it. It's a bug with my experimental formaldehyde sensor. It should be fixed by the next release.
Developer Tools -view seems to confirm this:
sensor.purifier_humidify_cool_formaldehyde_formaldehyde unavailable
Purifier Humidify+Cool Formaldehyde Formaldehyde
So this would link the unavailable formaldehyde reading to my 358E device
FYI @Kakise I have this device which on getdevices.py identifies as 358E which in libdyson is configured to be Purifier Humidify+Cool Formaldehyde My device is not a formaldehyde-version like PH04. The model numbering scheme on Dyson web pages is a bit messy but I think my device is PH3A