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

Fixed some rounding

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2038 b32b6428-25c9-4566-ad07-03861ab6144f
parent 3fb0e75e
No related branches found
No related tags found
No related merge requests found
......@@ -73,11 +73,11 @@ class Weather(AqaraDev):
def report(self,data):
val = data.get('temperature',None)
if val: self.devices[0].attributes['temperature'] = round(int(val) / 100.0,2)
if val: self.devices[0].attributes['temperature'] = round(int(val) / 100.0,1)
val = data.get('humidity',None)
if val: self.devices[1].attributes['humidity'] = round(int(val) / 100.0,2)
if val: self.devices[1].attributes['humidity'] = round(int(val) / 100.0,1)
val = data.get('pressure',None)
if val: self.devices[2].attributes['pressure'] = round(int(val) / 100.0,2)
if val: self.devices[2].attributes['pressure'] = round(int(val) / 100.0,1)
class Motion(AqaraDev):
def setup(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment