Wiring new ceiling fan to existing light switch box

lightingwiring

I will be installing a ceiling fan/light kit in our bedroom that did not have any sort of ceiling fixture before. Currently, the only light switch in the room is a two-way switch that controls the top half of a wall outlet (the jumper tab is broken off on the outlet).

My plan was to install a double-gang box in the wall where the current light switch is and run the new 14/2 cable through the attic to the new fan. When I took out the existing light switch i noticed this configuration, where the white wire is always hot and the black is switched hot:

enter image description here

Then within the box is the following:

enter image description here

I know it may be tough to make out but one set of nutted wire are two white wires coming out of the wall. The second set are three wires, the black and white coming from the switch and a red line wire coming from the wall.

My question is, if I want to add a second light switch for independent control of a new ceiling fan, how do I tie that into the current wiring configuration?

Best Answer

You can't have one switch operate light OR fan. Many jurisdictions absolutely require that a switch on the wall near a room entrance, control a lamp. That is to benefit house guests and mainly from the government's perspective, first responders. There's an exception to allow a switched outlet instead, presuming a person is going to plug a floor lamp into that. There is no exception to allow a fan/light locally switched at the fan. (such things can exist, they can't be the only light). That said:

They now make gadgets to solve the "I have 14/2 and wish I had 14/3" problem. Each has a smart switch (typically 1-gang) with 2 controls, and a control module which sits under the fan shroud. The switch communicates with the module either via powerline networking or via wireless, and some of those are compatible with smartphones or integrated home-automation systems as are now emerging in the market.