audi_connect_ha icon indicating copy to clipboard operation
audi_connect_ha copied to clipboard

Convert KM to Miles

Open leacho73 opened this issue 3 years ago • 3 comments
trafficstars

Is it possible to convert the default KM into Miles via a setting on the integration?

Although most of Europe use KM for measuring, in the UK we use Miles.

Thanks Leacho

leacho73 avatar Oct 18 '22 10:10 leacho73

sensor:
  - platform: template
    sensors:
      oil_distance:
        friendly_name: Odo Miles
        unit_of_measurement: mi
        value_template: >
          {{ (states('sensor.km') | float/1.609 | round) }}

Try something like this - I pulled it from here - https://community.home-assistant.io/t/value-template-help-for-a-beginner-to-display-attribute-values-that-are-converted-into-uk-format/55067/3

Rustymage avatar Nov 09 '22 21:11 Rustymage

This issue is stale because it has been open for 30 days with no activity. Are you still experiencing this issue?

github-actions[bot] avatar Mar 13 '24 02:03 github-actions[bot]

This one need unit of measure added so it could be changed in HA native.

cdnninja avatar Mar 13 '24 04:03 cdnninja

This is complete, closing the issue. @leacho73 please open an issue if this isn't working.

coreywillwhat avatar Apr 06 '24 18:04 coreywillwhat