/// <summary> /// Get current power state /// </summary> /// <returns></returns> public LifxPowerState GetPowerState() { LifxGetPowerStateCommand command = new LifxGetPowerStateCommand(); LifxCommunicator.Instance.SendCommand(command, this); LifxPowerStateMessage returnMessage = (LifxPowerStateMessage)command.ReturnMessage; return(returnMessage.PowerState); }
public async Task <LifxPowerStateMessage> GetPowerStateCommand() { LifxGetPowerStateCommand command = new LifxGetPowerStateCommand(); return(await LifxCommunicator.Instance.SendCommand(command, this) as LifxPowerStateMessage); }