A system for detecting a container (58) or contents of the container. The system includes a diffuser (52) for retaining the container, where the container is configured to hold an active material therein and may include a wick (60) extending therefrom. The system further includes a sensor positioned to detect, for example, the container retained in the diffuser and / or the contents of the container retained in the diffuser.