The invention relates to a handheld aerosol-generating device. The handheld aerosol-generating device comprises an emitter (2), configured to emit light. Furthermore, the handheld aerosol-generating device comprises a sensor (4), configured to receive light, and an aerosol chamber (8), configured to comprise an aerosol. The emitter is further configured to emit light into the aerosol chamber. The sensor is further configured to receive light from the aerosol chamber and measure at least one wavelength of the spectrum of the received light.