A patient interface mask (5) for use with a breathing assistance apparatus includes a seal (24) that, in use, circumscribes a nose, mouth, or nose and mouth of a patient and defines an interior space of the mask. The mask includes an inlet (30) into the interior space and an outlet (34) from the interior space. A sensor (20) is positioned outside of the interior space and in the path of exit gases exiting the interior space through the outlet. The sensor detects a parameter of the exit gases, such as temperature, humidity or both.