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
sceneYeelightSceneThe scene.
cancellationTokenCancellationTokenTo stop waiting for the answer.
Returns
- Task
A task that ends when the light has answered.
Exceptions
- ArgumentNullException
sceneisnull.