Client for Bradford White Wave API
Project description
Bradford White Wave Client
A Python client library for the Bradford White Wave API for water heaters. The "Wave" platform is new and separate from the previous "Connect" platform. For instance the original Aerotherm uses an optional "Connect" module add-on, while the Aerotherm G2 has built-in connectivity to the "Wave" platform.
This library is designed for use in a Home Assistant integration and general automation tasks.
To build this I took some inspiration from the bradford-white-connect-client library and did some digging into how the new app works.
Authentication
Some manual steps are required to authenticate with the API, since for the time being I have been unable to fully automate the process.
- Run the example script:
python example_script.py - The script will generate a login URL. Open it in your browser.
- Log in with your Bradford White Wave credentials.
- The browser will receive a redirect, but (at least for Firefox) it will fail to follow this redirect and show an error page.
- Open the network tab in your browser's development tools and refresh the page. You'll see the failed redirect response. Look for the location: header starting with
com.bradfordwhiteapps.bwconnect://in the response. - Copy the full url and paste it back into the script terminal.
- The script will save your credentials to
.credentials.jsonso future runs of the script will skip the above steps (this file is in .gitignore).
Usage
Once you have a refresh_token, you can initialize the client:
client = BradfordWhiteClient(refresh_token="YOUR_REFRESH_TOKEN")
await client.authenticate()
From there, there are several methods available:
# List devices
await client.list_devices()
# Get status
await client.get_status("MAC_ADDRESS")
# Get energy usage
await client.get_energy("MAC_ADDRESS", "hourly")
# Set temperature
await client.set_temperature("MAC_ADDRESS", 120)
# Set mode
from bradford_white_wave_client.models import BradfordWhiteMode
await client.set_mode("MAC_ADDRESS", BradfordWhiteMode.HEAT_PUMP)
Installation
pip install bradford-white-wave-client
Features
- Async/Await support using
aiohttp - Type-hinted with
Pydanticmodels - Auto-refresh of access tokens
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bradford_white_wave_client-0.1.1.tar.gz.
File metadata
- Download URL: bradford_white_wave_client-0.1.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9b71e10c78ada0e6caabd2c86f2bdc5c084c6884b6b765ae78a0f25a710727b
|
|
| MD5 |
fbc2f3f7c2224045895f15ec6cbf7b5a
|
|
| BLAKE2b-256 |
c1c80dde6846caf6276f50bb25a6290a6c20c18cc295f2e6c9bc7345e5e1657d
|
Provenance
The following attestation bundles were made for bradford_white_wave_client-0.1.1.tar.gz:
Publisher:
publish.yml on gclenaghan/bradford-white-wave-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bradford_white_wave_client-0.1.1.tar.gz -
Subject digest:
f9b71e10c78ada0e6caabd2c86f2bdc5c084c6884b6b765ae78a0f25a710727b - Sigstore transparency entry: 797869178
- Sigstore integration time:
-
Permalink:
gclenaghan/bradford-white-wave-client@a0806ff312995a8a05ab203ccd9b243be6ca42b2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/gclenaghan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0806ff312995a8a05ab203ccd9b243be6ca42b2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bradford_white_wave_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: bradford_white_wave_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c20ded05a5f6849d66e743b539032d18bb0e2c5b17d91fe0be20804909ac81e8
|
|
| MD5 |
8e49ef4f51df28760ecbe603e6c19e95
|
|
| BLAKE2b-256 |
e16c2dff8afe183d73df3b40e8b68f3dcd13d37d27c2acd9923ea748a20f51b7
|
Provenance
The following attestation bundles were made for bradford_white_wave_client-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on gclenaghan/bradford-white-wave-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bradford_white_wave_client-0.1.1-py3-none-any.whl -
Subject digest:
c20ded05a5f6849d66e743b539032d18bb0e2c5b17d91fe0be20804909ac81e8 - Sigstore transparency entry: 797869215
- Sigstore integration time:
-
Permalink:
gclenaghan/bradford-white-wave-client@a0806ff312995a8a05ab203ccd9b243be6ca42b2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/gclenaghan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0806ff312995a8a05ab203ccd9b243be6ca42b2 -
Trigger Event:
release
-
Statement type: