Skip to main content

Bradford White Wave Client

An asynchronous Python client library for the Bradford White Wave API for smart water heaters. The "Wave" platform is separate from the older "Connect" platform — for example, the original AeroTherm uses an optional "Connect" module add-on, while the AeroTherm G2 has built-in connectivity on the "Wave" platform.

This library is designed for use in a Home Assistant integration and general automation tasks.

Inspired by bradford-white-connect-client.

Installation

pip install bradford-white-wave-client

Usage

Authenticate with Email & Password

from bradford_white_wave_client import (
    BradfordWhiteClient,
    BradfordWhiteMode,
    EnergyViewType,
)

async with BradfordWhiteClient(
    email="you@example.com",
    password="your-password",
) as client:
    devices = await client.list_devices()

    for device in devices:
        mac = device.mac_address

        # Get status
        status = await client.get_status(mac)

        # Get energy usage (EnergyViewType or "hourly", "daily", "weekly", "monthly")
        energy = await client.get_energy_usage(mac, EnergyViewType.WEEKLY)

        # Set temperature (°F)
        await client.set_temperature(mac, 120)

        # Set mode
        await client.set_mode(mac, BradfordWhiteMode.HEAT_PUMP)

Persist & Reuse refresh_token

For long-running applications (like Home Assistant), you can inject an external aiohttp.ClientSession, persist rotated tokens via on_token_update, and optionally pass email and password so the client automatically re-authenticates if the refresh token eventually expires:

async with BradfordWhiteClient() as client:
    await client.authenticate_with_credentials("you@example.com", "your-password")
    saved_refresh_token = client.refresh_token

# Later session: uses refresh_token first, falling back to email/password only if expired
async with BradfordWhiteClient(
    refresh_token=saved_refresh_token,
    email="you@example.com",
    password="your-password",
    on_token_update=lambda token: print("Updated refresh token:", token),
) as client:
    devices = await client.list_devices()

Example Script

You can test interactively with example_script.py, which prompts for your email and password and caches refresh_token in .credentials.json:

.venv/bin/python example_script.py

Features

  • Async/Await support using aiohttp
  • Direct Azure AD B2C Email/Password authentication
  • Automatic OAuth access token refresh (with seamless credential fallback on refresh-token expiry)
  • Type-hinted with Pydantic models

Disclaimers

  • This is an unofficial library and is not affiliated with Bradford White.
  • I have only tested with an Aerotherm G2.
  • This is largely written in "collaboration" with Gemini, though I have manually reviewed the code and verified the flows.

Metadata

Release files for bradford-white-wave-client 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bradford-white-wave-client 1.0.0
File Size Uploaded Provenance Actions
bradford_white_wave_client-1.0.0.tar.gz 17.5 kB With provenance Details for bradford_white_wave_client-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bradford-white-wave-client 1.0.0
File Interpreter ABI Platform Actions
bradford_white_wave_client-1.0.0-py3-none-any.whl Python 3 none any Details for bradford_white_wave_client-1.0.0-py3-none-any.whl

Total release size: 31.5 kB

Release files / bradford_white_wave_client-1.0.0.tar.gz

Download URL bradford_white_wave_client-1.0.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
521fc3633c83fcbde46f50e2eb35b86230e905c70d6c1df3371f6eb1b0f57a0d
BLAKE2b-256 checksum
How to use checksums
58b56bd1a0e182e649dc7374cd74388e4e3507b8160281a442d0432bbba7896f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / bradford_white_wave_client-1.0.0-py3-none-any.whl

Download URL bradford_white_wave_client-1.0.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3fcb1be0da664973337cbdb685d96a0615708ed1fb5772d8b3565ff8d174c95
BLAKE2b-256 checksum
How to use checksums
2d1d8c3cdcd8172f15f84790bbd5a1c5ffc745a71f949efe0f8e644f583d9638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for bradford-white-wave-client 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bradford_white_wave_client-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page