-
Notifications
You must be signed in to change notification settings - Fork 712
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 for _TZE200_yjjdcqsq
, _TZE200_9yapgbuv
#2626
Conversation
I tested on both devices: _TZE200_yjjdcqsq and _TZE200_9yapgbuv. Both devices report battery status in three levels: low, middle, and high. Since there is no option for battery level in ZHA, this fix converts the levels into equal percentage numbers 25%, 50% and 100%. Issue: zigpy#2281
Remove `TuyaManufClusterAttributes` to satisfy CI checks
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2626 +/- ##
=======================================
Coverage 86.60% 86.61%
=======================================
Files 278 278
Lines 8540 8546 +6
=======================================
+ Hits 7396 7402 +6
Misses 1144 1144
☔ View full report in Codecov by Sentry. |
Hey there. I have |
I suggest opening a new issue. It's likely the maintainer wouldn't welcome a discussion about a different topic here. If you use the official thermostat app, does it display a battery percentage? The current implementation suggests that the thermostat only reports a battery low warning reported to HA as 0%. Otherwise, it shows 100%. |
_TZE200_yjjdcqsq
, _TZE200_9yapgbuv
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 guess more Tuya devices have that "low, medium, high" battery percentage reporting, so we should probably move it to the main Tuya class if other devices also need it.
For now, this LGTM. Thanks for the PR!
…py#2626) * Fix battery reporting for: _TZE200_yjjdcqsq, _TZE200_9yapgbuv Tested on both devices: _TZE200_yjjdcqsq and _TZE200_9yapgbuv. Both devices report battery status in three levels: low, middle, and high. Since there is no option for battery level in ZHA, this fix converts the levels into equal percentage numbers 25%, 50% and 100%. Issue: zigpy#2281
…py#2626) * Fix battery reporting for: _TZE200_yjjdcqsq, _TZE200_9yapgbuv Tested on both devices: _TZE200_yjjdcqsq and _TZE200_9yapgbuv. Both devices report battery status in three levels: low, middle, and high. Since there is no option for battery level in ZHA, this fix converts the levels into equal percentage numbers 25%, 50% and 100%. Issue: zigpy#2281
Both devices report battery status in three levels: low, middle, and high instead of reporting a battery percentage. I confirmed this with the official TuYa App and TuYa IoT Platform. See Issue #2281. I tested this for both devices: _TZE200_yjjdcqsq and _TZE200_9yapgbuv.
Proposed change
Since there is no option for battery level in ZHA, this fix converts the levels into equal percentage numbers 25%, 50% and 100%.
Additional information
Fixes #2281
Checklist
pre-commit
checks pass / the code has been formatted using Black