Possible fix for #89

This commit is contained in:
enkore 2014-07-30 19:42:56 +02:00
parent 366ca43d7d
commit f07485ac81

View File

@ -49,7 +49,7 @@ class Battery:
return self._percentage("_DESIGN" if design else "") * 100 return self._percentage("_DESIGN" if design else "") * 100
def status(self): def status(self):
if self.consumption() > 0.1: if self.consumption() > 0.1 and self.percentage() < 99.9:
return "Discharging" if self.battery_info["STATUS"] == "Discharging" else "Charging" return "Discharging" if self.battery_info["STATUS"] == "Discharging" else "Charging"
else: else:
return "Full" return "Full"