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 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.

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.6.3.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

yeelight-0.6.3-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yeelight-0.6.3.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for yeelight-0.6.3.tar.gz
Algorithm Hash digest
SHA256 c0213a70c779570401b33613b0ff646d7435d2b783281db524c2424e04a1522d
MD5 be714bf40749a56d5169570eb307818f
BLAKE2b-256 d4d070a67c39088cc8408f3518d06073ff84b2efa2a04af84ddc88826d4a7136

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yeelight-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for yeelight-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f0c1990f60c238cb341e247ec065d2d75b08fa3ccd0eb3f4614de4276da3cce
MD5 1bf3db33689295da6f986df6e495b103
BLAKE2b-256 e3fd142e3084cb6827de8e486216d7703a6d7acd420704f02d1e86035c60c74e

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