yeelight
A Python library for controlling YeeLight RGB bulbs.
What it is and what it does
Yeelight is a Python library for controlling YeeLight WiFi RGB LED bulbs on your local network. It provides both synchronous and asynchronous (asyncio) interfaces to discover bulbs, query their state, and send commands—turning them on/off, adjusting brightness and color temperature, setting effects, and activating music mode. The library handles the low-level protocol communication, abstracting away socket details and command formatting so you can work with simple method calls.
The package depends on ifaddr for network interface detection, importlib_metadata for metadata access, and async-timeout for asyncio timeout handling. It requires Python 3.4 or later and supports a range of YeeLight bulb models (ceiling lights, color bulbs, strips, and dimmable variants). Setup requires enabling "development mode" on your bulb through the YeeLight app first. The library is dormant—last updated 563 days ago—so it works reliably for existing supported models but receives no active maintenance or new device support.
Use it for:
- Automate home lighting: turn bulbs on/off, adjust brightness, and change colors based on time of day or events.
- Build a smart home dashboard: query bulb state and send commands from a Python web app or CLI tool.
- Sync lights to music: use the music mode interface to drive bulb effects in response to audio input.
- Discover and control multiple bulbs: use the discovery API to find all YeeLight devices on your LAN and manage them programmatically.
- Integrate with home automation: use the asyncio interface to control bulbs concurrently in larger automation workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Control YeeLight WiFi RGB LED bulbs over LAN using synchronous or asyncio interfaces, discovering bulbs and sending commands like power, brightness, color, and effects.
Yes, if you own supported YeeLight bulbs and want programmatic control over LAN. The library is stable, has no known vulnerabilities, and installs with low friction. However, it is dormant—expect no new device support or active bug fixes. Verify your bulb model is in the supported list before committing; if you need cutting-edge device support or active maintenance, look for an alternative or fork.
Install
yeelight on PyPI
pip
pip install yeelightuv
uv add yeelightpoetry
poetry add yeelightInstalling yeelight
Before you install
Low friction: pure Python wheel with three lightweight runtime dependencies (ifaddr, importlib_metadata, async-timeout). Maintenance status is dormant—last release 563 days ago—so expect no active bug fixes or new device support, though the library remains functional for existing supported models.
License in practice
Distributed under BSD license (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install yeelight
from yeelight import Bulb
bulb = Bulb("192.168.0.5")
bulb.turn_on()
bulb.set_brightness(50)
Bulb must have "development mode" enabled via the YeeLight app before the library can connect to it.
Verify before relying
- Whether all bulb models listed in the changelog remain fully supported or if newer YeeLight hardware requires updates.
- Current state of asyncio interface stability and whether race condition fixes in v0.7.12+ resolved all known concurrency issues.
- Whether development mode requirement on the bulb is still necessary or if it has changed in recent YeeLight firmware.
- Specific color and brightness values supported by the API and whether they vary by bulb model.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — ifaddr, importlib_metadata, async-timeout |
| Maintenance | dormant — 563 days since the last release |
| First released | |
| Downloads | 133,323/month — #11,519 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: yeelight-0.7.16-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pywizlightA Python library and CLI tool for discovering…
permissive · top 15,000 on PyPI
flux-ledControls Magic Home and Surp Life WiFi LED…
copyleft · top 15,000 on PyPI
aiolifxaiolifx is an asyncio-based Python library for…
permissive · top 15,000 on PyPI
govee-api-laggatControls Govee LED strips and bulbs via the…
permissive · top 15,000 on PyPI
aiolifx-effectsProvides light effects for LIFX smart bulbs via…
permissive · top 15,000 on PyPI
wakeonlanSends wake-on-LAN magic packets to power on…
permissive · top 15,000 on PyPI
python-kasaControl TP-Link Kasa and Tapo smart home…
copyleft · top 15,000 on PyPI
pyvesyncAsynchronous Python library to discover,…
permissive · top 15,000 on PyPI
wledAn asynchronous Python client library for…
permissive · top 15,000 on PyPI
freebox-apiAsynchronous Python library for authenticating…
copyleft · top 15,000 on PyPI