aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorEric Callahan <arksine.code@gmail.com>2021-10-11 14:27:38 -0400
committerKevinOConnor <kevin@koconnor.net>2021-10-15 18:01:19 -0400
commitec2116b4f7da806906ab484ccf7ab836b5c319be (patch)
tree71e3c4f481b9c33502f1166c10ce4a2cd62725a3 /klippy/extras
parentcd58a945e2526b4519e918c58b97657c604b0209 (diff)
downloadkutter-ec2116b4f7da806906ab484ccf7ab836b5c319be.tar.gz
kutter-ec2116b4f7da806906ab484ccf7ab836b5c319be.tar.xz
kutter-ec2116b4f7da806906ab484ccf7ab836b5c319be.zip
temperature_sensor: round reported temps to 2 decimal places
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/temperature_sensor.py6
1 files 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):