I have an electrical switch that controls a recessed light. I need to move the switch, taking down the wall it is on. My questions is, why are there three wires in there? I understand that one of them is for power into the switch, 2nd one for power out to the light not sure what the third one is for? It is almost impossible for me to trace the line as it goes up into the ceiling.
Power in, power out, switch leg to light. Good Luck
it might be a 2 way lighting circuit If it is 2way it will have Com L1 and L2 All wired up How many cables come into the switch also does the 3third cable run to a separatecable or it just one cable as it could be 3core+Earth and that is for immediate switches it is unlikely but you do get people who do it wrong
Sounds as though you may have a two way switch to a lamp controlled by another switch in a different location but you don't say colour codes so difficult to be specific
If it's three separate 14-2's odds are whoever wired your place just passed a hot through the switch box. One wire goes to the light, one is carrying voltage into the box, the other continues to somewhere else, most likely a plug or another nearby switch. Try (with the power off) taking one of the wires loose. Put power back on the circuit and see what works. If nothing works, the wire you took loose is the hot coming inif the light works then look around and see what else is off.
In North America a bare or green wire is a ground wire for safety. If it is a red wire then it is probably a traveler that goes to another switch to control the same light. In practice you have 2 switches that can control the same light.