Table of Contents

Class YeelightResult

Namespace
Yeelight
Assembly
YeelightClient.dll

The answer to a command, as the light gave it (or the failure that took its place).

public sealed class YeelightResult
Inheritance
YeelightResult
Inherited Members

Remarks

This is what SendCommandAsync(string, IReadOnlyList<object?>?, CancellationToken) returns. It does not throw for a command that did not succeed: look at Success, or call EnsureSuccess(string?).

Properties

Error

Gets the error, or null when the light accepted the command.

Id

Gets the number of the command that this answers, which is unique on the connection. It is 0 for a failure that has no answer.

Success

Gets whether the light accepted the command, which is when it did not answer with an error.

Values

Gets the values of the answer: "ok" for a command that was carried out, the values of the properties for get_prop, the timers for cron_get. A valid answer can be empty (the list of timers of a light that has none).

Methods

EnsureSuccess(string?)

Throws a YeelightException when the command did not succeed.

GetString(int)

Gets a value of the answer as text.

ToString()

Returns a string that represents the current object.