Beispiel #1
0
        public void CreateSetColorRequestShouldReturnRequestWithCorrectProperties()
        {
            var request = RequestFactory.CreateSetColorRequest(Color.None, Percentage.MinValue, Temperature.None, 0);

            CheckRequestProperties(
                request,
                command: Command.LightSetColor,
                ackRequired: true,
                resRequired: false,
                payloadType: typeof(SetColorRequestPayload)
                );
        }
Beispiel #2
0
        private async Task SetPropertiesAsync(
            Color color,
            Percentage brightness,
            Temperature temperature,
            uint durationInMilliseconds,
            CancellationToken cancellationToken
            )
        {
            var request = _requestFactory.CreateSetColorRequest(color, brightness, temperature, durationInMilliseconds);

            await _communicator.CommunicateAsync(request, cancellationToken).ConfigureAwait(false);
        }