The subject matter described herein relates to a dispenser (100) comprising a top housing (102) and a bottom housing (104). The dispenser (100) further includes a heating assembly disposed in between the top housing (102) and the bottom housing (104). The heating assembly includes a plurality of heating elements (502). The heating assembly further includes a power supply unit (504) electrically coupled to each of the plurality of heating elements (502) to supply electric power to each of the plurality of heating elements (502) when the dispenser (100) is switched on. The heating assembly also includes a control unit (506) electrically coupled to at least one of the plurality of heating elements (502). The control unit is to switch off electric power supplied to at least one of the plurality of heating elements (502) after a pre-set period of time when the liquid dispenser (100) is switched on.