A device with a respirator (1) and with a humidifier (11) for breathing gas. Breathing gas humidification is adapted to the different operating states of the respirator (1). A connection (13) is provided for bidirectional data transmission between the control and operating unit (8) of the respirator (1) and the control and operating unit (9) of the humidifier (11).