skillfed

yeelight

A Python library for controlling YeeLight RGB bulbs.

yeelight v0.7.16 133.3K downloads/30d#11,519 on PyPI
Permissive license DORMANT released

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 yeelight

uv

uv add yeelight

poetry

poetry add yeelight

Installing 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

License :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules

Tags

yeelight bulb control pythonwifi rgb led control librarysmart bulb lan controlyeelight discovery and commandsasyncio smart light controlcolor temperature brightness adjustmentmusic mode light sync
iot-controlhome-automationasyncio-ready

More Python Modules packages