Switch off the circuit breaker controlling the switch to ensure safety.
Use a screwdriver to remove the switch cover plate from the wall.
Use a voltage tester to confirm no electrical current is present at the switch terminals.
Unscrew the old switch from the electrical box and gently pull it out.
Disconnect the wires from the old switch using needle-nose pliers if they are tightly connected.
Inspect the wires for any damage; strip about 0.5 inch of insulation if needed for a secure connection.
Attach the wires to the new switch following the wiring diagram, ensuring correct terminal connections.
Secure the new switch into the electrical box with screws, making sure it is firmly mounted.
Replace the switch cover plate and tighten the screws.
Go to the circuit breaker panel and turn the power back on.
Test the new switch by turning it on and off to ensure proper operation.
If everything works correctly, turn on the connected device and verify functionality.