pacjo / SmartspacerPlugins

Home of Generic Weather, Local Battery, Sleep as Android and more
GNU General Public License v3.0
24 stars 3 forks source link

[Local battery] Charging time left estimates wrong #13

Closed mario-g98 closed 2 months ago

mario-g98 commented 2 months ago

The charging time estimates of the Battery Info Target aren't correct. As a reference, the At a Glance widget of Lawnchair is showing proper estimates.

Local Battery Plugin Screenshot_20240726-173942_1

Lawnchair's At a Glance Screenshot_20240726-174106_1

Screenshot_20240726-173944_1

pacjo commented 2 months ago

I don't know. I'm using basically the same code as lawnchair (see here and here).

The issue probably lies in refreshing. Mine does it whenever ACTION_BATTERY_CHANGED intent is received, while lawnchair gets it every time it's needed.

Due to battery drain concerns I won't be changing the way it works (at least by default). From my experience it's good enough.

but with that said, if someone would like to make it a option and make a PR, I'll be happy to merge it. Making it opt-in (just like flashlight prompt option in Smartspacer) seems like the way to go.

mario-g98 commented 2 months ago

I don't know what device you are using, but on Pixel 7 the plugin is practically unusable. In a matter of seconds the time jumped through the following sequence: 10 min - 1 min - 20 min - 46 min - 13 min, while the system reported time was around 50 min.