In my bathroom there was originally a ceiling light on a switch & a vanity light with a pull chain. I bought a vanity light to wire onto a switch & tried to wire it to work independently of the ceiling light. When I removed the old vanity light the neutral wire was connected with 2 other neutral wires so I just assumed that it was likely the ceiling lights neutral & the neutral going to the breaker. So, I just put the new lights neutral onto it. I ran a new wire from the light to the switch load screw & just reconnected the 2 black wires that were formerly connected to the old vanity light's power to themself. I am using the Wago lever nuts to join wires together instead of the twist nuts. To add a hot line wire I just spliced it into the hot line wire going to the original switch. The problem is now the vanity light will only turn on if the ceiling light is also turned on. Previously the pull chain vanity light could turn on independently of the ceiling light.
Edited for clarification & to add crude diagrams of wiring as requested.
Ok, so I didn't really know how to just add the information requested in one of the answers other than by editing my original question, my apologies if this is not the method I'm supposed to use. I tried to find it on in the FAQs but wasn't finding any other way to do it. I'm also sorry I wasn't able to respond quicker. I don't really have any software more suitable for making a diagram so I was left with using MS Paint to do a crude sketch of the wiring. The diagrams are not to scale & the first one will be the diagram of the old wiring with the pull chain vanity light while the 2nd one is the diagram of the new wiring with the switch connected vanity light.
In the Old Wiring drawing:
- Rectangle A = Toggle Switch
- Circle B = Ceiling Light
- Squircle C = Vanity Light
- Diamond D = Dual Grounded Outlet
- Black Lines = Black Electrical Wire
- Blue-ish Lines = White Electrical Wire
- Red Line = White Electric Wire serving as Toggle Switch A Load Line to Ceiling Light B
- Black Stars = Spots where electric lines are connected together.
In the New Wiring drawing:
- Square E = 2nd Toggle Switch for Vanity Light
- Orange Line = Black Electric Wire serving as 2nd Toggle Switch E Load Line to Vanity Light C
- I forgot to add this but behind Vanity Light C the Orange Line should be connected with the black wire coming out of Vanity Light C in a 3rd star behind the light.
So, first off I should say that these drawings are not to scale in any way.
Now, as is pretty noticble the only electrical line that is fully connected to anything is the Orange Line in the new drawing because I am the one that ran it. On all the other ones I do not know exactly how they are ran because as I stated they go through the walls & I had already put 3 holes in the wall as is & I didn't want to put another half dozen or so to trace it in between every stud. The studs had holes drilled through them large enough for the wires to be ran through but the wires prevented me from being able to see through the hole to see how it continued on through the other side. The probably odd path that the Orange Line takes in the new drawing is due to me cutting through a wall corner at one part & the the semi-circle part of the path is me coming out in the top part of a closet wall to run it down & back into the wall half a foot later to reach the light.
This was the way I did it to again avoid putting a hole in the wall in between every stud to run it the entire wire along the original wirings path & instead use just the holes in the wall that were either already there:
- Previous vanity light hole
- Hole where the first toggle switch was
Or the holes I newly had to make:
- New vanity light hole since I raised its height on the wall up
- Hole on outside bathroom wall behind Toggle Switch A
- Outside bathroom wall on other side of first stud beside Toggle Switch A to see for wiring purposes.
- Eventually a new slightly higher on the wall for Toggle Switches A & E to be added in a new work dual gang box.)