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.
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 }}