예제 #1
0
        /// <summary>
        /// Adjusts the state of the device
        /// </summary>
        /// <param name="action"></param>
        /// <param name="property"></param>
        /// <returns></returns>
        public async Task <bool> SetAdjust(AdjustAction action, AdjustProperty property)
        {
            List <object> parameters = new List <object>()
            {
                action.ToString(), property.ToString()
            };

            CommandResult <List <string> > result = await ExecuteCommandWithResponse <List <string> >(
                method : METHODS.SetAdjust,
                parameters : parameters);

            return(result.IsOk());
        }
예제 #2
0
        /// <summary>
        /// Adjusts the background light state
        /// </summary>
        /// <param name="action"></param>
        /// <param name="property"></param>
        /// <returns></returns>
        public async Task <bool> BackgroundSetAdjust(AdjustAction action, AdjustProperty property)
        {
            {
                List <object> parameters = new List <object>()
                {
                    action.ToString(), property.ToString()
                };

                CommandResult result = await ExecuteCommandWithResponse(
                    method : METHODS.SetBackgroundLightAdjust,
                    id : (int)METHODS.SetBackgroundLightAdjust,
                    parameters : parameters);

                return(result.IsOk());
            }
        }