-
Notifications
You must be signed in to change notification settings - Fork 61
Update ZHA manufacturer code handling for zigpy 0.91.x #637
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
Update ZHA manufacturer code handling for zigpy 0.91.x #637
Conversation
|
Thanks! I've reverted the changes in the other PR to keep it small. |
|
It looks like the other PR still needs the |
|
It's also needed in this PR, so uh, we can put it in this one and rename it? (or create a separate one) |
|
Let's put it into this one |
7b28196 to
709bba0
Compare
|
The remaining error with the Tuya Failing test here: tests/test_button.py::test_frost_unlock - ValueError: Failed to convert manufacturer=<UndefinedType._singleton: 0> from type <enum 'UndefinedType'> to int | None |
|
Looks like a few fail: |
|
If it's only the attribute redirection, I think that shouldn't affect ZHA with this PR, since we explicitly pass I'll take a look at zha-quirks, since it needs to be updated for the |
|
I think most methods that override attribute reading/writing can probably pass through |
|
ZHA tests pass with the above quirks PR so I think this should resolve the |
Co-authored-by: puddly <32534428+puddly@users.noreply.github.com>
709bba0 to
a24b9e1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #637 +/- ##
==========================================
- Coverage 97.29% 97.29% -0.01%
==========================================
Files 62 62
Lines 10716 10712 -4
==========================================
- Hits 10426 10422 -4
Misses 290 290 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR fixes an issue where multiple read/write methods overwrote the default manufacturer code with
None, even though we should now be usingUNDEFINEDwith the recent zigpy 0.91.x changes.Since we use the
UNDEFINEDdefault in ZHA for reading attributes (during initialization), this also works around the issue of quirks overridingread_attributeswithmanufacturer=Noneas the default.Due to the improved manufacturer code handling in zigpy, we do not need to determine the manufacturer code ourselves anymore. It should also fix an issue where batch-reading attributes during initialization always used a manufacturer code or not, messing up mixed reads.
manufacturer=UNDEFINEDcalls are expected in a lot of places in tests now.