Fixed status for unknown charge state

This commit is contained in:
Alex 2018-11-01 21:58:07 +01:00
parent 316dde0dbe
commit 85bcc7164f

View file

@ -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")