v0.6.29 — Distance unit resolution for miles vehicles (#11)
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.unitresolves tomiorkm, that unit is shown immediately instead of falling back to the static defaultkmwhile sticky confirmation is pending. - Entity registry migration clears a stale
kmoverride onmileage.value,range.value, andvalue_of_the_primary_rangesonative_unit_of_measurementcan 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