-
Notifications
You must be signed in to change notification settings - Fork 726
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 🙂 |
How to add it, im not very expirenced with home assistant |
@jb3112 this quirk is available since Home Assistant 2024.11, so just make sure you are running the latest version. |
how to make quirk |
@jb3112 The quirk from this PR is applied automatically if your are using ZHA, the device producer is "Onesti Products AS", model name is "NimlyPRO", "NimlyCode", "NimlyTouch", "NimlyIn", "EasyFingerTouch, or "EasyCodeTouch". Nothing that you should be doing other than update Home Assistant. |
Oh, I see the issue. Your model name is I'll create another PR to add it. Unfortunately you will have to wait for a new release to get the battery readings. |
Great, is there other thinks, like who has unlocked |
Not yet, but I'm planning to add this information too. Here is my comment for the reference: #3465 (comment) |
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