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

Uploaded Source

Built Distribution

yeelight-0.5.2-py2.py3-none-any.whl (25.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: yeelight-0.5.2.tar.gz
  • Upload date:
  • Size: 41.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for yeelight-0.5.2.tar.gz
Algorithm Hash digest
SHA256 320e00ba81d4bbe979aba84e6bcc3964cb3b63c1470f3e36e568e5d045ae3933
MD5 9bb0aa219c18c79ef3fee5b1129b3aa9
BLAKE2b-256 03afe3e58dad4311ec9751077b8cdfd50052ed15d299a46a4f3817bd65f7fb58

See more details on using hashes here.

File details

Details for the file yeelight-0.5.2-py2.py3-none-any.whl.

File metadata

  • Download URL: yeelight-0.5.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for yeelight-0.5.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7371be322e7b59c2da9b1a1c61556eb26c8586ff4fd478dc07c88d968bfc5386
MD5 f2627d03ccb5a45ff3264e402b1cd2a3
BLAKE2b-256 be35962a96a56681534d4bee3c20090993cc46ad46a50f5e2d66646998f12bb4

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