From fb788f900518fc55e8499ca37b23513f36ed11c8 Mon Sep 17 00:00:00 2001 From: erpalma Date: Fri, 3 Jun 2022 08:16:53 +0200 Subject: [PATCH] Upower now also reports "pending-charge", fixes #303 --- throttled.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/throttled.py b/throttled.py index 05fc619..e78838d 100755 --- a/throttled.py +++ b/throttled.py @@ -316,7 +316,7 @@ def is_on_battery(config): res = re.search(rb'state:\s+(.+)', out).group(1).decode().strip() if res == 'discharging': return True - elif res in ('fully-charged', 'charging'): + elif res in ('fully-charged', 'charging', 'pending-charge'): return False except: pass