Table of Contents

API reference

This reference is generated from the XML documentation in the source of the library. Every public member has a description, the exceptions that it throws and, where it matters, the limits of the protocol that it keeps to.

Start here

Type What it is
YeelightClient The client: it finds the lights, keeps the list of them and a connection to each, and raises the events.
YeelightDevice A light that was found: its identity, its state, the commands of its main light, and what concerns the device as a whole (its name, its timer, its connection, music mode).
YeelightLight The state and the commands of one light. YeelightDevice is one, and so is its background light.
YeelightBackgroundLight The second light of a device that has one (some ceiling lights): the same commands and properties, from YeelightDevice.Background.
YeelightMusicSession A light in music mode: commands without the limit of 60 a minute.
ColorFlow, ColorFlowStep, YeelightScene Colour flows and scenes.
YeelightException, YeelightResult What a failed command throws, and the answer that SendCommandAsync returns. See Errors and limits.
YeelightClientOptions The settings of a client: connecting, timeouts, the limit of commands, and how lights are searched for.
YeelightLimits The limits of the protocol: ranges of values, the shortest transition, the connections and commands that a light accepts.

The namespace

Everything is in one namespace, Yeelight.

Contains Types
The client and the lights YeelightClient, YeelightDevice, YeelightLight, YeelightBackgroundLight, YeelightMusicSession
Flows and scenes ColorFlow, ColorFlowStep, YeelightScene
Options and limits YeelightClientOptions, YeelightLimits
Failures YeelightException, YeelightResult, YeelightError, and the enumeration YeelightFailureKind
Events DeviceDiscoveredEventArgs, DeviceStateChangedEventArgs
Enumerations ColorMode, PowerOnMode, AdjustAction, AdjustProperty, ColorFlowAction, ColorFlowMode, ActiveMode, YeelightFailureKind

Looking for a command?

The commands are async methods of the lights, named after what they do. The commands of one light are on YeelightLight, for example SetBrightnessAsync and StartColorFlowAsync, and a YeelightDevice and its Background light both have them. What concerns the whole device is on YeelightDevice, for example SetNameAsync, SetSleepTimerAsync and StartMusicModeAsync. Finding lights is on YeelightClient: DiscoverAsync and ProbeAsync.

Use the search box at the top of the page, or open the class and look through its members. The articles explain the concepts, The protocol at a glance lists the member that sends each method of the protocol, and the test app lets you try a command by hand.