Hoover Air Purifier reporting non-integer literals causing sensor setup to crash · Issue #201 · gvigroux/hon · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a quick bug report I've noticed while trying to setup this fine integration. Unfortunately I'm running into an error since the values reported by hOn seem to be floats instead of the integers the code currently expects.
Here's the full error I get when trying to enable to integration:
Error while setting up hon platform for sensor: invalid literal for int() with base 10: '58.0'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/hon/sensor.py", line 85, in async_setup_entry
if device.has("humidityIndoor") and device.getInt("humidityIndoor") > 0:
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hon/device.py", line 66, in getInt
return int(self.get(item,0))
ValueError: invalid literal for int() with base 10: '58.0'
If you need any information from me, please feel free to ask. I am not entirely sure if you need more information than what the error provides, sorry about that!
The text was updated successfully, but these errors were encountered:
Update: I've gone and changed the device.getInt occurances in the relevant sections to device.getFloat which seems to fix my issue. Obviously I would love to get it fixed in the repository too though. I am not sure if there's a specific reason it's getInt currently, but that could be a fix if there's no specific reason.
Hey folks!
This is just a quick bug report I've noticed while trying to setup this fine integration. Unfortunately I'm running into an error since the values reported by hOn seem to be floats instead of the integers the code currently expects.
Here's the full error I get when trying to enable to integration:
If you need any information from me, please feel free to ask. I am not entirely sure if you need more information than what the error provides, sorry about that!
The text was updated successfully, but these errors were encountered: