An e-nose device employing chemiresistive sensors with a thin nanoparticle film allows to perform a fast and accurate analysis of respiratory gases during anesthesia in real-time over the entire breathing cycle. A combinatorial selection of nanoparticles and organic linker molecules in the nanoparticle film allows to achieve a high selectivity, which is particularly suitable for detecting a change of anesthetics or analgesics over time.