Skip to main content

A Python library for controlling YeeLight RGB bulbs.

Project description

https://gitlab.com/stavros/python-yeelight/badges/master/pipeline.svg https://gitlab.com/stavros/python-yeelight/badges/master/coverage.svg https://img.shields.io/pypi/v/yeelight.svg Documentation Status

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

Installation

There are many ways to install yeelight:

Usage

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("192.168.0.5")
>>> bulb.turn_on()

That’s it!

Refer to the rest of the documentation for more details.

Contributing

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!

License

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.

Source Distribution

yeelight-0.5.3.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

yeelight-0.5.3-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file yeelight-0.5.3.tar.gz.

File metadata

  • Download URL: yeelight-0.5.3.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for yeelight-0.5.3.tar.gz
Algorithm Hash digest
SHA256 8d49846f0cede1e312cbcd1d0e44c42073910bbcadb31b87ce2a7d24dea3af38
MD5 7fa0a707a3babfe64ac48162b63049c0
BLAKE2b-256 db5a696eed6115e1bc2cc982a2bb3b75c29570f45b8525c0e597a8735d92161b

See more details on using hashes here.

File details

Details for the file yeelight-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: yeelight-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for yeelight-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 049ad970e3d6c277e072658f6abf2e66bf1ae6e7c97fab4d79c66df0834e17af
MD5 136a6dd11c3dc0bf9243705c23a23a0c
BLAKE2b-256 eaa4dcece25a1911ae5a6da474c8523cba78cf385a3e0ae5379c49adae8c288b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page