示例#1
0
        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);
        }