SAIC-iSmart-API / saic-python-mqtt-gateway

A service that queries the data from an MG iSMART account and publishes the data over MQTT and to other sources
MIT License
71 stars 21 forks source link

Can the figures (currently in KM) be presented in HA as Miles? #139

Closed daknightuk closed 8 months ago

daknightuk commented 8 months ago

Can the figures (currently in KM) be presented in HA as Miles? I'm in the UK

nanomad commented 8 months ago

@daknightuk Does the value reported by HA correctly represents the figure in miles? I.e. it's just the displayed unit that is wrong

daknightuk commented 8 months ago

@nanomad No the number represents the figure in KM only now whilst I "could" create a filter template in HA this would mean creating one for each reading in KM to convert it to miles and let me be honest that would then double the number of entities and make HA both confusing and a hassle when writing automations. Ideally (like on the MG app) there should be an option to switch between Miles and KM and some simple maths in the background i.e KM divided into 0.62137119 = Miles.

Troon commented 8 months ago

HA will do this for you, and also converts the number correctly. Here, my 88.0km since last charge becomes 54.7mi:

image

nanomad commented 8 months ago

I guess we can close this as not needed if it can be easily configured in HA without creating new templates

daknightuk commented 8 months ago

@Troon thank you so much for this I had no idea you could do this on HA :)