Skip to content

Feat, add open meteo backup for forecast.solar#4030

Merged
springfall2008 merged 2 commits into
mainfrom
feat/open_meteo_backup
Jun 8, 2026
Merged

Feat, add open meteo backup for forecast.solar#4030
springfall2008 merged 2 commits into
mainfrom
feat/open_meteo_backup

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2026 19:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_backup config option and wires it through component configuration into SolarAPI.
  • Implements Forecast.solar → Open-Meteo fallback in SolarAPI.fetch_pv_forecast() and allows download_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 thread apps/predbat/solcast.py
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"]

@springfall2008 springfall2008 merged commit 608021d into main Jun 8, 2026
2 checks passed
@springfall2008 springfall2008 deleted the feat/open_meteo_backup branch June 8, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants