Test the motiion sensor with the switch in the "On" position. If the sensor works, you'll know the switch is operational. If the sensor does not work, try the bypass.
Shut off the electricity to the motion sensor equipment at the circuit breaker.
Remove the screw holding the cover plate on the wall switch.
Take out the two screws holding the wall switch to the metal box inside the wall. Pull gently on the switch to remove it from the box.
Loosen the two screws on the edge or back of the switch, depending on the model, to pull loose the two wires.
Twist the bare ends of the two wires together. Screw on a cone-shaped wire connector over the splice.
Turn on the breaker and test the motion sensor. If it now operates normally, the switch is defective and should be replaced.