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:
Simon Kühling authored and KevinOConnor committed 2019-12-13 10:45:04 -05:00
1 parent 2721211456
commit b1bbe97576
1 file changed
+2
+2
View File
@@ -22,6 +22,8 @@ class PrinterSensorGeneric:
self.last_temp = temp
def get_temp(self, eventtime):
return self.last_temp, 0.
def get_status(self, eventtime):
return {'temperature': self.last_temp}
def load_config_prefix(config):
return PrinterSensorGeneric(config)