コード例 #1
0
ファイル: LifxController.cs プロジェクト: eidetic-av/Adamooka
    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));
    }
コード例 #2
0
ファイル: LifxDiscovery.cs プロジェクト: iainconnor/glimmr
        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);
        }