Пример #1
0
        public Q42HueDevice(Q42HueNetwork network, Light light)
            : base(network, DeviceType.MultilevelSwitch)
        {
            HueNetwork    = network;
            BackingObject = light;

            _binarySwitch     = new Q42HueBinarySwitch(this);
            _multilevelSwitch = new Q42HueMultilevelSwitch(this);
            _colorSwitch      = new Q42HueColorSwitch(this);

            Name        = light.Name;
            Address     = light.Id;
            IsConnected = light.State.IsReachable;
        }
Пример #2
0
        public Q42HueDevice(Q42HueNetwork network, Light light)
            : base(network, DeviceType.MultilevelSwitch)
        {
            HueNetwork = network;
            BackingObject = light;

            _binarySwitch = new Q42HueBinarySwitch(this);
            _multilevelSwitch = new Q42HueMultilevelSwitch(this);
            _colorSwitch = new Q42HueColorSwitch(this);

            Name = light.Name;
            Address = light.Id;
            IsConnected = light.State.IsReachable;
        }