jothi-prasath/auto-epp

Issue when battery is plugged in, not full but not charging

lamarios opened this issue · 5 comments

So on my laptop there is a "conservative" which basically limits the charge to 80% and auto-epp reports it as on Battery because of this:

sbattery(percent=79.52387907112605, secsleft=<BatteryTime.POWER_TIME_UNKNOWN: -1>, power_plugged=None)

power_plugged is None, when on battery power_plugged=False and when charging power_plugged=True

I fixed it on my end by updating the condition

    if battery.power_plugged is None or battery.power_plugged:

but i'm not sure if that would apply to all the laptops that have similar modes hence i didn't make PR for now.

can you share information about your laptop model, Linux distribution you're using, and the version of the kernel

Lenovo Yoga 7 14ARB7 AMD gen 7 . Kernel 6.4.9 on Fedora Silverblue

@lamarios I changed the code can you check testing branch (https://github.com/jothi-prasath/auto-epp/tree/testing)

Sure I'll give it a try tomorrow, thanks!

working fine, thanks for the fix !