Repository navigation
v0.3.1 — hardens the v0.3.0 identity migration
Install this rather than v0.3.0. A review of that release found three ways
its identity migration could leave an install worse than it started. Each is
now covered by a test that fails against v0.3.0.
If you are upgrading from v0.2.x, read the
v0.3.0 notes
for what the migration does. Entity ids and history are preserved.
Fixed
A unique-id conflict stranded the entry permanently. Home Assistant refuses
a unique id another entity of the same platform already holds, and that check
spans every config entry while the rewrite walked only one. A conflict part-way
through left some entities moved and some not, and raised a bare ValueError
out of setup — so the entry showed SETUP_ERROR with no message and every
retry failed identically. Targets are now checked before any move is applied,
and a blocked rekey leaves the entry on its advertised name, which is
recoverable.
A second entry could adopt a UUID another entry already held. Nothing
raised, because there were no entities yet to collide with, so it loaded with
the UUID stored and then had every entity rejected at creation. The result was
a loaded config entry with no entities and no device — invisible on the device
page, unreachable by a service call, and holding a BLE connection to a window
the first entry already owned. Adopting a claimed UUID now fails the entry with
a clear message instead.
A crash mid-adoption was unrepairable. Adoption writes to two stores that
flush independently: config entries after a second, the registries after ten
or, during startup, a hundred and eighty. A crash in between left the entry
claiming a UUID while the registries still held name-keyed rows, and because
the rekey only ran when the UUID was unset, nothing ever repaired it — the next
run built a second set of entities beside the orphaned ones. The registry side
is now reconciled against the stored key on every setup, and is a no-op when
the two already agree.
Also fixed
An emptied device registry row is now removed rather than left on the device
page as a second Atmoph device with nothing on it — Home Assistant does not
prune it, because it still references a live config entry. Device lookups are
scoped to the config entry, which resolves a deprecation that stops working in
Home Assistant 2027.8 and stops refusing renames that would have succeeded. The
config flow no longer raises if a window stops advertising between the form
being rendered and submitted. A disconnect that itself raises no longer
replaces the update error being reported.
Documentation
Corrected five places where the docs had drifted from the code: both documents
still described the diagnostic-port question as open when a full 1-65535 scan
had closed it, the second-service section contradicted itself on how much of it
the app knows about, the connection-initialization section claimed Home
Assistant follows the app's ordering when it deliberately subscribes before
reading, and send_command was documented against a table of tokens rather
than the argument it actually accepts.
Testing
77 tests pass: 26 protocol, 51 Home Assistant layer. The four new identity
regressions were each confirmed to fail against v0.3.0 rather than assumed to.
All Bluetooth remains faked, so timing-sensitive behaviour is still unproven
against real hardware —
#5.