The switch turns off...

Start with cutting the power, and then check all the connections. Check if the wiring inside the frame is OK (when changing the side battens, for instance, you might accidentally drill through one of the wires). If everything seems right, you probably need a new switch.