Dryer, in particular drum dryer, comprising - a drying chamber for receiving objects to be dried, - a heat pump with an evaporator, a condenser, a throttle and a compressor, - a process air duct for feeding process air dried by the heat pump into the drying chamber and for discharging process air from the drying chamber in a drying chamber operation mode, - an exhaust air duct for discharging process air dried by the heat pump into a room in which the dryer is arranged, and a supply air duct for supplying process air from the room to the heat pump in a room air drying operation mode, - a controller, - switching means (7, 9-11) controllable by the controller, wherein the controller is designed to switch the dryer between the drying chamber operation mode and the room air drying operation mode by controlling the at least one switching means (7, 9-11), characterized in that the controller is designed such that the dryer can be switched automatically from the drying chamber operation mode to the room air drying operation mode, wherein - the switch to the room air drying mode after termination of the drying chamber operation mode takes place as soon as a degree of moisture of the objects to be dried, measured during the drying chamber operation mode, reaches a drying chamber moisture threshold value, in particular falls below it, or as soon as a predetermined drying time has elapsed, and/or - the switch to the room air drying mode takes place as soon as a measured room air humidity reaches a first room air humidity threshold value, and/or in that the controller is designed such that the dryer can be switched by the controller from the room air drying operation mode to the drum drying operation mode as soon as a measured room air humidity reaches a second room air humidity threshold value. - a drying chamber for receiving objects to be dried, - a heat pump with an evaporator, a condenser, a throttle and a compressor, - a process air duct for feeding process air dried by the heat pump into the drying chamber and for discharging process air from the drying chamber in a drying chamber operation mode, - an exhaust air duct for discharging process air dried by the heat pump into a room in which the dryer is arranged, and a supply air duct for supplying process air from the room to the heat pump in a room air drying operation mode, - a controller, - switching means (7, 9-11) controllable by the controller, wherein the controller is designed to switch the dryer between the drying chamber operation mode and the room air drying operation mode by controlling the at least one switching means (7, 9-11), characterized in that the controller is designed such that the dryer can be switched automatically from the drying chamber operation mode to the room air drying operation mode, wherein - the switch to the room air drying mode after termination of the drying chamber operation mode takes place as soon as a degree of moisture of the objects to be dried, measured during the drying chamber operation mode, reaches a drying chamber moisture threshold value, in particular falls below it, or as soon as a predetermined drying time has elapsed, and/or - the switch to the room air drying mode takes place as soon as a measured room air humidity reaches a first room air humidity threshold value, and/or in that the controller is designed such that the dryer can be switched by the controller from the room air drying operation mode to the drum drying operation mode as soon as a measured room air humidity reaches a second room air humidity threshold value.