Method AdjustColorTemperatureAsync
- Namespace
- Yeelight
- Assembly
- YeelightClient.dll
AdjustColorTemperatureAsync(int, TimeSpan?, CancellationToken)
Changes the colour temperature by a percentage of what it is now.
public Task AdjustColorTemperatureAsync(int percentage, TimeSpan? duration = null, CancellationToken cancellationToken = default)
Parameters
percentageintThe percentage to change it by, from -100 to 100.
durationTimeSpan?How long the change takes, or
nullfor the shortest time that a light supports (30 milliseconds).cancellationTokenCancellationTokenTo stop waiting for the answer.
Returns
- Task
A task that ends when the light has answered.
Exceptions
- ArgumentOutOfRangeException
An argument is out of the range that the protocol allows.