Replaced bathroom fan/light

bathroomexhaust-fan

The bathroom fan/light went out and I replaced it. Apparently I did not hook wires up right.

There is a black encased wire with hot, neutral, and ground. There is a white encased wire with hot neutral, and ground. I hooked black to black on fan, blue to black, white to white and grounds to grounds.

When I turned power back on, the fan runs without light switch up. I swapped black and blue wires and the light stays on without switch on.

Help!

Best Answer

The black wire that is hooked up to the blue wire that keeps the light on, that is your always hot. Follow that wire back to the encasement and the white wire coming out of that encasement is your neutral. Hook that neutral up to only the white wires coming out of the fixture. Now take your always hot black and hook it to the remaining white wire in the other encased cable and mark it with some black tape. That wire now energizes the switch. Take the black wire in that encased cable and hook it up to the black wire and the blue wire from your fixture. Both fan and light should come on when operating the switch. Naturally, you want to turn off the power when you do any of this.