Spectacular Wiring A Plug From A Light Switch
Here a single pole switch controls the power to a light fixture.
Wiring a plug from a light switch. How to wire up a electrical outlet to a light switch. The black wire should be installed at the top wire screw on the back side of the switch. The red wire would be used as the switched leg back up to the vanity light where it would be connected to the black wire of the vanity light.
The neutral wire from the source is spliced to the white cable wire and continues on to the light. Here is what you would have to do if possible change out the 2 wire to 3 wire cable from switch to light. Wiring light switches from an outlet with this wiring project the outlet will provide the power source for the light fixtures which are controlled by the light switch so the wire from the outlet leads to the switch location and then to the light fixture.
The white or neutral wire bypasses the switch and goes straight to your lights. Install a 3 wire cable of the same wire gauge from the vanity light to the wall switch. The ground wire sometimes in a green jacket should be connected to your switch and to your lights.
The source hot wire is connected to a switch terminal and the other terminal is connected to the black cable wire. The source is at the switch and 2 wire cable runs from there to the light. Step 3 run a new stretch of wiring from the light fixture to where you ll be locating the outlet.
In this case you must change the cable from the switch to the light outlet from a 2 wire to a 3 wire cable. This wire is needed to complete the circuit. The switch serves to cut the power from reaching the light switch.
At the light the white wire connects to the neutral terminal and the black wire connects to the hot. The black and white would be used for the power for the outlet and the vanity light switch. Pull the fixture away from the wall or ceiling and disconnect it from the existing wall ceiling wiring by undoing the wire nuts connecting the wires.