Skip to main content

Async Python client for the Hayward Aquarite pool API

Project description

aioaquarite

Async Python client for the Hayward Aquarite pool API.

This library provides a standalone API client for interacting with Hayward Aquarite pool equipment via the Hayward cloud service. It is designed to be used as the backend for the Home Assistant Aquarite integration.

Installation

pip install aioaquarite

Usage

import aiohttp
from aioaquarite import AquariteAuth, AquariteClient

async with aiohttp.ClientSession() as session:
    # Authenticate
    auth = AquariteAuth(session, "user@example.com", "password")
    await auth.authenticate()

    # Stable Firebase UID (`sub` claim of the id token); useful as a
    # config-entry unique_id. Returns None before authenticate() succeeds.
    print("Firebase UID:", auth.user_id)

    # Create client
    client = AquariteClient(auth)

    # List pools
    pools = await client.get_pools()

    # Fetch pool data
    for pool_id, pool_name in pools.items():
        data = await client.fetch_pool_data(pool_id)
        temperature = AquariteClient.get_value(data, "main.temperature")
        print(f"{pool_name}: {temperature}°C")

    # Subscribe to real-time updates
    def on_update(data):
        print("Pool updated:", data.get("main", {}).get("temperature"))

    watch = await client.subscribe_pool(pool_id, on_update)

    # Set a value
    await client.set_value(pool_id, "filtration.mode", 1)

    # Cleanup
    watch.unsubscribe()

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

aioaquarite-0.3.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

aioaquarite-0.3.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file aioaquarite-0.3.0.tar.gz.

File metadata

  • Download URL: aioaquarite-0.3.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aioaquarite-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1b78801fab4026523fbdf02d659f723f0d443bd773faa71f4e67090f48b7f28a
MD5 38547d5ea317db91f7a0be7bcff8b240
BLAKE2b-256 1f4a257f179e494f34913d941f08a03fe33e3ad6a83cb16825058c57bcc64c51

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioaquarite-0.3.0.tar.gz:

Publisher: publish.yml on fdebrus/aioaquarite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aioaquarite-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aioaquarite-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aioaquarite-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05d7b09efb1e385d9e5a1a11cc5a6728fd9f9efc0e3214371329e08b7a89e088
MD5 fcc9e4d2ba0d459046eb77c2080e101f
BLAKE2b-256 090a19e2f9ee97d5a02acf445862a17986c751208ec16fd94ca354d39b1e8dbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioaquarite-0.3.0-py3-none-any.whl:

Publisher: publish.yml on fdebrus/aioaquarite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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