Weather plugin: add sunshine and wind km/h over time display#684
Open
CorentinWicht wants to merge 2 commits into
Open
Weather plugin: add sunshine and wind km/h over time display#684CorentinWicht wants to merge 2 commits into
CorentinWicht wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the Weather plugin’s hourly charting and unit handling, primarily improving Open‑Meteo visualizations (sunshine overlay, optional wind overlay) and aiming to standardize wind speed units.
Changes:
- Extend Open‑Meteo hourly requests to include
wind_speed_10mandsunshine_duration, and expose them to the hourly chart. - Add new settings toggles for Wind Speed and Sunshine overlays.
- Adjust wind speed handling/labels and remove the temperature area fill to reduce chart clutter.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/plugins/weather/weather.py |
Updates units, Open‑Meteo query parameters, and hourly parsing to add wind/sunshine series. |
src/plugins/weather/settings.html |
Adds new UI toggles for wind and sunshine overlays and loads/saves them. |
src/plugins/weather/render/weather.html |
Adds wind annotation overlay, sunshine bar dataset, and removes temperature fill styling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR adds several improvements to the Weather plugin, primarily for Open-Meteo users.
Changes
Sunshine duration overlay (Open-Meteo only)
Added
sunshine_durationto the hourly forecast API request. The chart now displays sunshine as yellow bars on the samey1axis as precipitation probability (0–100%), giving users a quick visual indication of how sunny each hour will be. Controlled by a new Sunshine checkbox in the plugin settings.Temperature curve — removed area fill
The yellow gradient fill under the temperature curve has been removed. The temperature is now shown as a clean orange line, reducing visual clutter and making the precipitation and sunshine overlays easier to read.
Wind speed unit consistency (Open-Meteo)
The Open-Meteo API is explicitly requested with
wind_speed_unit=kmh(ormphfor imperial) via the existingOPEN_METEO_UNIT_PARAMS. The wind value passed to the chart and the metrics panel now correctly reflects the unit already returned by the API, matching theUNITSdict label (km/h/mph).Wind speed unit fix (OpenWeatherMap hourly)
OWM always returns wind speed in m/s regardless of the
unitsparameter. The hourly parser now converts to km/h for metric/standard units, consistent with the current wind display in the metrics panel.Screenshots

Tested with