From cb550a6e258a0229d6a03ebc5097abca172c121c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20RAMAGE?= Date: Mon, 29 Oct 2018 14:49:03 +0100 Subject: [PATCH] Change battery percent calculation --- zigate/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zigate/core.py b/zigate/core.py index b17b28b6..c3c02f3f 100644 --- a/zigate/core.py +++ b/zigate/core.py @@ -1439,7 +1439,7 @@ def battery_percent(self): power_source = 3 battery = self.get_property_value('battery') if power_source == 3: # battery - power_source = 3.2 + power_source = 3.1 if power_source and battery: power_end = 0.9 * power_source percent = (battery - power_end) * 100 / (power_source - power_end)