I'd not say the switch is bad.. I'd guess the door is bad..
Ok, here is the switch setup on MOST rv's (optional follows)
In the door jam at some point is a small glass tube with a pair of metal "Leaves" and a wire off each end. the leaves are ferromagnetic (A magnet will make 'em move) and when the door closes (The screen usually) a magnet on the lower edge of the door makes them either open or close. operating the steps.
IF the door is a bit bent. the magnet will be out of position and as the door moves about due to twisting and shaking.. the steps go out the steps go in the steps to out the steps go in.
Home was where I park it. but alas the.
2005 Damon Intruder 377 Alas declared a total loss
after a semi "nicked" it. Still have the radios
Kenwood TS-2000, ICOM ID-5100, ID-51A+2, ID-880 REF030C most times