mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-07-31 06:08:13 +00:00
feat: add Tibber feed-in tariff provider (#1189)
Bump Version / Bump Version Workflow (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
Bump Version / Bump Version Workflow (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
The `FeedInTariffTibber` provider requests `priceInfo` and `priceInfoRange` with `resolution: QUARTER_HOURLY` and preserves the native 15-minute timestamps. It uses Tibber's `energy` spot-price component without the `tax` part or EOS electricity-price charges. The end-customer `total` component is deliberately ignored. The provider deliberately rejects hourly API responses instead of silently repeating them. It reuses `elecprice.tibber.access_token` and `elecprice.tibber.home_id`, so no duplicate credentials are needed. Signed-off-by: Andreas Schmitz <akkudoktor.net> Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
+18
-14
@@ -11,6 +11,7 @@ from akkudoktoreos.prediction.feedintariffakkudoktor import FeedInTariffAkkudokt
|
||||
from akkudoktoreos.prediction.feedintariffenergycharts import FeedInTariffEnergyCharts
|
||||
from akkudoktoreos.prediction.feedintarifffixed import FeedInTariffFixed
|
||||
from akkudoktoreos.prediction.feedintariffimport import FeedInTariffImport
|
||||
from akkudoktoreos.prediction.feedintarifftibber import FeedInTariffTibber
|
||||
from akkudoktoreos.prediction.loadakkudoktor import (
|
||||
LoadAkkudoktor,
|
||||
LoadAkkudoktorAdjusted,
|
||||
@@ -52,6 +53,7 @@ def forecast_providers():
|
||||
FeedInTariffEnergyCharts(),
|
||||
FeedInTariffFixed(),
|
||||
FeedInTariffImport(),
|
||||
FeedInTariffTibber(),
|
||||
LoadAkkudoktor(),
|
||||
LoadAkkudoktorAdjusted(),
|
||||
LoadVrm(),
|
||||
@@ -107,20 +109,21 @@ def test_provider_sequence(prediction):
|
||||
assert isinstance(prediction.providers[6], FeedInTariffEnergyCharts)
|
||||
assert isinstance(prediction.providers[7], FeedInTariffFixed)
|
||||
assert isinstance(prediction.providers[8], FeedInTariffImport)
|
||||
assert isinstance(prediction.providers[9], LoadAkkudoktor)
|
||||
assert isinstance(prediction.providers[10], LoadAkkudoktorAdjusted)
|
||||
assert isinstance(prediction.providers[11], LoadVrm)
|
||||
assert isinstance(prediction.providers[12], LoadImport)
|
||||
assert isinstance(prediction.providers[13], PVForecastAkkudoktor)
|
||||
assert isinstance(prediction.providers[14], PVForecastVrm)
|
||||
assert isinstance(prediction.providers[15], PVForecastPVNode)
|
||||
assert isinstance(prediction.providers[16], PVForecastForecastSolar)
|
||||
assert isinstance(prediction.providers[17], PVForecastSolcast)
|
||||
assert isinstance(prediction.providers[18], PVForecastImport)
|
||||
assert isinstance(prediction.providers[19], WeatherBrightSky)
|
||||
assert isinstance(prediction.providers[20], WeatherClearOutside)
|
||||
assert isinstance(prediction.providers[21], WeatherOpenMeteo)
|
||||
assert isinstance(prediction.providers[22], WeatherImport)
|
||||
assert isinstance(prediction.providers[9], FeedInTariffTibber)
|
||||
assert isinstance(prediction.providers[10], LoadAkkudoktor)
|
||||
assert isinstance(prediction.providers[11], LoadAkkudoktorAdjusted)
|
||||
assert isinstance(prediction.providers[12], LoadVrm)
|
||||
assert isinstance(prediction.providers[13], LoadImport)
|
||||
assert isinstance(prediction.providers[14], PVForecastAkkudoktor)
|
||||
assert isinstance(prediction.providers[15], PVForecastVrm)
|
||||
assert isinstance(prediction.providers[16], PVForecastPVNode)
|
||||
assert isinstance(prediction.providers[17], PVForecastForecastSolar)
|
||||
assert isinstance(prediction.providers[18], PVForecastSolcast)
|
||||
assert isinstance(prediction.providers[19], PVForecastImport)
|
||||
assert isinstance(prediction.providers[20], WeatherBrightSky)
|
||||
assert isinstance(prediction.providers[21], WeatherClearOutside)
|
||||
assert isinstance(prediction.providers[22], WeatherOpenMeteo)
|
||||
assert isinstance(prediction.providers[23], WeatherImport)
|
||||
|
||||
|
||||
def test_provider_by_id(prediction, forecast_providers):
|
||||
@@ -142,6 +145,7 @@ def test_prediction_repr(prediction):
|
||||
assert "FeedInTariffEnergyCharts" in result
|
||||
assert "FeedInTariffFixed" in result
|
||||
assert "FeedInTariffImport" in result
|
||||
assert "FeedInTariffTibber" in result
|
||||
assert "LoadAkkudoktor" in result
|
||||
assert "LoadVrm" in result
|
||||
assert "LoadImport" in result
|
||||
|
||||
Reference in New Issue
Block a user