The present invention relates to a dispensing device for at least one air treatment agent comprising at least one airborne agent detector operable to detect airborne agents in the air; receiving means for receiving at least one source of air treatment agent; and control means for releasing an amount of at least one air treatment agent from a source thereof received in the receiving means when a current airborne agent level detected by the airborne agent detector deviates from a background airborne agent level detected by the airborne agent detector by more than a predetermined amount, wherein the background airborne agent level is calculated by the device. The present invention also relates to a method of dispensing at least one air treatment agent.