Table of Contents

Method GetPropertiesAsync

Namespace
Yeelight
Assembly
YeelightClient.dll

GetPropertiesAsync(IEnumerable<string>, CancellationToken)

Reads properties of the device with get_prop. What the device says is taken over by this object as well.

public Task<IReadOnlyDictionary<string, string>> GetPropertiesAsync(IEnumerable<string> names, CancellationToken cancellationToken = default)

Parameters

names IEnumerable<string>

The names of the properties, as the protocol has them: power, bright, ct, rgb, hue, sat, color_mode, flowing, delayoff, flow_params, music_on, name, bg_power, bg_flowing, bg_flow_params, bg_ct, bg_lmode, bg_bright, bg_rgb, bg_hue, bg_sat, nl_br and active_mode.

cancellationToken CancellationToken

To stop waiting for the answer.

Returns

Task<IReadOnlyDictionary<string, string>>

The values by name, as text. A property that the device does not know has an empty value, as in the protocol.

Exceptions

ArgumentNullException

names is null.

ArgumentException

names is empty, or has a name that is.

YeelightException

The command did not succeed.