'NORMAL' is not a valid CommunicationQualityService.State
beilm opened this issue · comments
Markus B commented
While reloading my HomeAssistant instance I got an error:
ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform bosch_shc
Traceback (most recent call last):
[...]
File "/custom_components/bosch_shc/sensor.py", line 371, in native_value
return self._device.communicationquality.name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/boschshcpy/models_impl.py", line 172, in communicationquality
return self._communicationquality_service.value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/boschshcpy/services_impl.py", line 769, in value
return self.State(self.state["quality"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
raise ve_exc
ValueError: 'NORMAL' is not a valid CommunicationQualityService.State
I tried to check current state in Postman for the device "PLUG_COMPACT" with the error:
{
"@type": "DeviceServiceData",
"id": "CommunicationQuality",
"deviceId": "hdm:ZigBee:[...]",
"state": {
"@type": "communicationQualityState",
"quality": "NORMAL"
},
"path": "/devices/hdm:ZigBee:[...]/services/CommunicationQuality"
}
Is it possible to add the state NORMAL?
Thomas Schamm commented
Thanks for reporting. Fixed in 5fb7f10