A coffee machine comprising: a water supply; a water heater for heating water to generate steam and hot water, and having a water heater outlet; a pump for pumping the heated water and steam; a steam delivery nozzle; a brew chamber for brewing coffee with hot water; a water collection unit for collection or discharge of waste water; and a valve arrangement for controlling the coupling of the water heater outlet selectively to the steam delivery nozzle, the brew chamber and the water collection unit, wherein the valve arrangement comprises: an inlet channel coupled to the water heater outlet; a steam outlet, a brew chamber outlet, a water collection outlet; a rotatable routing element (72;84), wherein the angular position of the routing element controls the coupling of the inlet channel to one of the outlets; characterized in that the coffee machine comprises a motor for driving the brew chamber between different positions including at least a ground coffee receiving position and a brew position; and in that the valve arrangement comprises a rotational coupling between the motor and the rotatable routing element (72;84) wherein rotation of the rotatable routing element is done through the same motor that drives the brew chamber between its different positions, such that when in the ground coffee receiving position, the valve arrangement is for example controlled to couple the inlet channel to the water collection outlet, when in the brew position, the valve arrangement is for example controlled to couple the inlet channel to the brew chamber outlet, when between the ground coffee receiving position and the brew position, the valve arrangement is for example controlled to couple the inlet channel to the steam outlet for enabling milk heating and/or frothing. a water supply; a water heater for heating water to generate steam and hot water, and having a water heater outlet; a pump for pumping the heated water and steam; a steam delivery nozzle; a brew chamber for brewing coffee with hot water; a water collection unit for collection or discharge of waste water; and a valve arrangement for controlling the coupling of the water heater outlet selectively to the steam delivery nozzle, the brew chamber and the water collection unit, wherein the valve arrangement comprises: an inlet channel coupled to the water heater outlet; a steam outlet, a brew chamber outlet, a water collection outlet; a rotatable routing element (72;84), wherein the angular position of the routing element controls the coupling of the inlet channel to one of the outlets; an inlet channel coupled to the water heater outlet; a steam outlet, a brew chamber outlet, a water collection outlet; a rotatable routing element (72;84), wherein the angular position of the routing element controls the coupling of the inlet channel to one of the outlets; the coffee machine comprises a motor for driving the brew chamber between different positions including at least a ground coffee receiving position and a brew position; and in that the valve arrangement comprises a rotational coupling between the motor and the rotatable routing element (72;84) wherein rotation of the rotatable routing element is done through the same motor that drives the brew chamber between its different positions, such that when in the ground coffee receiving position, the valve arrangement is for example controlled to couple the inlet channel to the water collection outlet, when in the brew position, the valve arrangement is for example controlled to couple the inlet channel to the brew chamber outlet, when between the ground coffee receiving position and the brew position, the valve arrangement is for example controlled to couple the inlet channel to the steam outlet for enabling milk heating and/or frothing.