Washing machine (1) having a method for powering it in the event of a power supply failure, wherein said washing machine (1) comprises: a drum, an opening with a water-tight door, a water inlet, at least one electronic control unit (5) and an auxiliary power source (3), wherein when the control unit (5) detects a power supply failure the washing machine (1) switches powering means from a main external power source (2) to said auxiliary power source (3) through the use of a switch (4).