Changes to PID_CALIBRATE breaks macro

Basic Information:

Printer Model: Custom IDEX
MCU / Printerboard: Octopus
Host / SBC Pi 5
klippy.log

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:

…Updated to latest Klipper and I can no longer overload PID_CALIBRATE via macro which I need to enable the safety relay that sits ahead of my beds SSR so the bed will heat.

Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 135, in _connect
    cb()
  File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 166, in handle_connect
    raise self.printer.config_error(
configparser.Error: Existing command 'PID_CALIBRATE' not found in gcode_macro rename

Log attached
klippy.zip (284.7 KB)

Yeah, that is unfortunate, and probably should be fixed.
Right now you can reorder the macro in the config, if you define something like:

[gcode_macro PID_CALIBRATE]
rename_existing: PID_CALIBRATE_ORIG
gcode:
  PID_CALIBRATE_ORIG

After the heater, it should work.

Hope that helps,
-Timofey

Not sure what you mean by reorder it ? This is the macro

[gcode_macro PID_CALIBRATE]
rename_existing: PID_CALIBRATE_ORIG
description: Saftey relay needs enabled before PID_CALIBRATE will work
gcode:

    {% set h = params.HEATER %}
    {% set t = params.TARGET %}
    
    {% if h == "heater_bed" %}
      BEDHEATER_ON
    {% endif %}

    PID_CALIBRATE_ORIG HEATER={h} TARGET={t}
    
    {% if h == "heater_bed" %}
      BEDHEATER_OFF
    {% endif %}

In the configuration file, move this [gcode_macro]section so that it is below the [heater] section.