Z Hop homing macro - Need advice thanks

I searched and searched and can’t find Z hope homing.

I’m not sure how everyone else does it but I find it very scary when homing is preformed without first z hope. Once I have done a probe calibrate and I want to home I have to watch the nozzle skim across the top of my build plate back to home, which has fallen slightly after the finish of probe calibrate

I tried to write a simple macro but I get “must home axis first”. I just want whenever I home X or Y for there to be a 10mm z hop first.

So here is my macro which of course does not work. Can someone please help

------------------------- Homing Z Hop ----------------------------

Makes G28 Z-hop 10mm before homing

[homing_override]
gcode:
SAVE_GCODE_STATE NAME=homing
# Move nozzle 10mm before homing
G91
# Raise nozzle by 10mm
enable_force_move: true
G1 Z10 F40
G90
G28
enable_force_move: False
SAVE_GCODE_STATE NAME=homing

If you want to do any ayes move on your printer, you have to home first.

In [safe_z_home] of Klipper:

https://www.klipper3d.org/Config_Reference.html#safe_z_home

you can set an initial z hop (not hope)

Thanks for the spell correct. I tried safe_z_home… Ill try again thanks