Skip to content

v0.6.29 — Distance unit resolution for miles vehicles (#11)

Choose a tag to compare

@TommiG1 TommiG1 released this 28 Jun 20:32

Fixes mileage and range sensors showing km on vehicles whose portal dataset reports mileage.unit = MILES (e.g. UK ID.4), even though the odometer value is already in miles (#11).

The integration never converted values — only the unit label was wrong.

Changes

  • First-poll adoption for distance sensors: when mileage.unit / range.unit resolves to mi or km, that unit is shown immediately instead of falling back to the static default km while sticky confirmation is pending.
  • Entity registry migration clears a stale km override on mileage.value, range.value, and value_of_the_primary_range so native_unit_of_measurement can drive the label again on upgraded installs.
  • Charge-rate sticky unit behaviour is unchanged.

After upgrading

Reload the integration or restart Home Assistant; the migration runs on startup. Vehicles that genuinely use kilometres are unaffected.

Full notes: RELEASE_NOTES.md