mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-07-13 05:18:12 +00:00
feat: add Tibber price provider and PV forecast providers
This commit is contained in:
@@ -6,6 +6,7 @@ from akkudoktoreos.prediction.elecpriceakkudoktor import ElecPriceAkkudoktor
|
||||
from akkudoktoreos.prediction.elecpriceenergycharts import ElecPriceEnergyCharts
|
||||
from akkudoktoreos.prediction.elecpricefixed import ElecPriceFixed
|
||||
from akkudoktoreos.prediction.elecpriceimport import ElecPriceImport
|
||||
from akkudoktoreos.prediction.elecpricetibber import ElecPriceTibber
|
||||
from akkudoktoreos.prediction.feedintarifffixed import FeedInTariffFixed
|
||||
from akkudoktoreos.prediction.feedintariffimport import FeedInTariffImport
|
||||
from akkudoktoreos.prediction.loadakkudoktor import (
|
||||
@@ -19,7 +20,10 @@ from akkudoktoreos.prediction.prediction import (
|
||||
PredictionCommonSettings,
|
||||
)
|
||||
from akkudoktoreos.prediction.pvforecastakkudoktor import PVForecastAkkudoktor
|
||||
from akkudoktoreos.prediction.pvforecastforecastsolar import PVForecastForecastSolar
|
||||
from akkudoktoreos.prediction.pvforecastimport import PVForecastImport
|
||||
from akkudoktoreos.prediction.pvforecastpvnode import PVForecastPVNode
|
||||
from akkudoktoreos.prediction.pvforecastsolcast import PVForecastSolcast
|
||||
from akkudoktoreos.prediction.pvforecastvrm import PVForecastVrm
|
||||
from akkudoktoreos.prediction.weatherbrightsky import WeatherBrightSky
|
||||
from akkudoktoreos.prediction.weatherclearoutside import WeatherClearOutside
|
||||
@@ -39,6 +43,7 @@ def forecast_providers():
|
||||
return [
|
||||
ElecPriceAkkudoktor(),
|
||||
ElecPriceEnergyCharts(),
|
||||
ElecPriceTibber(),
|
||||
ElecPriceFixed(),
|
||||
ElecPriceImport(),
|
||||
FeedInTariffFixed(),
|
||||
@@ -49,6 +54,9 @@ def forecast_providers():
|
||||
LoadImport(),
|
||||
PVForecastAkkudoktor(),
|
||||
PVForecastVrm(),
|
||||
PVForecastPVNode(),
|
||||
PVForecastForecastSolar(),
|
||||
PVForecastSolcast(),
|
||||
PVForecastImport(),
|
||||
WeatherBrightSky(),
|
||||
WeatherClearOutside(),
|
||||
@@ -88,21 +96,25 @@ def test_provider_sequence(prediction):
|
||||
"""Test the provider sequence is maintained in the Prediction instance."""
|
||||
assert isinstance(prediction.providers[0], ElecPriceAkkudoktor)
|
||||
assert isinstance(prediction.providers[1], ElecPriceEnergyCharts)
|
||||
assert isinstance(prediction.providers[2], ElecPriceFixed)
|
||||
assert isinstance(prediction.providers[3], ElecPriceImport)
|
||||
assert isinstance(prediction.providers[4], FeedInTariffFixed)
|
||||
assert isinstance(prediction.providers[5], FeedInTariffImport)
|
||||
assert isinstance(prediction.providers[6], LoadAkkudoktor)
|
||||
assert isinstance(prediction.providers[7], LoadAkkudoktorAdjusted)
|
||||
assert isinstance(prediction.providers[8], LoadVrm)
|
||||
assert isinstance(prediction.providers[9], LoadImport)
|
||||
assert isinstance(prediction.providers[10], PVForecastAkkudoktor)
|
||||
assert isinstance(prediction.providers[11], PVForecastVrm)
|
||||
assert isinstance(prediction.providers[12], PVForecastImport)
|
||||
assert isinstance(prediction.providers[13], WeatherBrightSky)
|
||||
assert isinstance(prediction.providers[14], WeatherClearOutside)
|
||||
assert isinstance(prediction.providers[15], WeatherOpenMeteo)
|
||||
assert isinstance(prediction.providers[16], WeatherImport)
|
||||
assert isinstance(prediction.providers[2], ElecPriceTibber)
|
||||
assert isinstance(prediction.providers[3], ElecPriceFixed)
|
||||
assert isinstance(prediction.providers[4], ElecPriceImport)
|
||||
assert isinstance(prediction.providers[5], FeedInTariffFixed)
|
||||
assert isinstance(prediction.providers[6], FeedInTariffImport)
|
||||
assert isinstance(prediction.providers[7], LoadAkkudoktor)
|
||||
assert isinstance(prediction.providers[8], LoadAkkudoktorAdjusted)
|
||||
assert isinstance(prediction.providers[9], LoadVrm)
|
||||
assert isinstance(prediction.providers[10], LoadImport)
|
||||
assert isinstance(prediction.providers[11], PVForecastAkkudoktor)
|
||||
assert isinstance(prediction.providers[12], PVForecastVrm)
|
||||
assert isinstance(prediction.providers[13], PVForecastPVNode)
|
||||
assert isinstance(prediction.providers[14], PVForecastForecastSolar)
|
||||
assert isinstance(prediction.providers[15], PVForecastSolcast)
|
||||
assert isinstance(prediction.providers[16], PVForecastImport)
|
||||
assert isinstance(prediction.providers[17], WeatherBrightSky)
|
||||
assert isinstance(prediction.providers[18], WeatherClearOutside)
|
||||
assert isinstance(prediction.providers[19], WeatherOpenMeteo)
|
||||
assert isinstance(prediction.providers[20], WeatherImport)
|
||||
|
||||
|
||||
def test_provider_by_id(prediction, forecast_providers):
|
||||
@@ -117,6 +129,7 @@ def test_prediction_repr(prediction):
|
||||
assert "Prediction([" in result
|
||||
assert "ElecPriceAkkudoktor" in result
|
||||
assert "ElecPriceEnergyCharts" in result
|
||||
assert "ElecPriceTibber" in result
|
||||
assert "ElecPriceFixed" in result
|
||||
assert "ElecPriceImport" in result
|
||||
assert "FeedInTariffFixed" in result
|
||||
|
||||
Reference in New Issue
Block a user