Ejemplo n.º 1
0
        private async void SetUp()
        {
            await BridgeConnecter.BridgeConnection().ConfigureAwait(false);

            if (BridgeConnecter.Connected)
            {
                hueListener = new Listener();
            }
            else
            {
                this.Disable();
            }
        }
Ejemplo n.º 2
0
        public async Task SendCommand(string color)
        {
            var command = new LightCommand();

            if (color == "000000")
            {
                command.TurnOff();
            }
            else
            {
                command.TurnOn().SetColor(new RGBColor(color));
            }

            await BridgeConnecter.getClient().SendCommandAsync(command);
        }