Yevgenium/weather-chart-card

Customary units

jlambert121 opened this issue · 2 comments

This is a great card and I'd like to create a PR that adds customary units to it. Currently units for display seem to be determined by the locale and en is using metric units. While I wish the US would just join the rest of the world in using measurements that make sense, we haven't. Do you have a recommendation on how you'd like to see this done?

I could create an enUS locale, but that would then mean needing to set the locale in the config and would be a bit weird. I could also look at breaking out the display units to metric/customary, but for some locales they do seem to be different.

I think, we should to check the unit_system and, based on this, determine if additional calculations are needed. The selected locale only affects the translation.

This is an example of the metric unit system:
image

I need more time to test this on an instance with imperial system selected.