Before beginning in earnest to replace a light switch, go first to the electrical panel and cut power to the room where you’re going to be working. To do this, first flip the switch on.
(Ground wires are not shown.) If power comes into the switch box first, the neutral white line from the service panel and the white line that leads to the light are spliced together. The hot black ...