Table of Contents

Method SetSceneAsync

Namespace
Yeelight
Assembly
YeelightClient.dll

SetSceneAsync(YeelightScene, CancellationToken)

Sets the light directly to a scene, switching it on first when it is off.

public Task SetSceneAsync(YeelightScene scene, CancellationToken cancellationToken = default)

Parameters

scene YeelightScene

The scene.

cancellationToken CancellationToken

To stop waiting for the answer.

Returns

Task

A task that ends when the light has answered.

Exceptions

ArgumentNullException

scene is null.