From ec2116b4f7da806906ab484ccf7ab836b5c319be Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 11 Oct 2021 14:27:38 -0400 Subject: [PATCH] temperature_sensor: round reported temps to 2 decimal places Signed-off-by: Eric Callahan --- klippy/extras/temperature_sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/klippy/extras/temperature_sensor.py b/klippy/extras/temperature_sensor.py index cb875915..19733731 100644 --- a/klippy/extras/temperature_sensor.py +++ b/klippy/extras/temperature_sensor.py @@ -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):