-
Notifications
You must be signed in to change notification settings - Fork 721
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 battery reporting half on some Nimly locks #3465
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3465 +/- ##
=======================================
Coverage 89.44% 89.44%
=======================================
Files 311 311
Lines 10031 10033 +2
=======================================
+ Hits 8972 8974 +2
Misses 1059 1059 ☔ View full report in Codecov by Sentry. |
@TheJulianJES I aslo would like to add some other attributes exposed by this lock that are already available at Z2M (see code here):
Could you give me some pointers on how I can implement this? From what I understand looking at Z2M code, the information can be parsed from attribute 256 and 257. |
@blauret thanks, that might be what I'm looking for! I think one puzzle piece I'm still missing is how can I modify published sensor to not just publish raw value, but parse the attribute first and extract information similar to Z2M. |
You can't, yet. We're looking into adding this. |
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!
Sorry for this notification being just an observation, instead of a solution proposal, but after updating to HA 2024.11.0 as of today, my ZHA wouldn't start unless I commented out the quirk that adds the battery percentage doubling. I figured that I had to let this excellent solution go in favor of having the rest of my home working 🙂 |
@Eriond Please open an issue, tag me there, and attach logs of the issue. |
@Eriond it's probably because the original PR which added support for this lock got into the new home assistant release, but not the doubling fix. And your custom quirk conflicts with the new quirk added. |
Yes, that was my conclusion too. Edit: |
@TheJulianJES is there a way to override an existing quirk in zha-device-handlers with the one from As of now, I'm getting
|
@Eriond I managed to override the quirk with the custom one using this workaround:
|
Thanks for investigating this further. This is my current card code:
|
@Eriond Also, make sure to re-read the value from Manage Zigbee device → DoublingPowerConfigurationCluster → battery_percentage_remaining. |
Yep, that was the trick! Re-reading the value fixed it. Thank you so much. |
@TheJulianJES I am also very interested in getting the same functionality as z2m as @uvNikita wrote higher up. I don't have much experience with Quirk so I can't do it myself unfortunately |
Proposed change
Add
DoublingPowerConfigurationCluster
for some nimly locks.Following the previous PR #3457.
According to this conversation over at Z2M, only Nimly new locks require this fix, not their old EasyTouch/EasyFinger locks: Koenkk/zigbee-herdsman-converters#6940.
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black