Skip to content
Snippets Groups Projects
Commit ae57a242 authored by jkerdreu's avatar jkerdreu
Browse files

Fix percent to integers



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@3055 b32b6428-25c9-4566-ad07-03861ab6144f
parent 1b1e761f
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ class AqaraDev(object):
voltage = min(voltage, max_volt)
voltage = max(voltage, min_volt)
percent = ((voltage - min_volt) / (max_volt - min_volt)) * 100
self.battery.attributes['level'] = percent
self.battery.attributes['level'] = int(percent)
def on_report(self, data):
logger.info('Unhandled report %s' % data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment