From 25b13553c7cc660422e9bba2318143a26736c27e Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Mon, 11 Jan 2021 01:47:54 +0100 Subject: [PATCH] co2: round to first decimal place --- mqtt_sensord/sensorlib/misc_sensors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mqtt_sensord/sensorlib/misc_sensors.py b/mqtt_sensord/sensorlib/misc_sensors.py index cf3af14..a072d0f 100644 --- a/mqtt_sensord/sensorlib/misc_sensors.py +++ b/mqtt_sensord/sensorlib/misc_sensors.py @@ -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):