-
Notifications
You must be signed in to change notification settings - Fork 703
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
Fix Nimly smart lock mains-powered capability #3457
Conversation
Clears the mains powered mac capability flag since lock is battery powered.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3457 +/- ##
=======================================
Coverage 89.40% 89.41%
=======================================
Files 309 311 +2
Lines 10014 10020 +6
=======================================
+ Hits 8953 8959 +6
Misses 1061 1061 ☔ View full report in Codecov by Sentry. |
I didn't add tests since I'm not sure how to test quirks v2, e.g. So it would be great with some direction on this if tests are required :) |
Tests aren't really required for this. All good. |
|
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.
Thanks!
Thanks for the review and the explanation about battery levels. I'll try to replace the battery and see if it will report the correct value. If not, I'll open another PR 🙂 |
Proposed change
Add nimly smart lock quirk
Clears the mains powered mac capability flag since lock is battery powered.
Note that after quirk is applied, ZHA reports that my lock has 20% remaining battery, but when I query PowerConfiguration/battery_percentage_remaining attribute it reports 41%.
Not sure where ZHA gets 20% from.
See picture below:
Additional information
Tested on NimlyPro model.
Ref
#3095
#2354
Checklist
pre-commit
checks pass / the code has been formatted using Black