It would help if you also wired the light in series with a resistor. The resistor will help protect the light from damage in case of a power surge. The resistor value needed will depend on the specific light you are using.
When working with electrical systems, it is essential to take precautions against shock. Make sure that the power is off before you start working on the light. Also, ensure that you are using the correct tools and equipment.