To get the required conyrol system I used magnetic relay as shown below:
In this I have used op-amp as comparator which will produce two different outputs based on input difference vlotage.
I have used 'normally opened' relay.
Working:
(1) Initially we set the control voltage more than the reference voltage, then output of the op-amp is positive and equal to the supply voltage of the op-amp.
(2) In this case the diode is forward biased and the relay is magnetized and the contact is attracted and ac mains supply connected to both LIGHT and FAN and they are operated properly.
(3) To stop the both LIGHT and FAN at the same time, we have to reduce the control voltage below the reference voltage, then output of the op-amp is negative supply voltage.
(4) In this case the diode is reverse biased and no current flow in the relay coil, so it is demagnetized and contact is removed by spring action.
(5) No ac power is connected to both LIGHT and FAN, so they tends OFF state.
(6) In this way we can OFF both LIGHT and FAN at the same time.
I hope this helps you.................