A device for sterilizing water flowing through a sanitary appliance has a housing, which comprises an inlet and an outlet for the water; a UV lamp, which is disposed inside the housing and the radiation of which is directed towards the water flowing through; and a throughflow chamber for the water, which is disposed in the housing and surrounds the UV lamp. The push button includes a control panel having a seat depression and a switch controlling a function. A control unit is connected to the high voltage output unit and the low voltage output unit to control startstop time series of the high voltage output unit and the low voltage output unit so that the high voltage output unit and the low voltage output unit can be started asynchronously. The functions further include generating a first period stream based on one of the period types.