Skip to main content

Python client library for Kohler Anthem Digital Shower API

Project description

kohler-anthem

Python library for controlling Kohler Anthem digital showers.

Installation

pip install kohler-anthem

Quick Start

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

See API.md for full API documentation.

Development

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

See Makefile for all available targets.

License

MIT

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

kohler_anthem-0.1.0.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kohler_anthem-0.1.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file kohler_anthem-0.1.0.tar.gz.

File metadata

  • Download URL: kohler_anthem-0.1.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for kohler_anthem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 031c085fbbb137a1fee1484d9b7980af3bbb277f7c0bf434f20ec0dec7e5c4ae
MD5 0ed4d3bdbf25dda278b09b8ee04192f2
BLAKE2b-256 085c3ad18480380967bbd43ff286ef2f79f866db2e59c4684fc248b079388eb1

See more details on using hashes here.

File details

Details for the file kohler_anthem-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kohler_anthem-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for kohler_anthem-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a23d729f1cf930042f82817ef9f607586abe3d7c94fdc43c5bdf3e350bad9a5a
MD5 eb272eacce10c3b7b338987b4e237257
BLAKE2b-256 08bea8cdc0f1fde635eb299774c1725e1cc69b5f415c6b1b998d9206de244793

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