https://github.com/chaoticbyte/yahuelib
Yet Another Philips Hue API Library for Python
https://github.com/chaoticbyte/yahuelib
lighting philips-hue philips-hue-api python smarthome
Last synced: about 1 year ago
JSON representation
Yet Another Philips Hue API Library for Python
- Host: GitHub
- URL: https://github.com/chaoticbyte/yahuelib
- Owner: ChaoticByte
- License: mit
- Archived: true
- Created: 2023-07-21T17:37:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-04T17:53:04.000Z (almost 3 years ago)
- Last Synced: 2025-03-04T04:11:52.668Z (over 1 year ago)
- Topics: lighting, philips-hue, philips-hue-api, python, smarthome
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YaHue Lib
Yet Another Philips Hue API Library for Python. This project only implements home subset of the API.
## Getting Started
Before you can use the API of your Hue Bridge, you have to create an API user for it.
See https://developers.meethue.com/develop/get-started-2/
## Supported Features
- 💡 Lights
- reachable
- on
- brightness
- hue
- saturation
- white color temperature
- alert
- alert_long
- 🏠 Groups (Zones and Rooms)
- any_on
- all_on
- brightness
- hue
- saturation
- white color temperature
- alert
- alert_long
- 👋 Motion Sensors
- reachable
- on
- battery
- sensitivity
- sensitivitymax
- ledindication
- presence
## Documentation
see [DOCUMENTATION.md](DOCUMENTATION.md)
## Example
```python
#!/usr/bin/env python3
# from yahuelib.controller import LightController
from yahuelib.controller import GroupController
from yahuelib.utils import rgb_to_hsv
if __name__ == "__main__":
home = GroupController.from_name("Home", "192.168.0.120", "XXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXX")
if not home.check_all_on():
home.set_all_on(True)
color = rgb_to_hsv(255, 220, 100)
home.set_hue(color[0])
home.set_saturation(color[1])
home.set_brightness(254)
home.alert()
```