Garmaine Staff asked 1 year ago

I recently bought a house and decided to put a ceiling fan in the master bedroom. There was no light fixture when I got there, but there was wiring and a switch, so I figured it was fine. Installed the light fixture, tried to turn it on, nothing. Opened up the switch box and found there to be one cable coming in and one cable coming out, and as far as I can tell, not going anywhere (for the rest if this post, I just ignore this cable) . Went into the attic and found that the wiring leading to the light receptacle is simply disconnected. So I fed it down to the light switch box and wired it in the logical manner. Connected the whites, connected the grounds to the box, connected the black from the house to the bottom of the switch, and the black from the light fixture to the top. Still nothing. Using a voltage tester, I found that the white wire leading into the box is hot, but unmarked (weird). So I switched the white and black coming from the house into the box. It is now hooked up in the following way: both grounds connected to box, hot white from house going to bottom of switch, black to fan going into top of switch, black from house connected to white from fan. The light is still not working. When I have the switch on and the fan's light string on, a non contact voltage tester detects voltage at the light bulbs and at the neutral wire coming from the fan. All other electric in the room is working, and the switch does not appear to be wired in series with the sockets. Help! I'm an amateur (obviously) and I'm out of my depth.