Example #1
0
        /// <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);
        }
Example #2
0
        public async Task <LifxPowerStateMessage> GetPowerStateCommand()
        {
            LifxGetPowerStateCommand command = new LifxGetPowerStateCommand();

            return(await LifxCommunicator.Instance.SendCommand(command, this) as LifxPowerStateMessage);
        }