Turn off the power to the circuit you are working on at the home's electrical distribution panel. Confirm that the power is off by touching a noncontact voltage detector to the wire's insulation.
Remove the switch housing cover from the ceiling fan with a screwdriver. If the ceiling fan has a light, remove it as well, making note of the wiring connections.
Unscrew the chain guide on the outside of the switch housing and remove the old switch.
Write down the position and color of each wire attached to the switch. For example: Terminal L = black wire.
Straighten out the paper clip and insert into the wire's terminal. Push down on the spring and pull out the wire. Repeat this process for the other three wires.
Push the wires into the terminal slots on the new switch. Match the same positions as the old switch.
Mount the new switch into the ceiling fan with the screws removed and reassemble the light.