Wrap a piece of black electrical tape around each end of this white wire to indicate that it is a hot wire rather than a neutral wire.
How to wire led lights to a wall switch.
Connect the black wire from the power supply to the white wire of the cable connected to the switch.
With a standard single pole dimmer a single switch controls the light.
With a three way dimmer you can control a light with two switches.
An illuminated wall switch has an internal circuit that provides just enough electricity to power an led in the rocker and this circuit becomes active only when the switch is off.
Another major defect of series lighting circuit is that as all lamps or bulbs are connected between line l and neutral n accordingly if one of the light bulb gets faulty the rest of the circuit will not work as the circuit will be open as shown in fig below.
Consequently the switch terminals are identical to those of a regular switch two brass ones for the hot connections and a green ground screw.
This lets you dim from one location and turn the lights on and off from another.
Run your cable from the first light to the second light.
Here you can see there is a cut in the line wire connected to lamp 3 so the bulb is switch off and the rest circuit is working.
Connect the black wire from the switch to the black.
You will need a three way dimmer and a three way switch.
How to wire 12v camper lights to a battery.