-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open-Meteo: Incorrect UV Index categories #1110
Comments
Categories are always calculated on app side, regardless of whether the source provides it. Open-Meteo has a specificity: it provides non-rounded values of UV. Meaning, that you can end up with an UV of 7.99 that will be rounded to 8, but will be in the lower category. I suggest we follow the issue in #1108 with any source but Open-Meteo due to this specificity. |
yep I just realized this is the issue. Don't know the "correct" way to handle this tbh |
Yes, exactly. We also have the same issue with Météo-France, which only provides max UV index of the day. So hourly UV index is calculated according to a formula which makes us having "slightly lower than 8 but not yet 8" values on hourly chart, but not on daily chart. |
No, #1108 is different, they only provide rounded values, and they provide hourly values. Unrounded values should not exist, but in case we have them, we must provide the correct category for the unrounded values, not for the rounded value IMO. |
Out of curiosity, what are the categories for the unrounded values? WHO doesn't specify if 7.75 for example should be high or very high Edit: looking at the code it seems the app uses these: 0 <= index < 3 : Low |
Very high starts at 8.0 on my side, not at 7.01. I believe that if Open-Meteo has values with decimals, it means that in the way you compute it, you end up with decimals at some point. So if you can find some WHO guidelines about the rounding policy, I will apply it if different than ours. Maybe 7.99 is expected to be truncated to 7.0 for example? |
I couldn't find any rounding information unfortunately. But it seems your rounding convention has precedent: The city of Hong Kong measures UV index with decimals and uses the same rounding convention: |
And Hong Kong is where the World Meteorological Organization is located, so I will trust them. Maybe we should show 1 decimal then? Although it still wouldn't fix the 7.95-7.99 case. |
I was thinking maybe truncating instead of rounding, but in any case showing decimals by default isn't so helpful IMO. Unless you do a tap to show detail in say the hourly forecast, but adding that detail in there is a separate issue |
Steps to reproduce
Expected behavior
It should appear red indicating a "Very High" UV index, in line with the WHO Standard
Actual behavior
It appears orange indicating a "Very high"
Weather source used
Open-Meteo
Breezy Weather version
5.2.4 standard
Android version
12
Device
Samsung Galaxy s10e
Other details
Unlike #1108 I do actually think this is a Breezy Weather bug, as Open-Meteo does not provide any categories with its UV indices.
Acknowledgements
The text was updated successfully, but these errors were encountered: