Metadata-Version: 2.4
Name: pysaeco
Version: 0.1.0
Summary: Library and CLI for communicating with Saeco-family coffee machines over BLE, with MQTT discovery for Home Assistant.
Project-URL: Homepage, https://github.com/mikekap/pysaeco
Project-URL: Issues, https://github.com/mikekap/pysaeco/issues
Author: pysaeco contributors
License: MIT
Keywords: ble,coffee,home-assistant,mqtt,saeco
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Home Automation
Requires-Python: >=3.11
Requires-Dist: anyio>=4.6.2
Requires-Dist: bleak>=0.22.3
Requires-Dist: paho-mqtt>=2.1.0
Requires-Dist: pydantic>=2.9.2
Provides-Extra: dev
Requires-Dist: pytest>=8.3.3; extra == 'dev'
Requires-Dist: ruff>=0.7.0; extra == 'dev'
Description-Content-Type: text/markdown

# pysaeco

`pysaeco` is an early-stage Python library and CLI for communicating with Saeco-family
coffee machines over Bluetooth LE.

It uses [`bleak`](https://github.com/hbldh/bleak) for cross-platform BLE support and
can emit Home Assistant MQTT discovery payloads.

## Install for development

```bash
uv sync --extra dev
```

## CLI

```bash
uv run pysaeco-server
```

By default the server scans for BLE machines, publishes MQTT/Home Assistant discovery to
`localhost:1883`, and serves the HTTP API/status page at `http://127.0.0.1:8080`.

## Library sketch

```python
from pysaeco import SaecoClient
from pysaeco.avanti import Espresso

with SaecoClient("AA:BB:CC:DD:EE:FF", pin=1234) as client:
    status = client.read_status()
    client.brew(Espresso(coffee_ml=45))
```

## Development notes

- Keep BLE client details in `pysaeco.client`.
- Keep Avanti protocol packets, responses, recipes, and parsed status in `pysaeco.avanti`.
- Put Home Assistant discovery entities in `pysaeco.homeassistant.discovery`.
