v1.2.0
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 blockingwebsocket-clientlibrary (run on a dedicated thread) ontoaiohttp's native async websocket client - fully async, no threads. No user-visible behavior change;manifest.jsonnow depends onpybluetti>=0.1.0instead ofpydantic/stomper/websocket-clientdirectly. - Adopted
mypy --strictacross the whole codebase (wired into CI viascripts/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
coordinatorskeys, and the enabled-devices list underentry_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
TypeErrorfrom 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_valuecrashing instead of just not applying the update if the cloud ever responds to a control command with a non-JSON body. - Fix
hassfestvalidation failures:icons.json's entity translation keys used the cloud's raw, mixed-casefn_codevalues, which don't match Home Assistant's required key pattern; andmanifest.json'sdocumentationfield 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 ofbinary_sensor.*- it was being added through thesensorplatform'sasync_add_entitiesinstead of its ownbinary_sensorplatform (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 ownbinary_sensor.pyplatform file, matchingswitch.py/select.py.