Async API for controlling Hue Lights
Project description
Hue API
Async API for controlling Hue Lights
Documentation: hue-api.nirantak.com
Source: github.com/nirantak/hue-api
Installation
This is an async client to interact with the Hue Bridge API.
The minimum Python version required to run this is 3.8
Install the package using pip:
pip install hue-api
Usage
Follow this link to create a Hue API user if not already known (API reference)
Using the CLI
hue --help
# Get the version of hue-api installed
hue version
# To find your Hue Bridge IP address go to discovery.meethue.com, or run:
hue bridge discover
Using the API
from hue import Bridge, Light
# Create a light object with the light id (number), Bridge IP and user
light = Light(1, ip="your-hue-bridge-ip", user="hue-api-user")
# from an async function
async def main():
await Bridge.discover()
await light.power_on()
# or from a sync context
import asyncio
asyncio.run(Bridge.discover())
asyncio.run(light.power_on())
Changelog
See the file CHANGELOG.md
License
This project is licensed under the terms of the MIT license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hue-api-0.4.1.tar.gz
(33.7 kB
view details)
Built Distribution
File details
Details for the file hue-api-0.4.1.tar.gz
.
File metadata
- Download URL: hue-api-0.4.1.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8a94e8fa74c5aaba1d1d9a3f255087f17fda7e0bf1697ee9eb2f522e4fa873f |
|
MD5 | 965c341c1b9d8e3f1344217efa9b9693 |
|
BLAKE2b-256 | 9616e7d0754f58a501c373b0173b4222a37a87d228ea8c383bcf96cc5145020b |
File details
Details for the file hue_api-0.4.1-py2.py3-none-any.whl
.
File metadata
- Download URL: hue_api-0.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bcaada23b63d0b92d851b5265273a0a421ccaad5a5748b955f34288df085f9d |
|
MD5 | 05c78694610ac07e73a602e8c4c4e174 |
|
BLAKE2b-256 | 4e043319907ffcd9b79bae05fa797f241e8c38222e1270d17416026ca7deb062 |