Skip to main content

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 devices
  • fetch_pids(): Get device type PIDs
  • control_device(device_name, action, brightness, hs_color, color_temp): Control a device
  • fetch_mqtt_config(): Get MQTT configuration

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

daybetter_services_python-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

daybetter_services_python-1.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file daybetter_services_python-1.0.0.tar.gz.

File metadata

File hashes

Hashes for daybetter_services_python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e16ba228c08358e0626f465c8ea7dd87f2f5dc92d2f1c09eeef8deb61b9db79d
MD5 c3583e8c52c2fd3d55249748066fd500
BLAKE2b-256 5267177d1819cdb5a064d85bca9da3bd41d56c7baec268d133fd4a510bbfec46

See more details on using hashes here.

File details

Details for the file daybetter_services_python-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for daybetter_services_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 656690a5fee52990ca5a9fc3b6a21cde1b526eb80f348aea965474c871c413d0
MD5 90a285056243b477220936f64baa5a01
BLAKE2b-256 3333bc0860ca38819fbc5aeb027c23c8e15dbfe2e397d15236160494095798aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page