For extra safety and security wrap electrical tape around the connection. Install a 3 wire cable of the same wire gauge from the vanity light to the wall switch.
Simple Plug In Light And Switch
How to wire a light switch from a plug. At the light it connects to the neutral terminal. 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. When they are secure screw on a wire nut being sure that all exposed wire is covered by the nut. 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. This kind of task is really useful if you have a source of power where you can plug in a light but want to place the switch in a more convenient. Remove the black line wire from the switch twist it together with the black wire going to the receptacle and add a six inch length of black wire of the same gauge.
Connect this jumper wire back to the switch terminal. The black and white would be used for the power for the outlet and the vanity light switch. Here is a picture gallery about how to wire a plug and switch diagram complete with the description of the image please find the image you need. Next bend the wire into a pig tail loop so that you can easily attach to the screws on the light switch. Now remove the wire cap from the two white wires in the box add the white wire from the outlet and reset the cap. Connect the black wire coming from the light fixture not the hot wire to either one of the black screws on the switchit doesnt matter in this case.
Your switch may have slots to push the wires straight into place rather than use the screws on the side. Some switches will have slots that you can slide a straight wire into and tighten it down with the screw which is definitely easier than wrapping the hooked wire around the screw. The black wire should be installed at the top wire screw on the back side of the switch. Install a new black wire to the bottom wire screw on the switch located beneath the top connection just made. Repeat with the black wires. Learn how to wire up a plug in light and switch.
These will be the only wires connected to the switch. Connect the black incoming wire to the switch to be installed in the circuit using the screwdriver. Hold the ends of the white wires of the cord and light fixture together so they are parallel and twist them clockwise with the pliers. The wire strippers should have a spot marked for each gauge wire. 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. Wiring diagrams for switch to control a wall receptacle do it with regard to how to wire a plug and switch diagram image size 500 x 328 px and to view image details please click the image.