I replaced the bathroom heat-lamp/vent-fan unit, and replaced the whole double switch because I had to keep pressure on one of them to keep it on. Couldn’t get the new switch (from Home Depot) to work no matter how I wired it; some combination of nothing coming on or everything coming on at once. Put the old switch back on and it worked fine (except for the needed pressure). Bought another switch, same thing. It was the same brand and lot # though.
Found a different brand at the actual electrical supply house, and it almost works. The first time I turned one switch on, both the heat and vent came on. Turned it off and back on, and they worked properly, independently. Except that every once in awhile, while the heat switch is on, the vent fan will come on for a few seconds, or vice versa.
My first thought is that this problem might be because everything is so electronic and computerized and all that crap now (unreliable…). But could it be a bare spot in the wires inside the wall or something? Scary thought.
More work is needed: disassemble the fan enough to get to the wiring connections. there should be a white wire that will hook to the whites from the fan, heat, light and the incoming neutral. now check the connections to the different devices and write down which wire hooks to the heat, light and fan. Next, go to the switches and compare; one black should be the hot wire coming into the switch box. there should be one or two cables going from the switch box to the heat-vent-lite. compare the wires hooking to the switches to the connections in the box on the h-v-l. I ususally use a separate cable for the heat as it may require a separate circuit to keep the light from dimming. if you have a 3-wire cable and a 2-wire cable, the 2-wire could operate the heat portion and the 3-wire cable could operate the light and vent, with the whites in both cables being a neutral.
The biggest issue with a HVL switch is making sure you get the hot in the right place on the switch. It sounds like that is what is causing your problem. Lets say I mistakenly one time put the hot where the light switch leg goes and the light switch leg where the hot goes. Turn the switch on light works, makes a circuit. The fan and and heat work also. So all is great. Nope heat and fan did not work when the light was off. Get them really missed up like say fan leg where hot goes, hot to where light goes, light where fan goes and heat in the right place. Nothing will work without the fan and light both being on. Not sure what would cause your fan to come on and shut off. You have 4 wires and if my math is right some where around 24 different wire combinations. Only one gets you what you want.