Miles to Km

Probably a very simple solution, but I have finally got my FIAT EV data into Hassio, but the odometer and range come in as km instead of miles - was just hoping someone could point me in the direction of the best method of getting two new sensors with the values in miles (have put the current sensor names below.

car_evInfo_battery_distanceToEmpty_value

car_vehicleInfo_odometer_odometer_value

Use a template sensor

Put this in my config, but it just shows unavailable ? is this because it takes a while for the sensor from the car to update (think it starts with unavailable)

sensor:
  - platform: template
    sensors:
      car_range:
        friendly_name: Car Range
        unit_of_measurement: mi
        value_template: >
          {{ state_attr(‘sensor.car_evInfo_battery_distanceToEmpty_value')|float/1.609|round }}

Try

|float(default=0)/1.609|

Try:

{{ states("sensor.car_evInfo_battery_distanceToEmpty_value")|float / 1.609|round }}

or even better:

{{ '{:.2}'.format( states('sensor.car_evInfo_battery_distanceToEmpty_value')|float / 1.609) }}

Working now …… but the values are wrong ?

Could Home Assistant do an automatic conversion? If I remember correctly, during onboarding you either select metric or imperial.