Confusion about status reference syntax

Basic Information:

Printer Model: Sovol SV07
MCU / Printerboard: N/A (builtin)
[klippy.log|attachment](upload://hTgA88DdJApneeumN30w9ReO1jX.log) (937.1 KB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I tried to create a gcode macro for loading filament - at the end, if the printer is not paused during an active print, I want it to shut off the hotend. Using the Status Reference page (Status reference - Klipper documentation), I determined the way to do this is using the pause_resume object’s is_paused reference. So, I added a conditional statement checking this:

{% if pause_resume.is_paused == False %}
      M104 S0
{% endif %}

However, when I tried to use this macro, I received the error “!! Error evaluating ‘gcode_macro LOAD_FILAMENT:gcode’: jinja2.exceptions.UndefinedError: ‘pause_resume’ is undefined”

I’ve found examples elsewhere that seem to indicate I need to prepend the status reference identifier with printer (i.e. printer.pause_resume.is_paused), but this is not evident anywhere in the actual documentation I can find. Have I missed something, or should this be submitted as a bug report to the documentation to explicitly indicate that all objects on that list need to be prepended with “printer.”?

Thanks in advance for your help

the-printer-variable

Thanks, looks like I missed that bit. I’m not certain that it’s super clear just from that - an example section of how to properly use some of these variables somewhere would be useful, though I suppose if I missed this I probably missed on of those as well. In any case, thanks for the quick reply

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.