Add UV index information throughout the app#10
Merged
andreisugu merged 2 commits intomainfrom Mar 5, 2026
Merged
Conversation
Co-authored-by: andreisugu <35407471+andreisugu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add information about UV levels where reasonable
Add UV index information throughout the app
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UV index data was absent from the app despite being readily available from the existing open-meteo weather API. This PR surfaces UV levels wherever contextually appropriate: current conditions, hourly forecasts, charts, AI recommendations, alert tips, and push notifications.
API
uv_indexincurrent/hourlyanduv_index_maxindailyparametersUI (
index.html,home.html,home.js)#current-uvelement shows live UV index (or daily max for non-today days)y2right axisgetUVLevel(uvIndex)helper renders color-coded badges: Low (0–2) → Moderate (3–5) → High (6–7) → Very High (8–10) → Extreme (11+)Recommendations & alerts (
views.py,static-sentiment.js)make_recommendation()/makeRecommendation()append UV-specific advice when UV ≥ 6get_alert_level()/getAlertLevel()acceptweather_dataand conditionally append a UV Protection tip to every alert level's tips listPromise.allNotifications (
send_notifications.py)get_uv_forecast()fetches today'suv_index_max;create_notification_message()includes UV level label and tailored advice in the message bodyTranslations (
translations.js)UV Index,Moderate,Very High,Extreme,UV Protection🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.