-
Notifications
You must be signed in to change notification settings - Fork 664
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
Inovelli v2 Quirks Update #3232
base: dev
Are you sure you want to change the base?
Conversation
Updating Inovelli Quirks to the new formatting, as well as update to add the leading/training edge parameter for the VZM36, but removing it from the VZM31SN per Inovelli's request.
Oooh, awesome that you're doing this! Also, there were some repo changes, so you probably need to rebase this (or merge |
This also seems to supersede this PR then: |
Looks like that was just the change from add_to_registry_v2 to QuirkBuilder being used and add_to_registry() called at the end now? If so, should be fixed now. I believe I chose the right option there on merging dev in, but if not, just let me know and I can get that sorted too. |
Yep, that's fine. Pre-commit just complains about some missing docstrings now. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3232 +/- ##
==========================================
+ Coverage 88.18% 88.29% +0.10%
==========================================
Files 301 301
Lines 9412 9498 +86
==========================================
+ Hits 8300 8386 +86
Misses 1112 1112 ☔ View full report in Codecov by Sentry. |
And the custom cluster on endpoint 3 isn't replaced yet (when it exists). But we can't add |
Ooo… I wonder if we should have another implementation |
Up until seconds ago, I thought we can just update the existing one. It adds To ignore this, we can just check if the endpoint exists: But the above change is not enough. When Currently thinking about if we want to error out when Maybe we want a separate method after all? Not sure yet... EDIT: We can use the following for this PR: |
( | ||
QuirkBuilder("Inovelli", "VZM31-SN") | ||
.replaces(InovelliVZM31SNCluster) | ||
.replaces(InovelliVZM31SNCluster, endpoint_id=2, cluster_type=ClusterType.Client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to use replace_cluster_occurrences
from zigpy/zigpy#1441 for the custom output clusters on all endpoints.
Haven't tested this, but this might work (if zigpy is new enough on the quirks repo, might need to be bumped?):
.replaces(InovelliVZM31SNCluster, endpoint_id=2, cluster_type=ClusterType.Client) | |
.replace_cluster_occurrences(InovelliVZM31SNCluster, cluster_type=ClusterType.Client) |
Proposed change
Updating Inovelli Quirks to the v2 formatting, as well as an update to add the leading/training edge parameter for the VZM36, but removing it from the VZM31SN per Inovelli's request (it's still configurable via button press combo at the switch, which is the recommended method).
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black