github lasswellt/govee-homeassistant v2026.5.4

latest release: v2026.5.5
7 days ago

Platinum-Fix Sprint (sprints 3 + 4)

Addresses HA integration audit findings against best practices for 2026 (docs/_research/2026-05-01_codebase-audit-ha-2026.md). 16 stories across two sprints; 23 commits; 707 → 739 tests; mypy strict clean; 0 lint errors.

Critical fixes

  • Inject HA-managed websession into GoveeApiClient and GoveeAuthClient. Drops bare aiohttp.ClientSession() instantiation in favor of async_get_clientsession(hass). Closes the false inject-websession Platinum claim.
  • PARALLEL_UPDATES = 0 in all 11 platform modules. Coordinator-pushed updates no longer throttled to 1 concurrent call. Closes the false parallel-updates Platinum claim.
  • IoT credentials moved from hass.data[DOMAIN] to entry.data with a v1→v2 schema migration (async_migrate_entry). Eliminates cross-entry leak risk; aligns with canonical HA storage pattern.

High / functional fixes

  • MAC-format device IDs redacted in diagnostics output (PII per HA guidance) + 15 new regression tests.
  • Detached hass.async_create_task in repairs flow replaced with awaited flow.async_init (lifecycle-bound).
  • dataclasses.replace for state mutation in coordinator BLE recovery path (in-place mutation could mask state change for listeners).
  • async_create_background_task for rate-limit-issue task so it cancels on entry unload.

Hygiene

  • manifest.json: quality_scale: silver; remove empty ssdp/zeroconf arrays.
  • DeviceInfo import path normalized (homeassistant.helpers.device_registry).
  • Services registration guarded by hass.services.has_service (no fragile hass.data sentinel).
  • Transport keys in extra_state_attributes gated behind CONF_EXPOSE_TRANSPORT_ENTITIES (default off).
  • Redundant hass.states.async_remove before entity_registry.async_remove removed.
  • quality_scale.yaml claims now match implementation; stale-devices flipped to done.

Tests

  • 707 → 739 (+32: 16 diagnostics + 1 coordinator regression + 16 migration regression)
  • mypy --strict: clean
  • coverage: 55.4%

Notes

  • Removed min_ha_version from manifest.json — hassfest rejects unknown keys; HACS already enforces via hacs.json.
  • Coordinator decomposition (audit H1, 1691 LOC monolith) deferred to a separate refactor sprint.
  • Open audit follow-ups: option_flow= deprecation check (2025.12), aiomqtt reconnect health audit, observer-unregister audit.

Don't miss a new govee-homeassistant release

NewReleases is sending notifications on new releases.