Z Axis Limit Switch problems

My Z Axis limit switch stopped working. It was running fine but then the switch lever became loose and jammed . I’ve fixed the bent lever, ohmed out the switch and the switch is working fine. My computer is telling me to check my limit switch??

If you go into machine inspector can you get the green dot by pressing the switch lever?
You may now have to adjust the hard stop for it to get activated.