Table of Contents

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

kelvin int

The colour temperature, from 1700 to 6500.

transition TimeSpan?

How long the change takes, or null for a sudden one.

cancellationToken CancellationToken

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