private static LsfEnums.LampType GetLampType(Q42.HueApi.Light light)
        {
            switch (light.ModelId)
            {
            case "LCT001":     // Hue bulb A19
            case "LWB004":     // Hue A19 Lux
                return(LsfEnums.LampType.LAMPTYPE_A19);

            case "LCT002":     // Hue Spot BR30
                return(LsfEnums.LampType.LAMPTYPE_BR30);

            case "LCT003":     // Hue Spot GU10
            case "LLC006":     // Living Colors Gen3 Iris
            case "LLC010":     // Hue Living Colors Iris
            case "LLC013":     // Disney Living Colors
            case "LLC007":     // Living Colors Gen3 Bloom, Aura
            case "LLC011":     // Hue Living Colors Bloom'
            case "LLC012":     // Hue Living Colors Bloom
            case "LST001":     // Hue LightStrips
            case "Beyond":
            case "Go":
            case "LLM001":                              // Color Light Module
            default:
                return(LsfEnums.LampType.LAMPTYPE_A19); //Default fallback
            }
        }
 public HueBulbDevice(Q42.HueApi.HueClient client, Q42.HueApi.Light light, string bridgeSerialNumber) : base(light.Name,
                                                                                                             light.ManufacturerName, light.ModelId, light.SoftwareVersion, light.UniqueId, light.Type)
 {
     Light = light;
     BridgeSerialNumber          = bridgeSerialNumber;
     base.LightingServiceHandler = new HueLightingServiceHandler(client, light);
     Icon = new AdapterIcon(new HueLampInfo(light).IconUri);
 }
Example #3
0
 public LightViewModel(HueLight light)
 {
     Id                     = light.Id;
     Name                   = light.Name;
     Brightness             = light.State.Brightness;
     ColourMode             = light.State.ColorMode;
     ColourTemperature      = light.State.ColorTemperature;
     ColourCoordinates      = light.State.ColorCoordinates;
     IsOn                   = light.State.On;
     IsReachable            = light.State.IsReachable;
     Hue                    = light.State.Hue;
     Saturation             = light.State.Saturation;
     TransitionMilliseconds = light.State.TransitionTime?.Milliseconds;
 }
 public HueLampInfo(Q42.HueApi.Light light)
 {
     _light = light;
 }
Example #5
0
 public HueLampDevice(Q42.HueApi.Light light) : this(false)
 {
     ((LightingService)this.lsf).SetupValues(light);
     this.Name = $"{light.Name} {PHILIPS}";
 }
 public HueLampInfo(Q42.HueApi.Light light)
 {
     _light = light;
 }
Example #7
0
 public JsonLight(Q42.HueApi.Light light)
 {
     Id    = light.Id;
     State = new JsonState(light.State);
 }
Example #8
0
 public Light(Q42.HueApi.Light light, HueUser user)
 {
     HueLight = light;
     HueUser  = user;
 }