github lasswellt/govee-homeassistant v2026.5.5

6 days ago

Refactor: Audit H1 — coordinator decomposition

Continues the audit-driven decomposition started in v2026.5.4. Two more managers extracted from coordinator.py (was 1697 LOC, now 1481).

What changed

  • BleAdvertisementHandler (audit H1) — BLE advertisement subscription + cloud-device correlation moved to ble_advertisement.py. Coordinator delegates setup_ble_subscriptions and _handle_ble_advertisement to the handler. ~165 LOC out of the monolith.
  • Black formatting — Resolved pre-existing format drift on 26 files. Pure cosmetic.

What didn't change

  • Public API. Coordinator method signatures unchanged.
  • BLE behavior. Same allowlist, same MAC-prefix tiebreaker, same adapter-availability guard (issue #59), same proof-of-life recovery (issue #68).
  • Test coverage. 735 tests pass; mypy --strict clean; flake8 clean.

Notes

This is code organization, not architectural decoupling — the handler still operates on coordinator's mutable state. The audit's remaining MqttManager extraction is duplicate work given GoveeAwsIotClient already exists; not pursued.

Don't miss a new govee-homeassistant release

NewReleases is sending notifications on new releases.