Metadata-Version: 2.4
Name: kohler-anthem
Version: 0.1.4
Summary: Python client library for Kohler Anthem Digital Shower API
Project-URL: Homepage, https://github.com/yon/kohler-anthem
Project-URL: Repository, https://github.com/yon/kohler-anthem
Author-email: Yon <yon@example.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: eval-type-backport>=0.2.0; python_version < '3.10'
Requires-Dist: paho-mqtt>=2.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: aioresponses>=0.7; extra == 'dev'
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.2; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Requires-Dist: types-paho-mqtt>=1.6; extra == 'dev'
Description-Content-Type: text/markdown

# kohler-anthem

Python library for controlling Kohler Anthem digital showers.

> **DISCLAIMER**: This is an unofficial library developed independently for personal use. It is not affiliated with, endorsed by, or supported by Kohler Co. This library was reverse-engineered from the Kohler Konnect mobile app and may break at any time if Kohler modifies their APIs. The author provides no warranty, assumes no liability, and offers no support for this software. Use at your own risk. The author is not responsible for any damage to your devices, property, or any other consequences resulting from the use of this library.

## Installation

```bash
pip install kohler-anthem
```

## Quick Start

```python
import asyncio
from kohler_anthem import KohlerAnthemClient, KohlerConfig, Outlet

async def main():
    config = KohlerConfig(
        username="user@example.com",
        password="password",
        client_id="...",
        apim_subscription_key="...",
        api_resource="...",
    )

    async with KohlerAnthemClient(config) as client:
        # Discover devices
        customer = await client.get_customer("customer-id")
        device = customer.get_all_devices()[0]

        # Get state
        state = await client.get_device_state(device.device_id)
        print(f"Running: {state.is_running}")

        # Control
        await client.turn_on_outlet(device.device_id, Outlet.SHOWERHEAD, temperature_celsius=38.0)
        await client.turn_off(device.device_id)

asyncio.run(main())
```

## Configuration

| Parameter | Description |
|-----------|-------------|
| `username` | Kohler account email |
| `password` | Kohler account password |
| `client_id` | Azure AD B2C client ID |
| `apim_subscription_key` | Azure APIM subscription key |
| `api_resource` | Azure AD B2C API resource ID |

### Obtaining Credentials

The `client_id`, `api_resource`, and `apim_subscription_key` must be extracted from the Kohler Konnect mobile app. See [credential-extraction](https://github.com/yon/kohler-anthem/tree/main/credential-extraction) for automated tools and instructions.


## Development

```bash
make deps    # Install dependencies
make check   # Run lint, typecheck, tests
make help    # Show all targets
```

See [Makefile](Makefile) for all available targets.

## License

MIT
