From 85bcc7164fa94d9d4cac98608f3b29b7de91be64 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 1 Nov 2018 21:58:07 +0100 Subject: [PATCH] Fixed status for unknown charge state --- bumblebee/modules/battery.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 5367d5f..bd10efe 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -112,6 +112,8 @@ class Module(bumblebee.engine.Module): pass if charge == "Discharging": state.append("discharging-{}".format(min([10, 25, 50, 80, 100], key=lambda i: abs(i-capacity)))) + elif charge == "Unknown": + state.append("unknown") else: if capacity > 95: state.append("charged")