Table of Contents

Method TurnOffAsync

Namespace
Yeelight
Assembly
YeelightClient.dll

TurnOffAsync(TimeSpan?, CancellationToken)

Switches the light off.

public Task TurnOffAsync(TimeSpan? transition = null, CancellationToken cancellationToken = default)

Parameters

transition TimeSpan?

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

cancellationToken CancellationToken

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