aboutsummaryrefslogtreecommitdiffstats
path: root/config/sample-raspberry-pi.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'config/sample-raspberry-pi.cfg')
-rw-r--r--config/sample-raspberry-pi.cfg6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/sample-raspberry-pi.cfg b/config/sample-raspberry-pi.cfg
index 92f1c20e..77e5cdf8 100644
--- a/config/sample-raspberry-pi.cfg
+++ b/config/sample-raspberry-pi.cfg
@@ -30,13 +30,13 @@ i2c_bus: i2c.1
htu21d_hold_master: False
[gcode_macro QUERY_ENCLOSURE]
-default_parameter_SENSOR: htu21d enclosure_temp
gcode:
+ {% set sensor = printer["htu21d enclosure_temp"] %}
{action_respond_info(
"Temperature: %.2f C\n"
"Humidity: %.2f%%" % (
- printer[SENSOR].temperature,
- printer[SENSOR].humidity))}
+ sensor.temperature,
+ sensor.humidity))}
# Example 3:Using a pin on another gpiochip connected to the RPi
# (in this case on an MCP23017)