Skip to content

v0.6.30 — Distance registry sync after portal data (#11)

Choose a tag to compare

@TommiG1 TommiG1 released this 29 Jun 05:36

Follow-up for miles vehicles still showing km after v0.6.29 (#11).

The sensor logic in v0.6.29 was correct, but Home Assistant locked the static default km into the entity registry during setup — before the first dataset arrived — and kept overriding the resolved native unit afterwards.

Changes

  • async_sync_distance_registry_units() runs on every coordinator update once portal data is present. When a companion *.unit field maps to mi or km, the entity registry is updated to match (and stale sensor.private unit overrides are cleared).
  • Silent datasets (no mileage.unit / range.unit) are left alone so kilometre vehicles keep km.
  • Removed the ineffective setup-time blind km → None migration from v0.6.29.

After upgrading

Reload the integration or restart Home Assistant. Miles vehicles should show mi on the next coordinator refresh.

Full notes: RELEASE_NOTES.md