Identified and replaced a defective light switch. Ensured power was safely disconnected, then removed the device from the electrical box. Spliced in a new code-compliant switch using approved wiring techniques with proper grounding. Secured conductors with a clamp and reinstalled the faceplate cover per NEC standards before restoring power.