A limit switch to conditionally disable z_hop from safe_z_home?

I have an Ender 3 with a BL Touch, so z_hop on safe_z_home seems to be a necessity. Unfortunately, this creates a condition in which if the Z axis is already at its maximum position when homing is prompted, it will crash upwards. Of course, this can be mitigated by reducing position_max by z_hop, but then you're losing out on build volume.

It seems to me that a good solution would be to have an end-stop switch that would interrupt z_hop when triggered, but I'm not sure how to implement that.

I've found this Reddit thread in which the OP seems to be dealing with a similar, if not identical situation, but it seems to have died without a working solution.

Is this just a new Klipper feature I should be requesting? And if so, how?

reddit.com
u/Conlan99 — 2 days ago
▲ 17 r/ender3

I made a thing to fix the X axis belt chafing on the end of the extrusion.

I'm not sure it's better than nothing, but it feels better than nothing. If you want to try it out, it's up on Printables.

u/Conlan99 — 10 days ago

Didn't log in for a little over a year. Apparently my "hub" is now inaccessible. Is there anything I can do get my files back?

u/Conlan99 — 1 month ago