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.5.tar.gz
(35.6 kB
view hashes)
Built Distribution
Close
Hashes for hue_api-0.4.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cfd9d016468976d1024ae64f5ced7131217a188ffb493fa56387e3404c594fa |
|
MD5 | 7784abe5877a923a1a6060c3dee6d10c |
|
BLAKE2b-256 | d7f91832dc315dfa4d8909a67df68ce3661a1dd8840dd703ab7a1466d80434a3 |