Method SetColorTemperatureAsync
- Namespace
- Yeelight
- Assembly
- YeelightClient.dll
SetColorTemperatureAsync(int, TimeSpan?, CancellationToken)
Sets the colour temperature.
public Task SetColorTemperatureAsync(int kelvin, TimeSpan? transition = null, CancellationToken cancellationToken = default)
Parameters
kelvinintThe colour temperature, from 1700 to 6500.
transitionTimeSpan?How long the change takes, or
nullfor a sudden one.cancellationTokenCancellationTokenTo stop waiting for the connection.
Returns
- Task
A task that ends when the command has been sent.
Exceptions
- ArgumentOutOfRangeException
An argument is out of the range that the protocol allows.
- YeelightException
The connection is lost.