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.5.tar.gz (6.6 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.5-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for daybetter_services_python-1.0.5.tar.gz
Algorithm Hash digest
SHA256 2aa70aee751ba6c0452bd59aecd276b78147a840a6a1b9206c502e81420cfb3a
MD5 de7a8e0b98bc9c5d8e8cde18346dbced
BLAKE2b-256 dc21dd2de31a26b46c098f39caa0be25144aae344ad9140b1e25effee42ceaf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for daybetter_services_python-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b36dc6154a4ecd88e8914bd94f8fbf64cd9c38c75f7cd6c319f66b9ad238db4e
MD5 bbe01b64002e56ba8b0542011c4d8eb1
BLAKE2b-256 dbbbdcaa221ddaa149bd6d71952784e45de88302de87babe6028a72922bf2af6

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