co2: round to first decimal place
This commit is contained in:
parent
3a086962c0
commit
25b13553c7
|
@ -134,12 +134,12 @@ class CO2Meter(Sensor):
|
|||
|
||||
def get_temp(self):
|
||||
if 0x42 in self.values:
|
||||
return self.values[0x42] / 16.0 - 273.15
|
||||
return round(self.values[0x42] / 16.0 - 273.15, 1)
|
||||
return None
|
||||
|
||||
def get_humidity(self):
|
||||
if 0x44 in self.values:
|
||||
return self.values[0x44] / 100.0
|
||||
return round(self.values[0x44] / 100.0, 1)
|
||||
return None
|
||||
|
||||
def get_data(self):
|
||||
|
|
Loading…
Reference in New Issue