Skip to content
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

Migrate Schneider dimmer quirks to v2, add missing models #3529

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

uvNikita
Copy link
Contributor

@uvNikita uvNikita commented Nov 20, 2024

Proposed change

I migrated quirks to v2 and added models other models from the spec.
Looking through the spec docs, they all seem to have equivalent functionality.
The original quirk was missing SEOnOff cluster, so I added it too.

Additional information

Specs:
ZB Spec - Push-button Dimmer - 110422.pdf
ZB Spec - Rotary Dimmer - 110422.pdf
ZB Spec - Relay Switch 10A - 110422.pdf

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

@uvNikita uvNikita force-pushed the schneider/quirks-v2 branch 3 times, most recently from 08af788 to 0823029 Compare November 20, 2024 14:19
@uvNikita
Copy link
Contributor Author

Adding the original PRs for the reference #1705 #3111

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.43%. Comparing base (3f4aee0) to head (b03a968).
Report is 8 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3529      +/-   ##
==========================================
- Coverage   89.44%   89.43%   -0.01%     
==========================================
  Files         311      311              
  Lines       10033    10026       -7     
==========================================
- Hits         8974     8967       -7     
  Misses       1059     1059              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@uvNikita uvNikita force-pushed the schneider/quirks-v2 branch from 0823029 to cec8a19 Compare November 20, 2024 14:32
@TheJulianJES TheJulianJES added the v2 quirk Quirks using v2 API. Might add custom entities that need translation keys in HA. label Nov 24, 2024
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've replaced adds(SESpecific) with replaces(SESpecific), as we want to ensure the original cluster is removed first (and replaced with our custom implementation).
There's some more info in the review comments above.

@TheJulianJES TheJulianJES merged commit fbb2590 into zigpy:dev Nov 24, 2024
9 checks passed
@uvNikita
Copy link
Contributor Author

@TheJulianJES I was just assuming adds should be used on Manufacturer Specific clusters and replaces on the standard ones.

Will keep that in mind for the future, thanks a lot for the review!

@uvNikita uvNikita deleted the schneider/quirks-v2 branch November 24, 2024 20:33
@TheJulianJES
Copy link
Collaborator

Yeah, we need to get some docs together at some point.. I'm not sure if there's ever any reason to use adds instead of replaces. We should also take a look at that and remove adds if needed 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 quirk Quirks using v2 API. Might add custom entities that need translation keys in HA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants