In order for the light to be controlled by its own switch the wiring between the switch and the fan unit needs a fourth wire a red wire to carry power to the light kit.
Fan and light switch combo wiring.
Connect two of the black pigtail leads to the black wire coming from the receptacle.
These three in one fixtures work best when wired to a three function switch box allowing for individual control of the unit s functions from a single point.
Connect your white wires together and secure with wire nut.
The line voltage enters the switch outlet box and the hot wire will connect to every switch.
I also used a diagram picture thanks for watching.
Connect the green wire to your household ground wire copper bare wire.
I explain how i wired a ceiling fan on one part of the switch and the light on the 3 way part of the switch.
Combination light heater and fan units can be incredibly handy in smaller bathrooms and other home areas that lack heating and cooling vents.