Table of Contents

Method ToggleAsync

Namespace
Yeelight
Assembly
YeelightClient.dll

ToggleAsync(CancellationToken)

Switches the light off when it is on, and on when it is off.

public Task ToggleAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

To stop waiting for the connection.

Returns

Task

A task that ends when the command has been sent.

Exceptions

YeelightException

The connection is lost.