An ordinary automatic room power control circuit has only one light sensor. So when a person enters the room it gets one pulse and the lights come ‘on.’ When the person goes out it gets another pulse ...