core: Missing entities in deconz intergration for open/close sensors
The problem
Hi, I have right now 104 devices running via deconz (2.22.00) in HA (2023.6.2). Today I just wanted to add another Aqara door/windows sensor which I’m already using a dozen times in the system. It was perfectly added to deconz as usual and then also appeard in HA, but unfortunately only the battery entity was created. Besides the temperature entity which I wouldn’t need anyway the OpenClose entity is missing. Also re-adding the sensor and restarting both systems didn’t help in any way. Therefore I also tried it with a second door/window sensor again with the same results, device is added but entites except battery are missing. Deconz shows the attributes of the sensor correctly, so they’re definitely nor broken and the integration in Deconz is working as usual.
Best, Tobias.
What version of Home Assistant Core has the issue?
core-2023.6.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
deconz
Link to integration documentation on our website
No response
Diagnostics information
config_entry-deconz-e86bc14e312a44759b0904797a28d317.json (1).txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2023-06-20 16:09:45.421 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up deconz platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 320, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/deconz/binary_sensor.py", line 221, in async_setup_entry
gateway.register_platform_add_device_callback(
File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 183, in register_platform_add_device_callback
async_add_device(EventType.ADDED, device_id)
File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 173, in async_add_device
add_device_callback(EventType.ADDED, device_id)
File "/usr/src/homeassistant/homeassistant/components/deconz/binary_sensor.py", line 216, in async_add_sensor
) or description.value_fn(sensor) is None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/deconz/binary_sensor.py", line 129, in <lambda>
value_fn=lambda device: device.open,
^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydeconz/models/sensor/open_close.py", line 28, in open
return self.raw["state"]["open"]
~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'open'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 31 (10 by maintainers)
Please open a PR, I much prefer that approach to do workarounds in all clients.