Table of Contents

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

percentage int

The percentage to change it by, from -100 to 100.

duration TimeSpan?

How long the change takes, or null for the shortest time that a light supports (30 milliseconds).

cancellationToken CancellationToken

To 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.