@clj-reactor could you exactly how the “solution” solved your problem?
I was recently forced back to deconz in docker on my main host (for reasons I can’t explain).
Most things work fine, all lights, all remotes, all door/window sensors. But only a few of the other types of sensors seem to work. That is, they work fine in Phoscon, I can see them, they update their state as expected, but they just don’t work in HA. Some never show up, others just show as “unavailable” even when they update fine in Phoscon:
HA:
Phoscon:
Like you, I can of course also see them in the deconz UI making connections.
In the HA logs, I see this:
2022-11-07 15:39:11.642 DEBUG (MainThread) [pydeconz.websocket] {"config":{"battery":100,"offset":0,"on":true,"reachable":true},"e":"changed","id":"55","r":"sensors","t":"event","uniqueid":"00:15:8d:00:02:43:78:97-01-0405"}
2022-11-07 15:39:11.644 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"56","lastannounced":null,"lastseen":"2022-11-07T14:39Z","manufacturername":"LUMI","modelid":"lumi.weather","name":"Kitchen Multi Sensor","swversion":"20161129","type":"ZHATemperature","uniqueid":"00:15:8d:00:02:43:78:97-01-0402"},"e":"changed","id":"56","r":"sensors","t":"event","uniqueid":"00:15:8d:00:02:43:78:97-01-0402"}
2022-11-07 15:39:11.647 DEBUG (MainThread) [pydeconz.websocket] {"config":{"battery":100,"offset":0,"on":true,"reachable":true},"e":"changed","id":"56","r":"sensors","t":"event","uniqueid":"00:15:8d:00:02:43:78:97-01-0402"}
2022-11-07 15:39:11.649 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"57","lastannounced":null,"lastseen":"2022-11-07T14:39Z","manufacturername":"LUMI","modelid":"lumi.weather","name":"Kitchen Multi Sensor","swversion":"20161129","type":"ZHAPressure","uniqueid":"00:15:8d:00:02:43:78:97-01-0403"},"e":"changed","id":"57","r":"sensors","t":"event","uniqueid":"00:15:8d:00:02:43:78:97-01-0403"}
2022-11-07 15:39:11.654 DEBUG (MainThread) [pydeconz.websocket] {"config":{"battery":100,"offset":0,"on":true,"reachable":true},"e":"changed","id":"57","r":"sensors","t":"event","uniqueid":"00:15:8d:00:02:43:78:97-01-0403"}
So it seems like HA should see it?
I also see this error; it didn't look immediately relevant (since it mentions `light_level`, which is not included in the sensor in question) but I'll include just in case.
Logger: homeassistant.components.sensor
Source: components/deconz/sensor.py:158
Integration: Sensor (documentation, issues)
First occurred: 15:36:47 (1 occurrences)
Last logged: 15:36:47
Error while setting up deconz platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/deconz/sensor.py", line 300, in async_setup_entry
gateway.register_platform_add_device_callback(
File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 173, in register_platform_add_device_callback
async_add_device(EventType.ADDED, device_id)
File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 163, in async_add_device
add_device_callback(EventType.ADDED, device_id)
File "/usr/src/homeassistant/homeassistant/components/deconz/sensor.py", line 271, in async_add_sensor
if description.value_fn(sensor) is None:
File "/usr/src/homeassistant/homeassistant/components/deconz/sensor.py", line 158, in <lambda>
value_fn=lambda device: device.scaled_light_level,
File "/usr/local/lib/python3.10/site-packages/pydeconz/models/sensor/light_level.py", line 57, in scaled_light_level
return round(math.pow(10, (self.light_level - 1) / 10000), 1)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'