Need assistance wiring ceiling fan/light to wall switch with dimmer
The celing outlet has one 3-conductor wire running to the wall outlet (black, white, red, ground). I hooked up the celing fan's white to outlet's white, the ground to ground and then ceiling fan's black to black. I also hooked the fan's light wiring (blue) to the outlet black.
FAN OUTLET
Gnd --> Gnd
White --> White
Black --> Black
Blue --> Black
At the wall there are two 3-conductor wires running into the outlet. I'm trying to install a new switch with a dimmer slider. The light works when the switch is turned on, it even dims. But when the fan is on and the dimmer is lowered, the fan motor slows down as well. I'm thinking that I should have hooked the blue ceiling fan wire to the red ceiling outlet wire. And then that red wire to the switch.
Right now the wire that comes from the ceiling has it's white wire connected to the second white wire. The red is not used. The gnd is hooked to the switch. The black is connected to the switch. The second wire's black is hooked to the switch and the red is not used.
Does anyone know if hooking the blue to the red and the connecting the red to the switch is the right way to go to solve my dimming motor issues?