Fixed status for unknown charge state
This commit is contained in:
parent
316dde0dbe
commit
85bcc7164f
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,8 @@ class Module(bumblebee.engine.Module):
|
||||||
pass
|
pass
|
||||||
if charge == "Discharging":
|
if charge == "Discharging":
|
||||||
state.append("discharging-{}".format(min([10, 25, 50, 80, 100], key=lambda i: abs(i-capacity))))
|
state.append("discharging-{}".format(min([10, 25, 50, 80, 100], key=lambda i: abs(i-capacity))))
|
||||||
|
elif charge == "Unknown":
|
||||||
|
state.append("unknown")
|
||||||
else:
|
else:
|
||||||
if capacity > 95:
|
if capacity > 95:
|
||||||
state.append("charged")
|
state.append("charged")
|
||||||
|
|
Loading…
Reference in a new issue