Simple Macro to save z-offset and restart

hello,
i need a simple Macro looks like this,to save the Z_offset in Printer.cfg under the [probe] setting, and restart Klipper!

my Macro dont work :slight_smile:

[gcode_macro Textur]
gcode:
    save_config: set [probe] z_offset = 0.960
    SAVE_CONFIG
    
[gcode_macro Smooth]
gcode:
    save_config: set [probe] z_offset = 0.353
    SAVE_CONFIG
1 Like

Hello @merlin2105 !

Can you please use the Preformatted Text feature in the editor for your code snippets so that we can see if the indentations are correct.

Format

The best approach is to use SET_GCODE_OFFSET or in combination with Z_OFFSET_APPLY_PROBE