Method TurnOffAsync
- Namespace
- Yeelight
- Assembly
- YeelightClient.dll
TurnOffAsync(TimeSpan?, CancellationToken)
Switches the light off.
public Task TurnOffAsync(TimeSpan? transition = null, CancellationToken cancellationToken = default)
Parameters
transitionTimeSpan?How long the change takes, or
nullfor a sudden one.cancellationTokenCancellationTokenTo stop waiting for the answer.
Returns
- Task
A task that ends when the light has answered.
Exceptions
- ArgumentOutOfRangeException
The transition is shorter than the light accepts.