Second twist the two white wires together and screw on a wire nut. Twist the white wires together and cap them and connect the ground wires to the ground terminal.

All About Light Switch Wiring Better Homes Amp Gardens
Switch connection for lights. Connect the black wire to one of the switch terminals and the black wire going to the light fixture to the other switch terminal. Two wire cable runs from the combo to the light fixture and the switch output is connected to the black wire running to the fixture hot terminal. If the light switch has a ground screw on it usually green and at the bottom of the switch connect it now. The source neutral wire is spliced to the neutral on the receptacle half of the combo device and to the white cable wire running to the light. You need to connect your neutral wire to light socket and hot wire to the switch and from the switch you connect the wire to light bulb socket other free terminal and ground wire to the one way switch earthling point as i shown in the below diagram. It is usually a good idea to put some black electrical tape around the nut to make sure it doesnt come off.
How is the wiring for a new light switch and fixture added to an existing switch. Basic knowledge of how to wire a light switch black wire this is the hot or load wire white wire this is the neutral wire bare copper green wire this is your ground wire red wire this wire is used for 3 or 4 way switches and will connect the switches together so they can each control. Wiring of a light switch is very simple and easy connection. Wiring a receptacle to a switch receptacle always on. The power comes into the switch which operates a single light at the end of the circuit. I have an existing light switch and i want to add a second switch for a new light that will be operated separately.
At the light it connects to the neutral terminal.