Use attribute names for send_attributes_report in tests#680
Merged
TheJulianJES merged 1 commit intozigpy:devfrom Feb 25, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #680 +/- ##
=======================================
Coverage 97.51% 97.51%
=======================================
Files 62 62
Lines 10941 10941
=======================================
Hits 10669 10669
Misses 272 272 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
In preparation for bumping zigpy to 1.0.0 with #679, we need to adapt our tests to send attribute reports with the correct manufacturer code due to zigpy/zigpy#1775. With #637, some tests were already updated to provide the attribute name (instead of ID) to
send_attributes_report. This updates the tests that also require this for the new zigpy version.Additional information
We may want to revisit
send_attributes_report, since usingNonemanufacturer code when providing an ID is not fully correct:zha/tests/common.py
Lines 141 to 143 in c5a3171
find_attributecould be used and determine theZCLAttributeDefif there's only matching definition by ID.We could also simply prevent allowing providing attribute IDs to this. It's better if all tests provided attribute names or
ZCLAttributeDefreferences directly.... or we just leave it like this and accept that it should basically never be used.