Skip to content

v1.2.0

Choose a tag to compare

@chpego chpego released this 25 Aug 13:00
· 35 commits to main since this release
1b388b0

New:

  • The device's serial number now shows up in its Device Info panel (Settings -> Devices & services -> BLUETTI -> device page), matching how other Home Assistant integrations surface it.
  • A single device can now be removed from an existing multi-device setup via its device page's "Delete" button, without having to remove and re-add the whole integration. This only stops Home Assistant from tracking the device - it does not unbind it from your BLUETTI account, so it can be added back later via Settings -> Devices & services -> BLUETTI -> Configure.

Internal:

  • The BLUETTI cloud API client (HTTP + websocket push updates) now lives in a standalone package, pybluetti, instead of being embedded in this repo. Along the way, the websocket transport moved off the blocking websocket-client library (run on a dedicated thread) onto aiohttp's native async websocket client - fully async, no threads. No user-visible behavior change; manifest.json now depends on pybluetti>=0.1.0 instead of pydantic/stomper/websocket-client directly.
  • Adopted mypy --strict across the whole codebase (wired into CI via scripts/typecheck), fulfilling the "strict-typing" requirement of Home Assistant's Platinum integration quality scale.

Fixes:

  • Fix the device's real serial number appearing in plain text in downloaded diagnostics (in the device list, the coordinators keys, and the enabled-devices list under entry_options), even though the same serial is redacted everywhere else in the dump. It's now aliased to a stable "device_N" per dump instead, so devices in a multi-device dump can still be told apart without exposing the actual serial number.
  • Fix the integration getting permanently stuck failing to set up with "BLUETTI setup failed: Implementation not available" if the underlying OAuth Application Credential is ever lost (e.g. a partial backup restore, or an entry created without going through the config flow). The default credential is now automatically re-imported and setup retried once, instead of requiring a manual remove-and-re-add of the integration.
  • Fix the daily proactive OAuth token-refresh timer silently failing every single time it fired (a TypeError from a callback signature mismatch, found while adding strict typing) - the "check again in 24 hours" mechanism had effectively never worked.
  • Fix two spots (options_flow.py, oauth.py) where adding a device on an account with zero BLUETTI devices bound to it would crash instead of showing "no devices available".
  • Fix set_state_value crashing instead of just not applying the update if the cloud ever responds to a control command with a non-JSON body.
  • Fix hassfest validation failures: icons.json's entity translation keys used the cloud's raw, mixed-case fn_code values, which don't match Home Assistant's required key pattern; and manifest.json's documentation field pointed at a URL reserved for integrations already bundled in Home Assistant core, not a custom integration like this one.
  • Fix the "Online" binary sensor being registered under the sensor.* domain instead of binary_sensor.* - it was being added through the sensor platform's async_add_entities instead of its own binary_sensor platform (entity_id domain is decided by which platform registers the entity, not by the entity class's own base class). It now lives in its own binary_sensor.py platform file, matching switch.py/select.py.