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.
Metadata
Release files for pybluetti 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybluetti-0.2.9.tar.gz | 25.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybluetti-0.2.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.4 kB
Release files / pybluetti-0.2.9.tar.gz
| Download URL | pybluetti-0.2.9.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88e92b0c2f0e830a47fd8a00210346a60809a300a43fc628e33c1822d416d436
|
|
BLAKE2b-256 checksum How to use checksums |
44d52920cdd1b69fad918402d23dd7f54468d6e6ec91f8cc26a1f6e6cff93be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 12, 2026.
Transparency logRelease files / pybluetti-0.2.9-py3-none-any.whl
| Download URL | pybluetti-0.2.9-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dbabc1f80af99c3f435e3cf3c11b1cb790824e154528972874e82b3718fe697
|
|
BLAKE2b-256 checksum How to use checksums |
61b45494e1c507228d4b5422efb6e2f264d9d7a259ab0447d11633b62d9e4857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 12, 2026.
Transparency log