You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using enum types to document attribute values in the new quirk I wrote has inadvertently resulted in the incorrect zigbee attribute type being sent to the device in write_attributes requests for the motion_sensitivity attribute.
The text was updated successfully, but these errors were encountered:
jeverley
changed the title
[BUG] INVALID_DATA_TYPE error df
[BUG] INVALID_DATA_TYPE error when selecting a new value for the Aqara FP1E motion sensitivity attribute
Dec 8, 2024
Otherwise, the attribute definition type can be changed from the enum to int.
I think I prefer this approach as it still allows for using the type as explicit documentation for the values - I'll amend PR #3598 accordingly (suspect I should rebase the branch anyway as it's pulling in all the pre-merge commits).
jeverley
added a commit
to jeverley/zha-device-handlers
that referenced
this issue
Dec 8, 2024
Bug description
Using enum types to document attribute values in the new quirk I wrote has inadvertently resulted in the incorrect zigbee attribute type being sent to the device in write_attributes requests for the motion_sensitivity attribute.
I had not appreciated at the time that whilst it's derived from uint8_t, the code in https://github.com/zigpy/zigpy/blob/dev/zigpy/zcl/foundation.py maps the two types to separate zigbee type values (0x20 and 0x30).
This should be corrected by using the device's native uint8 type (raising a PR shortly).
Steps to reproduce
Attempt to change the device Motion Sensitivity setting through the select entity/manage device attribute write.
Expected behavior
The new value writes successfully to the device.
Screenshots/Video
Screenshots/Video
Logs
Logs
The text was updated successfully, but these errors were encountered: