Update for sensor.wohnzimmer_iaq_level fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: 'Good'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
await coro
File "/config/custom_components/iaquk/sensor.py", line 102, in async_update
if self.state == LEVEL_EXCELLENT
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state
raise ValueError(
ValueError: Sensor sensor.wohnzimmer_iaq_level has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: Good (<class 'str'>)
Environment
Describe the bug
Air Quality Level Sensor always Unknown: Index Sensor is working.
Configuration.yaml
Steps to Reproduce
Expected behavior
Debug log
Update for sensor.wohnzimmer_iaq_level fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state numerical_value = int(value) ValueError: invalid literal for int() with base 10: 'Good'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update await coro File "/config/custom_components/iaquk/sensor.py", line 102, in async_update if self.state == LEVEL_EXCELLENT File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state raise ValueError( ValueError: Sensor sensor.wohnzimmer_iaq_level has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: Good (<class 'str'>)
Additional context