Table of Contents

Method SetHsvAsync

Namespace
Yeelight
Assembly
YeelightClient.dll

SetHsvAsync(int, int, TimeSpan?, CancellationToken)

Sets the colour as a hue and a saturation.

public Task SetHsvAsync(int hue, int saturation, TimeSpan? transition = null, CancellationToken cancellationToken = default)

Parameters

hue int

The hue, 0 to 359.

saturation int

The saturation, 0 to 100.

transition TimeSpan?

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

cancellationToken CancellationToken

To stop waiting for the connection.

Returns

Task

A task that ends when the command has been sent.

Exceptions

ArgumentOutOfRangeException

An argument is out of the range that the protocol allows.

YeelightException

The connection is lost.