Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Volume unit_of_measurement should be "L" not "liters"

gedger opened this issue · comments

commented

Could the unit of measurement for volume be changed from "liters" to "L". Currently it's incorrect for any country that spells "liters" as "litres", this also brings into line with the other units which are mostly used in their correct short form, e.g. km for kilometres. Full unit_of_measurements can be found here.

https://github.com/home-assistant/core/blob/d7ac4bd65379e11461c7ce0893d3533d8d8b8cbf/homeassistant/const.py#L384

commented

The time units are also using the long form e.g. minutes should be "min", months should be "m".... Not using the standard units makes it harder to do later processing as the units are none standard.

TIME_MICROSECONDS = "μs"
TIME_MILLISECONDS = "ms"
TIME_SECONDS = "s"
TIME_MINUTES = "min"
TIME_HOURS = "h"
TIME_DAYS = "d"
TIME_WEEKS = "w"
TIME_MONTHS = "m"
TIME_YEARS = "y"

Yes, you're right. I will change this tomorrow. Thanks for this input.

Should be fixed v1.8.22!