public static async void SetHue(LightBulb target, ushort newHue) { Debug.Log(target.HostName + ".Hue = " + newHue); var last = LastOnLightState; await Client.SetColorAsync(target, newHue, last.Saturation, last.Brightness, last.Kelvin, TimeSpan.FromTicks(0)); LastOnLightState = (await Client.GetLightStateAsync(target)); }
public LifxData GetBulbInfo(LightBulb b) { var state = _client.GetLightStateAsync(b).Result; var d = new LifxData(b) { Power = _client.GetLightPowerAsync(b).Result, Hue = state.Hue, Saturation = state.Saturation, Brightness = state.Brightness, Kelvin = state.Kelvin, TargetSector = -1 }; return(d); }