-
Notifications
You must be signed in to change notification settings - Fork 712
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
Set ep_attribute
of Xiaomi class to "opple_cluster"
#2667
Merged
TheJulianJES
merged 5 commits into
zigpy:dev
from
TheJulianJES:tjj/xiaomi_aqara_opple_ep_attribute
Oct 23, 2023
Merged
Set ep_attribute
of Xiaomi class to "opple_cluster"
#2667
TheJulianJES
merged 5 commits into
zigpy:dev
from
TheJulianJES:tjj/xiaomi_aqara_opple_ep_attribute
Oct 23, 2023
Conversation
This file contains 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2667 +/- ##
==========================================
- Coverage 86.81% 86.79% -0.02%
==========================================
Files 280 280
Lines 8575 8564 -11
==========================================
- Hits 7444 7433 -11
Misses 1131 1131
☔ View full report in Codecov by Sentry. |
`ManufacturerSpecificCluster` marks `name` and `ep_attribute` as `Final`, but we're re-assigning them. There's no reason to inherit from `ManufacturerSpecificCluster` in this case. It's mostly used as an internal class for zigpy (for non-quirked devices) IIRC.
…iAqaraE1Cluster` `XiaomiAqaraE1Cluster` now sets the `ep_attribute` to `"opple_cluster"` already.
TheJulianJES
force-pushed
the
tjj/xiaomi_aqara_opple_ep_attribute
branch
from
October 21, 2023 01:33
59066f4
to
586992c
Compare
3 tasks
elupus
pushed a commit
to elupus/zha-device-handlers
that referenced
this pull request
Jan 17, 2024
* Add `opple_cluster` ep_attribute for `XiaomiAqaraE1Cluster` * Don't inherit `ManufacturerSpecificCluster` to `XiaomiAqaraE1Cluster` `ManufacturerSpecificCluster` marks `name` and `ep_attribute` as `Final`, but we're re-assigning them. There's no reason to inherit from `ManufacturerSpecificCluster` in this case. It's mostly used as an internal class for zigpy (for non-quirked devices) IIRC. * Remove `ep_attribute = "opple_cluster"` for classes inheriting `XiaomiAqaraE1Cluster` `XiaomiAqaraE1Cluster` now sets the `ep_attribute` to `"opple_cluster"` already. * Use `opple_cluster` `ep_attribute` in Xiaomi tests (instead of cluster ID) * Remove `ep_attribute = "aqara_cluster"` for two quirks
lgraf
pushed a commit
to lgraf/zha-device-handlers
that referenced
this pull request
May 6, 2024
* Add `opple_cluster` ep_attribute for `XiaomiAqaraE1Cluster` * Don't inherit `ManufacturerSpecificCluster` to `XiaomiAqaraE1Cluster` `ManufacturerSpecificCluster` marks `name` and `ep_attribute` as `Final`, but we're re-assigning them. There's no reason to inherit from `ManufacturerSpecificCluster` in this case. It's mostly used as an internal class for zigpy (for non-quirked devices) IIRC. * Remove `ep_attribute = "opple_cluster"` for classes inheriting `XiaomiAqaraE1Cluster` `XiaomiAqaraE1Cluster` now sets the `ep_attribute` to `"opple_cluster"` already. * Use `opple_cluster` `ep_attribute` in Xiaomi tests (instead of cluster ID) * Remove `ep_attribute = "aqara_cluster"` for two quirks
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
This sets
ep_attribute = "opple_cluster"
in theXiaomiAqaraE1Cluster
class and removes the assignment from all classes that inherit from this class.Two quirks also used
"aqara_cluster"
as theep_attribute
instead. All quirks seem to have "standardized" upon using"opple_cluster"
as theep_attribute
. So this PR also changes those two quirks.From what I can see, the
ep_attribute
of those two quirks was never used anywhere, so we are free to change it without causing any issues. This addresses part of the late review in https://github.com/zigpy/zha-device-handlers/pull/2408/files#r1236909366Lastly, it also removes inheriting
ManufacturerSpecificCluster
inXiaomiAqaraE1Cluster
.ManufacturerSpecificCluster
marksname
andep_attribute
asFinal
, but we're re-assigning them.There's no reason to inherit from
ManufacturerSpecificCluster
in this case. It's mostly used as an internal class for zigpy for non-quirked devices.Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black