Metadata-Version: 2.4
Name: daybetter-services-python
Version: 1.0.5
Summary: Python client for DayBetter devices and services
Home-page: https://github.com/THDayBetter/daybetter-python
Author: THDayBetter
Author-email: THDayBetter <chenp2368@163.com>
Maintainer-email: THDayBetter <chenp2368@163.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/THDayBetter/daybetter-python
Project-URL: Documentation, https://github.com/THDayBetter/daybetter-python#readme
Project-URL: Repository, https://github.com/THDayBetter/daybetter-python.git
Project-URL: Bug Tracker, https://github.com/THDayBetter/daybetter-python/issues
Keywords: daybetter,iot,home automation,mqtt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.8.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# 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

```bash
pip install daybetter-services-python
```

## Usage

```python
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.
