Repository navigation
v0.1.1 — fixes a permanently failed first install
Upgrade if you installed v0.1.0. That version could leave the integration
permanently broken after a failed first connection, and a window that is asleep
or out of Bluetooth range is the ordinary first-install case.
Fixed
A failed first connection never retried. Setup registered its Bluetooth
callback for automatic unload and unregistered it by hand on failure. Home
Assistant already runs unload callbacks when setup fails, so the second
unregister raised out of a finally and replaced ConfigEntryNotReady. The
entry landed in SETUP_ERROR and stayed there instead of retrying.
Unloading did not stop the coordinator. async_shutdown never called its
parent, so the coordinator was not marked shut down and its debouncer kept
running. An in-flight refresh could reopen the BLE connection that unload had
just closed.
Moving a brightness or volume slider made it unavailable. Levels are
reported as an object carrying min/max/value but written as a bare
number. The optimistic update stored the bare number, erasing the bounds, so
the entity went unavailable until the next poll 60 seconds later.
Also in this release
An out-of-range number now raises a translated ServiceValidationError rather
than a bare ValueError, so the UI shows something meaningful. Entity icons
moved to icons.json. ConfigEntry is parameterised across the platforms. The
reconnect task is scoped to the config entry so it cannot outlive it.
Testing
A Home Assistant layer test suite was added — 20 tests covering both config
flow paths, setup and unload, the retry path when the window is out of range,
reconnection across a BLE address rotation, the display switch's
read-before-toggle path, and diagnostics redaction. Three of them were
confirmed to fail against the pre-fix code.
It runs as its own CI job, because the fast protocol suite asserts Home
Assistant is absent from sys.modules and these tests need the opposite.
Still unverified
All Bluetooth in the tests is faked, so toggle timing and address rotation are
proven against a model of the window rather than a window. Per-claim hardware
validation is #5.