temperature_sensor: round reported temps to 2 decimal places

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-10-11 14:27:38 -04:00 committed by KevinOConnor
parent cd58a945e2
commit ec2116b4f7
1 changed files with 3 additions and 3 deletions

View File

@ -33,9 +33,9 @@ class PrinterSensorGeneric:
return False, '%s: temp=%.1f' % (self.name, self.last_temp)
def get_status(self, eventtime):
return {
'temperature': self.last_temp,
'measured_min_temp': self.measured_min,
'measured_max_temp': self.measured_max
'temperature': round(self.last_temp, 2),
'measured_min_temp': round(self.measured_min, 2),
'measured_max_temp': round(self.measured_max, 2)
}
def load_config_prefix(config):