feat: add openmeteo weather provider (#939)

Add OpenMeteo to the selectable weather prediction providers.

Also add tests and documentation.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2026-03-13 12:23:21 +01:00
committed by GitHub
parent a5d8fd35e3
commit 8a9aec6d57
11 changed files with 4316 additions and 7 deletions

View File

@@ -50,6 +50,7 @@ from akkudoktoreos.prediction.pvforecastvrm import PVForecastVrm
from akkudoktoreos.prediction.weatherbrightsky import WeatherBrightSky
from akkudoktoreos.prediction.weatherclearoutside import WeatherClearOutside
from akkudoktoreos.prediction.weatherimport import WeatherImport
from akkudoktoreos.prediction.weatheropenmeteo import WeatherOpenMeteo
class PredictionCommonSettings(SettingsBaseModel):
@@ -86,6 +87,7 @@ pvforecast_vrm = PVForecastVrm()
pvforecast_import = PVForecastImport()
weather_brightsky = WeatherBrightSky()
weather_clearoutside = WeatherClearOutside()
weather_openmeteo = WeatherOpenMeteo()
weather_import = WeatherImport()
@@ -106,10 +108,14 @@ def prediction_providers() -> list[
PVForecastImport,
WeatherBrightSky,
WeatherClearOutside,
WeatherOpenMeteo,
WeatherImport,
]
]:
"""Return list of prediction providers."""
"""Return list of prediction providers.
Factory for prediction container.
"""
global \
elecprice_akkudoktor, \
elecprice_energy_charts, \
@@ -126,6 +132,7 @@ def prediction_providers() -> list[
pvforecast_import, \
weather_brightsky, \
weather_clearoutside, \
weather_openmeteo, \
weather_import
# Care for provider sequence as providers may rely on others to be updated before.
@@ -145,6 +152,7 @@ def prediction_providers() -> list[
pvforecast_import,
weather_brightsky,
weather_clearoutside,
weather_openmeteo,
weather_import,
]
@@ -169,6 +177,7 @@ class Prediction(PredictionContainer):
PVForecastImport,
WeatherBrightSky,
WeatherClearOutside,
WeatherOpenMeteo,
WeatherImport,
]
] = Field(