Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
Change battery percent calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Oct 29, 2018
1 parent ec70082 commit cb550a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zigate/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cb550a6

Please sign in to comment.