Last refactoring - added lamp/fan power on/off