A method of controlling air quality in an indoor environment of a building by a system that comprises a carbon dioxide sensor configured to detect an instantaneous value of carbon dioxide concentration in the air of the indoor environment of the building, a volatile organic compound sensor configured to detect an instantaneous value of volatile organic compounds in the air of the indoor environment of the building, a control unit in signal communication with the carbon dioxide sensor and with the volatile organic compound sensor , a communication unit for establishing signal communication between the carbon dioxide sensor and the volatile organic compound sensor on the one hand and the control unit on the other hand, a storage unit in signal communication with the control unit , the method comprising the steps of: - storing control values of carbon dioxide concentration and/or volatile organic compounds in the storage unit ; - detecting, by the carbon dioxide sensor , an instantaneous value of carbon dioxide concentration and sending it to the control unit , - detecting by the volatile organic compound sensor an instantaneous value of volatile organic compound concentration and sending it to the control unit ; - processing, by the control unit , the control values and the instantaneous values of carbon dioxide and volatile organic compound concentration to generate an output signal representative of the air quality detected by the sensors ; - sending the output signal to a visual and/or acoustic warning unit . characterized in that it comprises the additional steps of: - defining a maximum air purification time interval corresponding to the maximum duration of an environment ventilation step; - defining a first critical threshold for volatile organic compound concentration; - defining a second critical threshold for volatile organic compound concentration whose value is higher than the first critical threshold; - determining, when volatile organic compound detection is being performed, whether the time elapsed since the last environment ventilation is more than the maximum air purification time interval and volatile organic compound concentration is higher than the first critical threshold, and when this is determined to be so, sending an output signal indicative of the need to perform environment ventilation. - storing control values of carbon dioxide concentration and/or volatile organic compounds in the storage unit ; - detecting, by the carbon dioxide sensor , an instantaneous value of carbon dioxide concentration and sending it to the control unit , - detecting by the volatile organic compound sensor an instantaneous value of volatile organic compound concentration and sending it to the control unit ; - processing, by the control unit , the control values and the instantaneous values of carbon dioxide and volatile organic compound concentration to generate an output signal representative of the air quality detected by the sensors ; - sending the output signal to a visual and/or acoustic warning unit . - defining a maximum air purification time interval corresponding to the maximum duration of an environment ventilation step; - defining a first critical threshold for volatile organic compound concentration; - defining a second critical threshold for volatile organic compound concentration whose value is higher than the first critical threshold; - determining, when volatile organic compound detection is being performed, whether the time elapsed since the last environment ventilation is more than the maximum air purification time interval and volatile organic compound concentration is higher than the first critical threshold, and when this is determined to be so, sending an output signal indicative of the need to perform environment ventilation. <EOS>