def LightPower(par): if(par['power-status'] == "On"): LightControl.turnOn(0) if(par['power-status'] == "Off"): LightControl.turnOff(0)