-
Notifications
You must be signed in to change notification settings - Fork 890
Fix energy and current divisors for Innr plugs, clean up #2782
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
Merged
Conversation
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
This is to avoid test failure
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2782 +/- ##
======================================
Coverage ? 87.34%
======================================
Files ? 286
Lines ? 8829
Branches ? 0
======================================
Hits ? 7712
Misses ? 1117
Partials ? 0 ☔ View full report in Codecov by Sentry. |
This is so other devices will be able to use it too.
elupus
pushed a commit
to elupus/zha-device-handlers
that referenced
this pull request
Jan 17, 2024
* Fix Metering divisor for Innr SP240 plug * Use `CustomCluster` for Innr 0xE001 manufacturer cluster This is to avoid test failure * Add docstring for `InnrCluster` * Move `MeteringClusterInnr` to main innr file This is so other devices will be able to use it too. * Add constant with "innr" manufacturer name * Replace local `MeteringCluster` with `MeteringClusterInnr` for SP120 * Change `ElectricalMeasurementCluster` for SP234 to use `AttributeDefs` * Also use modified `MeteringClusterInnr` for SP234 See comment in zigpy#2781 zigpy#2781 (comment) * Change `ElectricalMeasurementCluster` for SP120 to use `AttributeDefs` * Improve comment for SP234 plug * Slightly update comment * Align comments, class name with other Innr plug quirks * Move EM cluster classes into main Innr file to fix current divider * Update comment
lgraf
pushed a commit
to lgraf/zha-device-handlers
that referenced
this pull request
May 6, 2024
* Fix Metering divisor for Innr SP240 plug * Use `CustomCluster` for Innr 0xE001 manufacturer cluster This is to avoid test failure * Add docstring for `InnrCluster` * Move `MeteringClusterInnr` to main innr file This is so other devices will be able to use it too. * Add constant with "innr" manufacturer name * Replace local `MeteringCluster` with `MeteringClusterInnr` for SP120 * Change `ElectricalMeasurementCluster` for SP234 to use `AttributeDefs` * Also use modified `MeteringClusterInnr` for SP234 See comment in zigpy#2781 zigpy#2781 (comment) * Change `ElectricalMeasurementCluster` for SP120 to use `AttributeDefs` * Improve comment for SP234 plug * Slightly update comment * Align comments, class name with other Innr plug quirks * Move EM cluster classes into main Innr file to fix current divider * Update comment
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
Adds a constant divisor attribute for the Innr SP240 plug for the
Meteringcluster.It also fixes the divisors for other plugs and cleans everything up a bit.
Additional information
Addresses #2781. The comment in that issue is still relevant though.
Note: The SP-234 apparently has
ac_current_divisorset correctly to1000already. We're doing that again in our EM cluster now.The original quirk just set power divider to
1. Apparently it was10before (reported by original quirk creator).Z2M code comments mentions that
ac_current_divisorwasn't present on some devices though, hence why we're always overriding it now.EDIT: It seems like it's not present (correctly) on older firmware versions. Hence this PR adds it always.
Checklist
pre-commitchecks pass / the code has been formatted using Black