A few months ago I did some rewiring in my home (which I live in, but my father owns). I'm just an IT guy, not an electrician, but I try to keep some knowledge of code so my IT requirements don't end up wasting everyone's time asking an electrician to install something he isn't allowed to do. And I do have a fair knowledge of electronics, and the math behind it.
My father needed an outlet on the back wall of the laundry room, which had none at all. He needed this for a timer controlled set of light for his garden seedlings. These lights were 4 fluorescent utility strips set up on one of those wire shelving systems with the vertical poles like seen in restaurants. We got the shelves and lights at one of the home supply chain stores.
This house has had a few electrical issues with it, already, mostly poorly placed switches and lack of outlets. This back wall area was designated for shelf storage, and perhaps that is why the electrician chose to omit an outlet.
The back of the laundry room did have a small overhead light which was controlled by a switch. I pulled out the switch to see if it was wired on a loop, or if the light was a branch out from the switch. I found 3 NM cables landed in the box. So I assumed there was constant power in the box and bought a duplex device with a switch and single 5-15R. The circuit was protected at 15 amps and the wiring was AWG 14 CU.
One wiring nut had the uninsulated wire from all 3 cables, plus a spur connected to the grounding terminal of the switch under a green screw. Another wiring nut had the white wires from all 3 cables. The third wiring nut had the black wires from cables A and B, which entered the box together on one side, plus a spur connected to one terminal of the switch. The black wire from cable C, which entered the box on the other side by itself, was connected to the other terminal of the switch.
This all seemed fine to me. I assumed the circuit was passing through the switch box via cables A and B and going on to other devices. I felt I did not need to determine whether it was A or B that was the power source, since there would be no difference in how they were connected, and would be connected together.
So I wired in the duplex device. For the grounding wire, I left the existing nut in place and used the existing spur to connect to the grounding terminal of the new device. For the neutral wire, I opened the nut and added a spur (a short piece of white THHN), which was connected to the neutral side of the outlet part of the device. For the hot wire, I left the existing nut in place and used the existing spur to connect to the hot side of the outlet. The device had a tab between the outlet hot and a terminal of the switch, which I left in place. The black wire from cable C was then connected to the remaining terminal of the switch.
I carefully made sure all wires were safe while hanging out from the box and did an initial "smoke test" by turning on the breaker. The panel was in the garage adjacent to the laundry room. So I briefly turned on the breaker to be sure I had not wired in a solid short circuit. The light came on. The breaker did not trip back off. So I switched the breaker back off and proceeded to push everything back in the box.
Then I discovered that it was not working as expected. The overhead light fixture that the previous switch controlled was now permanently on. The switch I just installed was controlling the outlet which was not what I wanted.
Apparently my assumption about the pass through circuit was wrong. I was rather puzzled as to how these cables were wired. Since my new switch was between the lone black wire, and the wire nut with the other black wires, as was the original switch, I made a new assumption that cable C was the power source, and one or both of cables A and B went to the light. So I swapped the 2 black wires that were going to the device. I repeated the smoke test, pushed everything back in the box, and tested the operation. It now worked exactly as intended (outlet always live and switch controlled overhead light).
There are two things about this that puzzle me. The big one is why the light fixture was permanently on. I didn't break the wire nut for the black wires, so I only had the two black wires (the spur and the one from cable C) to connect across the switch. Either way, opening the switch should have worked the same. The other thing that puzzles me is why there are 2 cables controlled by the switch. To be sure, I did a thorough survey of outlets and fixtures around the house near the laundry room to be sure that everything was working as expected. All outlets and lights were live when the installed switch was off. I also used a tester and verified that the outlet was wired right and neutral/hot had not been reversed.
So it would appear that the switch box was at the end of the circuit, or at the end of a branch-off of the circuit, since it didn't feed live power to another cable. There is no dummy junction box around, so if it is a branch-off, it must be coming from a box for some existing device, unless the electrician that wired the house made an unboxed junction somewhere. It may simply be the very end of the circuit.
But why there are 2 cables going out I do not know. This is what puzzles me. There are 2 cables with switched power, at least one of which is connected to the light fixture. If the other lands in a box somewhere, I have no idea where. I didn't want to spend the effort to start opening up other boxes to see where it might be. It would surely have to be capped off wherever it went.
Anyone have any idea what it might be? There were a few plan changes made when the house was built, so that might explain it. It may explain why the back wall of the laundry room has no outlets, as that had originally been intended to be all closet space with that light inside. It doesn't explain why one wall of one bedroom has no outlets.
One last question. Did I need to make a new outlet in the laundry room be GFCI protected? I have never heard of a combination switch-outlet device with GFCI. But there is a wet basin about 10 feet away from the new outlet.