A device (1) comprising a cavity (5) defining an internal volume, an air quality sensor (9) being adapted to measure a concentration of at least one air compound present in the internal volume, the cavity (5) can be alternatively in:- an open state in which air can enter into the cavity (5) from the outside of the cavity (5), and- a closed state in which no air can circulate between the outside and the inside of the cavity (5),the air quality sensor (9) being adapted to be calibrated when the cavity (5) is in the closed state and once the internal volume no longer comprises the air compound or comprises a concentration of the air compound that is below a predefined threshold.