mirror of https://github.com/Desuuuu/klipper.git
temperature_sensor: round reported temps to 2 decimal places
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
cd58a945e2
commit
ec2116b4f7
|
@ -33,9 +33,9 @@ class PrinterSensorGeneric:
|
||||||
return False, '%s: temp=%.1f' % (self.name, self.last_temp)
|
return False, '%s: temp=%.1f' % (self.name, self.last_temp)
|
||||||
def get_status(self, eventtime):
|
def get_status(self, eventtime):
|
||||||
return {
|
return {
|
||||||
'temperature': self.last_temp,
|
'temperature': round(self.last_temp, 2),
|
||||||
'measured_min_temp': self.measured_min,
|
'measured_min_temp': round(self.measured_min, 2),
|
||||||
'measured_max_temp': self.measured_max
|
'measured_max_temp': round(self.measured_max, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
def load_config_prefix(config):
|
def load_config_prefix(config):
|
||||||
|
|
Loading…
Reference in New Issue