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

@@ -24,6 +24,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
@pytest.fixture
@@ -51,6 +52,7 @@ def forecast_providers():
PVForecastImport(),
WeatherBrightSky(),
WeatherClearOutside(),
WeatherOpenMeteo(),
WeatherImport(),
]
@@ -99,7 +101,8 @@ def test_provider_sequence(prediction):
assert isinstance(prediction.providers[12], PVForecastImport)
assert isinstance(prediction.providers[13], WeatherBrightSky)
assert isinstance(prediction.providers[14], WeatherClearOutside)
assert isinstance(prediction.providers[15], WeatherImport)
assert isinstance(prediction.providers[15], WeatherOpenMeteo)
assert isinstance(prediction.providers[16], WeatherImport)
def test_provider_by_id(prediction, forecast_providers):
@@ -126,6 +129,7 @@ def test_prediction_repr(prediction):
assert "PVForecastImport" in result
assert "WeatherBrightSky" in result
assert "WeatherClearOutside" in result
assert "WeatherOpenMeteo" in result
assert "WeatherImport" in result