Skip to main content

A Python library for controlling YeeLight RGB bulbs.

Project description Documentation Status

yeelight is a simple Python library that allows you to control YeeLight WiFi RGB LED bulbs through your LAN.

For a command-line utility that uses this library, see yeecli.


There are many ways to install yeelight:


To use yeelight, first enable “development mode” on your bulb through the YeeLight app. Then, just import the library into your project like so:

>>> from yeelight import Bulb

Afterwards, instantiate a bulb:

>>> bulb = Bulb("")
>>> bulb.turn_on()

That’s it!

Refer to the rest of the documentation for more details.

The library also contains a (currently undocumented) asyncio interface.


If you’d like to contribute to the code, thank you! To install the various libraries required, run (preferably in a virtualenv):

$ pip install -Ur requirements_dev.txt

In order for your MR to pass CI, it needs to be checked by various utilities, which are managed by pre-commit. pre-commit will be installed by the above command, but you also need to install the pre-commit hook:

$ pre-commit install

The hook will run on commit. To run it manually (e.g. if you’ve already committed but forgot to run it, just run):

$ pre-commit run -a

Thanks again!


yeelight is distributed under the BSD license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for yeelight, version 0.7.5
Filename, size File type Python version Upload date Hashes
Filename, size yeelight-0.7.5-py3-none-any.whl (34.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size yeelight-0.7.5.tar.gz (48.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page