I have a Prusa 2 with a z limit switch. every time the machine touches the switch it gets bumped a little bit out of alignment. I needed a switch that never got touched so it would stay where I put it.
Get the same switch here
See calibration here
Bonus I didn't realize early on: when very very close to correctly tuned the LED on the switch fades in and out as the trigger only partially blocks the optical sensor. You can watch the brightness while fine tuning to get better results.
Designed in Fusion360.