temperature_sensor: Add get_status() function
Provide printer.<sensor-config-name>.temperature variable to gcode macro environment Signed-off-by: Simon Kühling <mail@simonkuehling.de>
This commit is contained in:
parent
2721211456
commit
b1bbe97576
|
@ -22,6 +22,8 @@ class PrinterSensorGeneric:
|
||||||
self.last_temp = temp
|
self.last_temp = temp
|
||||||
def get_temp(self, eventtime):
|
def get_temp(self, eventtime):
|
||||||
return self.last_temp, 0.
|
return self.last_temp, 0.
|
||||||
|
def get_status(self, eventtime):
|
||||||
|
return {'temperature': self.last_temp}
|
||||||
|
|
||||||
def load_config_prefix(config):
|
def load_config_prefix(config):
|
||||||
return PrinterSensorGeneric(config)
|
return PrinterSensorGeneric(config)
|
||||||
|
|
Loading…
Reference in New Issue