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.1.tar.gz (5.4 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.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for daybetter_services_python-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bf03350d523621e18f115ee1ae14c2c44a822fad36f3a175eccac3049c4784b3
MD5 78d604711149bfb8232062fce893ea8d
BLAKE2b-256 d705628ec07f450c204350d1c1e56f7cc60605a6f216fc051535c867a19c84a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for daybetter_services_python-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 511803ce5ffe2ddcbe2ea4f77143db7d58bd3f9436e9246d883529baeba1f36e
MD5 dda11a231498c0cfbaef8ac5af33b172
BLAKE2b-256 159754cdf06c87b3b21a7ff0799102180c4042bf54ae431731880d46ff9e82e7

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