pybluetti
Async Python client for the BLUETTI cloud API - device discovery, state, and control.
Status: fully async, not yet wired up or published
This repository is the extraction target for the API client code that used to
live in
bluetti-home-assistant's
custom_components/bluetti/api/, following the same pattern
pyenphase uses for the enphase_envoy
Home Assistant integration: a standalone, independently testable and
versionable library, decoupled from Home Assistant's own release cycle.
The extraction is happening in three steps:
- Done. Move the client code here mechanically, decoupled from
hass(server URLs and anon_auth_expiredcallback are passed in as plain constructor arguments instead - seesrc/pybluetti/). - Done. Replace the blocking
websocket-clienttransport (previously run on a dedicated thread to keep it out of Home Assistant's event loop) withaiohttp's native async websocket client -src/pybluetti/websocket.pyhas no threads left. STOMP protocol framing (stomper) is unchanged. - Not started. Publish to PyPI, and switch
bluetti-home-assistant'smanifest.json/imports to depend on this package instead of its own in-tree copy.
Why extract it
- Independent testing and versioning, not tied to Home Assistant's release cadence.
- A step toward Home Assistant core inclusion - core integrations are expected to depend on an external library for the actual device/API communication, not embed raw HTTP/websocket calls directly in the integration.
- Fixed a known gap along the way: the embedded client used to run the blocking
websocket-clientlibrary on a dedicated thread to keep it out of Home Assistant's event loop.pybluettiis fully async instead, matchingbluetti-home-assistant's ownquality_scale.yamlasync-dependencygoal once step 3 wires it up.
Development
scripts/setup # install runtime + test dependencies
scripts/test # run the test suite (100% line coverage enforced)
scripts/lint # run ruff, auto-fixing what it safely can
scripts/typecheck # run mypy --strict
License
MIT - see LICENSE.
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 pybluetti-0.1.1.tar.gz.
File metadata
- Download URL: pybluetti-0.1.1.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
624c69af88298753438580488ac8f22e686c534e3ecf363030dfa8385b499efa
|
|
| MD5 |
665b35cc6bb8bdd7c01ceb07a4601130
|
|
| BLAKE2b-256 |
00619a54b492f1ee3deccc21e76cece7e7785eb2a112805d7986c7d12223cf8c
|
Provenance
The following attestation bundles were made for pybluetti-0.1.1.tar.gz:
Publisher:
publish.yml on bluetti-community/pybluetti
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybluetti-0.1.1.tar.gz -
Subject digest:
624c69af88298753438580488ac8f22e686c534e3ecf363030dfa8385b499efa - Sigstore transparency entry: 2582886967
- Sigstore integration time:
-
Permalink:
bluetti-community/pybluetti@c0cd96ad7247440a2d17616b59e8639317be1b3b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/bluetti-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0cd96ad7247440a2d17616b59e8639317be1b3b -
Trigger Event:
release
-
Statement type:
File details
Details for the file pybluetti-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pybluetti-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ce195892f0157beb0cec9d39240cd5ea694be928f235e8e99c3f084835791e
|
|
| MD5 |
b0750e1c951f648271942a0c34facb99
|
|
| BLAKE2b-256 |
37ec03cd8f6edd115b30303e8a0a0200b077a25046bd9d2706cc738f31c40db1
|
Provenance
The following attestation bundles were made for pybluetti-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on bluetti-community/pybluetti
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybluetti-0.1.1-py3-none-any.whl -
Subject digest:
d9ce195892f0157beb0cec9d39240cd5ea694be928f235e8e99c3f084835791e - Sigstore transparency entry: 2582886972
- Sigstore integration time:
-
Permalink:
bluetti-community/pybluetti@c0cd96ad7247440a2d17616b59e8639317be1b3b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/bluetti-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0cd96ad7247440a2d17616b59e8639317be1b3b -
Trigger Event:
release
-
Statement type: