-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiami/Aqara door/window sensor mistakenly detected as switch #31589
Comments
This might be also related to #31592 (I'm having that issue too) |
Enable debug logging in
Remove the device from zha config panel -> pick the device -> remove the device, click on the device button a few times with 1s interval. Refresh page to doublecheck the device and entities are gone. Raw zigpy device has cluster id |
Hey there @dmulcahey, mind taking a look at this issue as its been labeled with a integration ( |
could be related to #31592 |
Why should an input cluster be wrong in this case? It is a sensor sending data. I have another Aqara sensor too exposing input clusters for reading temperature, pressure and humidity. Am I missing something?
I'll try the workaround in #31592 in the meantime and get back to you later today with the logs. |
After a reboot, does Xiaomi device shows model and manufacturer? If either of those are Unknown, then I strongly suspect the problem is with zigpy. Let me know if the workaround works then can skip the logs |
Yes, that was the case: both unknown. And the workaround worked for the door sensor: it correctly restores both battery status and on/off binary sensor. Also manufacturer and model were correctly loaded. |
Well, for that kind of sensor, it was supposed to be an IAS Zone cluster. |
Ok I see your point. Should we keep this issue open then? Should I open an issue to zigpy? And if so, what should I tell them? |
open one in zigpy and link this issue there too. |
I mean issue related to manufacturer info being lost. |
Opened zigpy/zigpy#289. I'm keeping this one open until zigpy publishes a fix. Thanks for the help @Adminiuga! |
The problem
I have a Xiaomi/Aqara door/window sensor that I can use with a ConBee II USB stick.
Joining procedure goes fine, but I notice that the OnOff cluster is detected as an output cluster. If I understand ZigBee correctly, output clusters are used for controlling a device, whereas input clusters are used to receive information and data from a device.
Anyway, after restarting HA, the OnOff cluster becomes an input cluster and what was a binary sensor before now becomes a switch. This is due to this I believe: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/zha/core/registries.py#L73
If I understand correctly, that line should have "BINARY_SENSOR", much like the other ones.
The opposite change would be needed here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/zha/core/registries.py#L86
Anyway, I checked in the ZigBee database file, and the OnOff cluster is correctly (again, "correctly" if I'm understanding ZigBee clusters the right way) persisted as an input cluster. It seems like in-memory data in the zha component is not matching data stored in the zigbee database?
Also, the power cluster (that is, battery status) is not persisted at all in the database, but I shall open a separate bug for that later.
Environment
Problem-relevant
configuration.yaml
(Not applicable I believe)
Traceback/Error logs
I'm not sure what to provide here. ZHA device joining logs maybe?
Additional information
This issue might have some relation with #15477.
The text was updated successfully, but these errors were encountered: