Feat, add open meteo backup for forecast.solar#4030
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an optional fallback so Predbat can retrieve PV forecasts from Open-Meteo when Forecast.solar fails to return usable data, improving resilience of the solar forecast pipeline.
Changes:
- Introduces
forecast_solar_open_meteo_backupconfig option and wires it through component configuration intoSolarAPI. - Implements Forecast.solar → Open-Meteo fallback in
SolarAPI.fetch_pv_forecast()and allowsdownload_open_meteo_data()to accept explicit configs. - Adds tests covering fallback-on-failure and no-fallback-on-success behavior, plus documentation updates for the new option.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/apps-yaml.md | Documents forecast_solar_open_meteo_backup behavior and configuration. |
| apps/predbat/tests/test_solcast.py | Adds integration tests validating fallback behavior. |
| apps/predbat/tests/test_random_scenarios.py | Expands random scenario rate generation (includes negative pricing + smoothing). |
| apps/predbat/solcast.py | Implements Open-Meteo backup path for Forecast.solar and extends Open-Meteo downloader to accept configs. |
| apps/predbat/predbat.py | Bumps version to v8.40.4. |
| apps/predbat/config.py | Registers new boolean config key. |
| apps/predbat/components.py | Passes new config value into the SolarAPI component. |
Comment on lines
69
to
73
| solcast_poll_hours, | ||
| forecast_solar, | ||
| forecast_solar_max_age, | ||
| forecast_solar_open_meteo_backup, | ||
| pv_forecast_today, |
Comment on lines
45
to
47
| RATE_TYPES = ["single", "dual", "triple", "halfhourly"] | ||
| IMPORT_RATE_TYPES = RATE_TYPES + ["negative_halfhourly"] | ||
|
|
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.
No description provided.