Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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:

  1. Done. Move the client code here mechanically, decoupled from hass (server URLs and an on_auth_expired callback are passed in as plain constructor arguments instead - see src/pybluetti/).
  2. Done. Replace the blocking websocket-client transport (previously run on a dedicated thread to keep it out of Home Assistant's event loop) with aiohttp's native async websocket client - src/pybluetti/websocket.py has no threads left. STOMP protocol framing (stomper) is unchanged.
  3. Not started. Publish to PyPI, and switch bluetti-home-assistant's manifest.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-client library on a dedicated thread to keep it out of Home Assistant's event loop. pybluetti is fully async instead, matching bluetti-home-assistant's own quality_scale.yaml async-dependency goal 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.1rc1

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

Source distribution (sdist)

Source distribution for pybluetti 0.2.1rc1
File Size Uploaded
pybluetti-0.2.1rc1.tar.gz 17.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybluetti 0.2.1rc1
File Interpreter ABI Platform
pybluetti-0.2.1rc1-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / pybluetti-0.2.1rc1.tar.gz

Download URL pybluetti-0.2.1rc1.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9df50cfd0c949e277c0c9a99b124f218414e26227e929e31bd9825d74f881c3f
BLAKE2b-256 checksum
How to use checksums
8a7626e04548b7c4a131e56494286e0700df0856a652c9b740f4c67c9c28e0d3
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 Aug 31, 2026.

Transparency log

Release files / pybluetti-0.2.1rc1-py3-none-any.whl

Download URL pybluetti-0.2.1rc1-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e88d54fe6f88b94b2869fca8e460f7e8f9988e27e7af71cd8b62c98a1e8c587b
BLAKE2b-256 checksum
How to use checksums
480a897d592b8d64dae4c0c3abf90da07070cfc07b978f8d1cf2c072ca1fa9de
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 Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

This release

0.2.1rc1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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