Metadata-Version: 2.5
Name: pysaltsentry
Version: 0.2.0
Summary: Async Python client for the Salt Sentry water softener sensor
Project-URL: Homepage, https://github.com/Lemcke-solutions/Salt-sentry-ha-integration
License: MIT
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.9.0
Description-Content-Type: text/markdown

# pysaltsentry

Async Python client for the [Salt Sentry](https://github.com/Lemcke-solutions/Salt-sentry-ha-integration) water softener sensor.

## Installation

```bash
pip install pysaltsentry
```

## Usage

```python
import aiohttp
from pysaltsentry import SaltSentryDevice, SaltSentryConnectionError, SaltSentryInvalidDataError

async with aiohttp.ClientSession() as session:
    device = SaltSentryDevice("192.168.1.100", session)
    try:
        status = await device.get_status()
        print(status.unique_id)
        print(status.measurement_cm)  # None if the device reported an out-of-range measurement
        print(status.firmware_version)
        print(status.hardware_revision)
    except SaltSentryConnectionError:
        print("Could not connect to device")
    except SaltSentryInvalidDataError:
        print("Device did not return a unique_id")
```

## License

MIT
