Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
275 stars 81 forks source link

Customary units #82

Open jlambert121 opened 2 years ago

jlambert121 commented 2 years ago

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.

Yevgenium commented 2 years ago

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

Yevgenium commented 2 years ago

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