Here is a possible solution to prevent the wastage of energy if you forget to switch off the bathroom or terrace lamp. Once it is switched on, it stays on for 22 minutes and then automatically turns off. The lamp will turn on only if the switch is turned off and turned on again.Save Energy. It is precious.
See circuit in this link http://www.engineersgarage.com/contribution/automatic-lamp