/// <summary> /// Adjusts background light /// </summary> /// <param name="action"></param> /// <param name="property"></param> /// <returns></returns> public async Task <bool> BackgroundSetAdjust(AdjustAction action, AdjustProperty property) { return(await Process((Device device) => { return device.BackgroundSetAdjust(action, property); })); }
/// <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()); }
/// <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()); } }
public bool SetAdjust(string deviceOrGroupName, AdjustAction adjustAction, AdjustProperty adjustProperty) { IDeviceController device = GetControllerDevice(deviceOrGroupName); return(device.SetAdjust(adjustAction, adjustProperty).Result); }
public async Task <bool> SetAdjust(string deviceOrGroupName, AdjustAction adjustAction, AdjustProperty adjustProperty) { IDeviceController device = _all[deviceOrGroupName] as IDeviceController; return(await device.SetAdjust(adjustAction, adjustProperty)); }