Python client for DayBetter devices and services
Project description
DayBetter Python Client
A Python client library for interacting with DayBetter devices and services.
Features
- Device management and control
- MQTT configuration retrieval
- Authentication handling
- Async/await support
Installation
pip install daybetter-services-python
Usage
import asyncio
from daybetter_python import DayBetterClient
async def main():
async with DayBetterClient(token="your_token") as client:
# Fetch devices
devices = await client.fetch_devices()
print(f"Found {len(devices)} devices")
# Control a device
result = await client.control_device(
device_name="device_001",
action=True,
brightness=80
)
print(f"Control result: {result}")
if __name__ == "__main__":
asyncio.run(main())
API Reference
DayBetterClient
Methods
fetch_devices(): Get list of devicesfetch_pids(): Get device type PIDscontrol_device(device_name, action, brightness, hs_color, color_temp): Control a devicefetch_mqtt_config(): Get MQTT configuration
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file daybetter_services_python-1.0.2.tar.gz.
File metadata
- Download URL: daybetter_services_python-1.0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37deae73913cb6f3357ca0640f5d7792966e0817982256c5d760eccaa474621d
|
|
| MD5 |
9fe7f668d733a069ee19df83b6fa5bc4
|
|
| BLAKE2b-256 |
5eb7476217820d146d458dde6fdfa8e52d682f39c5395a6920a67d4b28a2be61
|
File details
Details for the file daybetter_services_python-1.0.2-py3-none-any.whl.
File metadata
- Download URL: daybetter_services_python-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feb8d12c60bd2efcf6cf5e003e6debdec88885442dd595adf4cba2fa508accc4
|
|
| MD5 |
cfba2cd75c084499a47699b8837cda1b
|
|
| BLAKE2b-256 |
57de47ccf211613ca255b5426beb7e4839ae2f09b536017168df3c51080f45fe
|