A temperature-measuring device for a respiratory humidifier (1) with a liquid container (5) is provided, wherein the temperature-measuring device comprises a flow channel (9) for breathing gas and an infrared detector (21), which is directed from the outside toward the flow channel (9) for the contactless detection of the temperature of the breathing gas in the flow channel (9), wherein the flow channel (9) comprises on its lateral surface (13) a measurement portion (15), which is aligned with the surrounding areas of the lateral surface (13) and toward which the infrared detector (21) is directed, wherein the flow channel (9) comprises a flow guide element (17), which conducts the breathing gas stream to the measurement portion (15) at a previously determined inflow angle of preferably greater than 10° and less than 170°.