mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-07-24 10:48:11 +00:00
feat: add Akkudoktor feed-in provider (#1187)
Some checks are pending
Bump Version / Bump Version Workflow (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (python) (push) Waiting to run
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
Some checks are pending
Bump Version / Bump Version Workflow (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (python) (push) Waiting to run
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run
The `FeedInTariffAkkudoktor` provider uses raw day-ahead market prices from `https://api.akkudoktor.net/prices` as `feed_in_tariff_wh`. It does not add electricity import charges or VAT. Published prices are extended to the configured prediction horizon with the same seasonal ETS or median fallback used by the Akkudoktor electricity-price provider. The Akkudoktor endpoint currently forwards hourly market prices from aWATTar. With a 15-minute optimization interval, EOS holds each hourly price constant for its four quarter-hour slots. This keeps the slot grid consistent but does not create genuine quarter-hour market prices. Signed-off-by: Andreas Schmitz <akkudoktor.net> Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
2
.env
2
.env
@@ -11,7 +11,7 @@ DOCKER_COMPOSE_DATA_DIR=${HOME}/.local/share/net.akkudoktor.eos
|
||||
# -----------------------------------------------------------------------------
|
||||
# Image / build
|
||||
# -----------------------------------------------------------------------------
|
||||
VERSION=0.3.0.dev2607231331447302
|
||||
VERSION=0.3.0.dev2607231372614323
|
||||
PYTHON_VERSION=3.13.9
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# the root directory (no add-on folder as usual).
|
||||
|
||||
name: "Akkudoktor-EOS"
|
||||
version: "0.3.0.dev2607231331447302"
|
||||
version: "0.3.0.dev2607231372614323"
|
||||
slug: "eos"
|
||||
description: "Akkudoktor-EOS add-on"
|
||||
url: "https://github.com/Akkudoktor-EOS/EOS"
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
"bidding_zone": "DE-LU"
|
||||
},
|
||||
"providers": [
|
||||
"FeedInTariffAkkudoktor",
|
||||
"FeedInTariffEnergyCharts",
|
||||
"FeedInTariffFixed",
|
||||
"FeedInTariffImport"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Akkudoktor-EOS
|
||||
|
||||
**Version**: `v0.3.0.dev2607231331447302`
|
||||
**Version**: `v0.3.0.dev2607231372614323`
|
||||
|
||||
<!-- pyml disable line-length -->
|
||||
**Description**: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.
|
||||
|
||||
@@ -208,15 +208,17 @@ data and rely on file/JSON imports only for initial setup.
|
||||
|
||||
Prediction keys:
|
||||
|
||||
- `feed_in_tarif_wh`: Feed in tarif per Wh (€/Wh).
|
||||
- `feed_in_tarif_kwh`: Feed in tarif per kWh (€/kWh)
|
||||
- `feed_in_tariff_wh`: Feed in tarif per Wh (€/Wh).
|
||||
- `feed_in_tariff_kwh`: Feed in tarif per kWh (€/kWh)
|
||||
|
||||
Configuration options:
|
||||
|
||||
- `feedintarif`: Feed in tariff configuration.
|
||||
- `feedintariff`: Feed in tariff configuration.
|
||||
|
||||
- `provider`: Feed in tariff provider id of provider to be used.
|
||||
|
||||
- `FeedInTariffAkkudoktor`: Retrieves raw day-ahead market prices from the public
|
||||
Akkudoktor API without
|
||||
- `FeedInTariffEnergyCharts`: Retrieves Energy-Charts day-ahead market prices and extends
|
||||
them to the configured prediction horizon when necessary.
|
||||
- `FeedInTariffFixed`: Provides fixed feed in tariff values.
|
||||
@@ -227,6 +229,25 @@ Configuration options:
|
||||
- `feedintariffimport.import_file_path`: Path to the file to import feed in tariff forecast data from.
|
||||
- `feedintariffimport.import_json`: JSON string, dictionary of feed in tariff value lists.
|
||||
|
||||
### FeedInTariffAkkudoktor Provider
|
||||
|
||||
The `FeedInTariffAkkudoktor` provider uses raw day-ahead market prices from
|
||||
`https://api.akkudoktor.net/prices` as `feed_in_tariff_wh`. It does not add electricity import
|
||||
charges or VAT. Published prices are extended to the configured prediction horizon with the same
|
||||
seasonal ETS or median fallback used by the Akkudoktor electricity-price provider.
|
||||
|
||||
The Akkudoktor endpoint currently forwards hourly market prices from aWATTar. With a 15-minute
|
||||
optimization interval, EOS holds each hourly price constant for its four quarter-hour slots. This
|
||||
keeps the slot grid consistent but does not create genuine quarter-hour market prices.
|
||||
|
||||
```json
|
||||
{
|
||||
"feedintariff": {
|
||||
"provider": "FeedInTariffAkkudoktor"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### FeedInTariffEnergyCharts Provider
|
||||
|
||||
The `FeedInTariffEnergyCharts` provider uses the raw Energy-Charts day-ahead market price as the
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"name": "Apache 2.0",
|
||||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "v0.3.0.dev2607231331447302"
|
||||
"version": "v0.3.0.dev2607231372614323"
|
||||
},
|
||||
"paths": {
|
||||
"/v1/admin/cache/clear": {
|
||||
|
||||
@@ -20,9 +20,10 @@ def feedintariff_provider_ids() -> list[str]:
|
||||
# Prediction may not be initialized
|
||||
# Return at least provider used in example
|
||||
return [
|
||||
"FeedInTariffAkkudoktor",
|
||||
"FeedInTariffEnergyCharts",
|
||||
"FeedInTariffFixed",
|
||||
"FeedInTarifImport",
|
||||
"FeedInTariffImport",
|
||||
]
|
||||
|
||||
return [
|
||||
|
||||
161
src/akkudoktoreos/prediction/feedintariffakkudoktor.py
Normal file
161
src/akkudoktoreos/prediction/feedintariffakkudoktor.py
Normal file
@@ -0,0 +1,161 @@
|
||||
"""Provide feed-in tariff data from Akkudoktor market prices."""
|
||||
|
||||
import time
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import requests
|
||||
from loguru import logger
|
||||
|
||||
from akkudoktoreos.config.configabc import SettingsBaseModel
|
||||
from akkudoktoreos.core.cache import cache_in_file
|
||||
from akkudoktoreos.prediction.elecpriceakkudoktor import (
|
||||
AkkudoktorElecPrice,
|
||||
ElecPriceAkkudoktor,
|
||||
)
|
||||
from akkudoktoreos.prediction.feedintariffabc import FeedInTariffProvider
|
||||
from akkudoktoreos.utils.datetimeutil import to_datetime, to_duration
|
||||
|
||||
|
||||
class FeedInTariffAkkudoktorCommonSettings(SettingsBaseModel):
|
||||
"""Settings for the Akkudoktor feed-in tariff provider.
|
||||
|
||||
The public Akkudoktor price endpoint only needs the timezone already
|
||||
configured in ``general.timezone``, so no provider-specific values are
|
||||
currently required.
|
||||
"""
|
||||
|
||||
|
||||
class FeedInTariffAkkudoktor(FeedInTariffProvider):
|
||||
"""Use raw Akkudoktor day-ahead market prices as feed-in tariff data.
|
||||
|
||||
The upstream aWATTar endpoint currently supplies hourly values. EOS stores
|
||||
those source values unchanged; consumers requesting a shorter interval can
|
||||
forward-fill them onto the optimization grid.
|
||||
|
||||
Electricity export charges and VAT are intentionally not added. Prices
|
||||
returned in EUR/MWh are converted to EUR/Wh and stored under
|
||||
``feed_in_tariff_wh``.
|
||||
"""
|
||||
|
||||
highest_orig_datetime: Optional[datetime] = None
|
||||
|
||||
def historic_hours_min(self) -> int:
|
||||
"""Keep enough history for weekly seasonal price extrapolation."""
|
||||
return 24 * 35
|
||||
|
||||
@classmethod
|
||||
def provider_id(cls) -> str:
|
||||
"""Return the unique provider identifier."""
|
||||
return "FeedInTariffAkkudoktor"
|
||||
|
||||
@cache_in_file(with_ttl="1 hour")
|
||||
def _request_forecast(self) -> AkkudoktorElecPrice:
|
||||
"""Fetch market prices from the public Akkudoktor API."""
|
||||
if not self.ems_start_datetime:
|
||||
raise ValueError(f"Start DateTime not set: {self.ems_start_datetime}")
|
||||
|
||||
start_date = to_datetime(
|
||||
self.ems_start_datetime - to_duration("35 days"), as_string="YYYY-MM-DD"
|
||||
)
|
||||
end_date = to_datetime(self.end_datetime, as_string="YYYY-MM-DD")
|
||||
timezone = self.config.general.timezone
|
||||
url = f"https://api.akkudoktor.net/prices?start={start_date}&end={end_date}&tz={timezone}"
|
||||
|
||||
max_attempts = 3
|
||||
last_exc: Optional[Exception] = None
|
||||
for attempt in range(1, max_attempts + 1):
|
||||
try:
|
||||
response = requests.get(url, timeout=(5, 20))
|
||||
logger.debug("Response from {}: {}", url, response)
|
||||
response.raise_for_status()
|
||||
data = ElecPriceAkkudoktor._validate_data(response.content)
|
||||
self.update_datetime = to_datetime(in_timezone=timezone)
|
||||
return data
|
||||
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as exc:
|
||||
last_exc = exc
|
||||
logger.warning(
|
||||
"Akkudoktor feed-in tariff request attempt {}/{} failed: {}",
|
||||
attempt,
|
||||
max_attempts,
|
||||
exc,
|
||||
)
|
||||
if attempt < max_attempts:
|
||||
time.sleep(2 * attempt)
|
||||
|
||||
raise last_exc # type: ignore[misc]
|
||||
|
||||
def _parse_data(self, data: AkkudoktorElecPrice) -> pd.Series:
|
||||
"""Convert raw EUR/MWh values to a timezone-aware EUR/Wh series."""
|
||||
series = pd.Series(dtype=float)
|
||||
for value in data.values:
|
||||
timestamp = to_datetime(value.start, in_timezone=self.config.general.timezone)
|
||||
series.at[timestamp] = value.marketprice / 1_000_000
|
||||
return series
|
||||
|
||||
def _predict_prices(self, history: np.ndarray, hours: int) -> np.ndarray:
|
||||
"""Extend published prices to the configured prediction horizon."""
|
||||
predictor = ElecPriceAkkudoktor()
|
||||
if len(history) > 800:
|
||||
return predictor._predict_ets(history, seasonal_periods=168, hours=hours)
|
||||
if len(history) > 168:
|
||||
return predictor._predict_ets(history, seasonal_periods=24, hours=hours)
|
||||
if len(history) > 0:
|
||||
logger.warning(
|
||||
"Using median fallback for Akkudoktor feed-in tariff with only {} values.",
|
||||
len(history),
|
||||
)
|
||||
return predictor._predict_median(history, hours=hours)
|
||||
raise ValueError("No Akkudoktor feed-in tariff data available")
|
||||
|
||||
async def _update_data(self, force_update: Optional[bool] = False) -> None:
|
||||
"""Update raw prices and extrapolate any missing horizon values."""
|
||||
if not self.ems_start_datetime:
|
||||
raise ValueError(f"Start DateTime not set: {self.ems_start_datetime}")
|
||||
|
||||
try:
|
||||
data = self._request_forecast(force_update=force_update) # type: ignore[call-arg]
|
||||
series = self._parse_data(data)
|
||||
if series.empty:
|
||||
raise ValueError("No Akkudoktor feed-in tariff data available")
|
||||
self.highest_orig_datetime = to_datetime(
|
||||
series.index.max(), in_timezone=self.config.general.timezone
|
||||
)
|
||||
await self.key_from_series("feed_in_tariff_wh", series)
|
||||
except Exception as exc:
|
||||
if self.highest_orig_datetime is None:
|
||||
raise
|
||||
logger.warning(
|
||||
"Akkudoktor feed-in tariff update failed ({}); retaining existing data.",
|
||||
exc,
|
||||
)
|
||||
|
||||
if self.highest_orig_datetime is None:
|
||||
raise ValueError("Highest original datetime not available")
|
||||
|
||||
history = np.asarray(
|
||||
await self.key_to_array(
|
||||
key="feed_in_tariff_wh",
|
||||
end_datetime=self.highest_orig_datetime,
|
||||
fill_method="linear",
|
||||
),
|
||||
dtype=float,
|
||||
)
|
||||
covered_hours = (
|
||||
int((self.highest_orig_datetime - self.ems_start_datetime).total_seconds() // 3600) + 1
|
||||
)
|
||||
needed_hours = self.config.prediction.hours - max(covered_hours, 0)
|
||||
if needed_hours <= 0:
|
||||
return
|
||||
|
||||
prediction = self._predict_prices(history, needed_hours)
|
||||
prediction_series = pd.Series(
|
||||
data=prediction,
|
||||
index=[
|
||||
self.highest_orig_datetime + to_duration(f"{i + 1} hours")
|
||||
for i in range(len(prediction))
|
||||
],
|
||||
)
|
||||
await self.key_from_series("feed_in_tariff_wh", prediction_series)
|
||||
@@ -36,6 +36,7 @@ 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.feedintariffakkudoktor import FeedInTariffAkkudoktor
|
||||
from akkudoktoreos.prediction.feedintariffenergycharts import FeedInTariffEnergyCharts
|
||||
from akkudoktoreos.prediction.feedintarifffixed import FeedInTariffFixed
|
||||
from akkudoktoreos.prediction.feedintariffimport import FeedInTariffImport
|
||||
@@ -82,6 +83,7 @@ elecprice_energy_charts = ElecPriceEnergyCharts()
|
||||
elecprice_fixed = ElecPriceFixed()
|
||||
elecprice_import = ElecPriceImport()
|
||||
elecprice_tibber = ElecPriceTibber()
|
||||
feedintariff_akkudoktor = FeedInTariffAkkudoktor()
|
||||
feedintariff_energy_charts = FeedInTariffEnergyCharts()
|
||||
feedintariff_fixed = FeedInTariffFixed()
|
||||
feedintariff_import = FeedInTariffImport()
|
||||
@@ -108,6 +110,7 @@ def prediction_providers() -> list[
|
||||
ElecPriceFixed,
|
||||
ElecPriceImport,
|
||||
ElecPriceTibber,
|
||||
FeedInTariffAkkudoktor,
|
||||
FeedInTariffEnergyCharts,
|
||||
FeedInTariffFixed,
|
||||
FeedInTariffImport,
|
||||
@@ -137,6 +140,7 @@ def prediction_providers() -> list[
|
||||
elecprice_fixed, \
|
||||
elecprice_import, \
|
||||
elecprice_tibber, \
|
||||
feedintariff_akkudoktor, \
|
||||
feedintariff_energy_charts, \
|
||||
feedintariff_fixed, \
|
||||
feedintariff_import, \
|
||||
@@ -162,6 +166,7 @@ def prediction_providers() -> list[
|
||||
elecprice_fixed,
|
||||
elecprice_import,
|
||||
elecprice_tibber,
|
||||
feedintariff_akkudoktor,
|
||||
feedintariff_energy_charts,
|
||||
feedintariff_fixed,
|
||||
feedintariff_import,
|
||||
@@ -192,6 +197,7 @@ class Prediction(PredictionContainer):
|
||||
ElecPriceFixed,
|
||||
ElecPriceImport,
|
||||
ElecPriceTibber,
|
||||
FeedInTariffAkkudoktor,
|
||||
FeedInTariffEnergyCharts,
|
||||
FeedInTariffFixed,
|
||||
FeedInTariffImport,
|
||||
|
||||
@@ -6,6 +6,7 @@ from unittest.mock import Mock, patch
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from akkudoktoreos.core.cache import CacheFileStore
|
||||
from akkudoktoreos.prediction.elecprice import ElecPriceCommonSettings
|
||||
|
||||
100
tests/test_feedintariffakkudoktor.py
Normal file
100
tests/test_feedintariffakkudoktor.py
Normal file
@@ -0,0 +1,100 @@
|
||||
import asyncio
|
||||
import json
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from akkudoktoreos.core.coreabc import get_ems
|
||||
from akkudoktoreos.prediction.elecpriceakkudoktor import AkkudoktorElecPrice
|
||||
from akkudoktoreos.prediction.feedintariffakkudoktor import FeedInTariffAkkudoktor
|
||||
from akkudoktoreos.utils.datetimeutil import to_datetime, to_duration
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def provider(config_eos):
|
||||
config_eos.merge_settings_from_dict(
|
||||
{
|
||||
"elecprice": {"charges_kwh": 0.30},
|
||||
"feedintariff": {"provider": "FeedInTariffAkkudoktor"},
|
||||
}
|
||||
)
|
||||
value = FeedInTariffAkkudoktor()
|
||||
value.highest_orig_datetime = None
|
||||
value.records.clear()
|
||||
assert value.enabled()
|
||||
return value
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def response_data():
|
||||
return {
|
||||
"meta": {
|
||||
"start_timestamp": "1733871600",
|
||||
"end_timestamp": "1733958000",
|
||||
"start": "2024-12-11T00:00:00+01:00",
|
||||
"end": "2024-12-12T00:00:00+01:00",
|
||||
},
|
||||
"values": [
|
||||
{
|
||||
"start_timestamp": 1733871600,
|
||||
"end_timestamp": 1733875200,
|
||||
"start": "2024-12-11T00:00:00+01:00",
|
||||
"end": "2024-12-11T01:00:00+01:00",
|
||||
"marketprice": 100.0,
|
||||
"unit": "Eur/MWh",
|
||||
"marketpriceEurocentPerKWh": 10.0,
|
||||
},
|
||||
{
|
||||
"start_timestamp": 1733875200,
|
||||
"end_timestamp": 1733878800,
|
||||
"start": "2024-12-11T01:00:00+01:00",
|
||||
"end": "2024-12-11T02:00:00+01:00",
|
||||
"marketprice": 200.0,
|
||||
"unit": "Eur/MWh",
|
||||
"marketpriceEurocentPerKWh": 20.0,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
class TestFeedInTariffAkkudokor:
|
||||
|
||||
def test_provider_is_available(self, config_eos):
|
||||
assert "FeedInTariffAkkudoktor" in config_eos.feedintariff.providers
|
||||
|
||||
def test_parse_data_uses_raw_market_price_without_import_charges(self, provider, response_data):
|
||||
data = AkkudoktorElecPrice.model_validate(response_data)
|
||||
series = provider._parse_data(data)
|
||||
assert series.iloc[0] == pytest.approx(0.0001)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_hourly_prices_are_held_constant_on_quarter_hour_grid(self, provider, response_data):
|
||||
data = AkkudoktorElecPrice.model_validate(response_data)
|
||||
await provider.key_from_series("feed_in_tariff_wh", provider._parse_data(data))
|
||||
start = to_datetime("2024-12-11 00:00:00", in_timezone="Europe/Berlin")
|
||||
|
||||
values = await provider.key_to_array(
|
||||
key="feed_in_tariff_wh",
|
||||
start_datetime=start,
|
||||
end_datetime=start + to_duration("2 hours"),
|
||||
interval=to_duration("15 minutes"),
|
||||
fill_method="ffill",
|
||||
)
|
||||
|
||||
assert values.tolist() == pytest.approx([0.0001] * 4 + [0.0002] * 4)
|
||||
|
||||
@patch("requests.get")
|
||||
def test_request_uses_akkudoktor_prices_endpoint(self, mock_get, provider, response_data):
|
||||
response = Mock()
|
||||
response.content = json.dumps(response_data)
|
||||
response.raise_for_status = Mock()
|
||||
mock_get.return_value = response
|
||||
get_ems().set_start_datetime(to_datetime("2024-12-11 00:00:00", in_timezone="Europe/Berlin"))
|
||||
|
||||
provider._request_forecast(force_update=True)
|
||||
|
||||
url = mock_get.call_args[0][0]
|
||||
assert url.startswith("https://api.akkudoktor.net/prices?")
|
||||
assert "tz=Europe/Berlin" in url
|
||||
assert mock_get.call_args.kwargs["timeout"] == (5, 20)
|
||||
@@ -7,6 +7,7 @@ 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.feedintariffakkudoktor import FeedInTariffAkkudoktor
|
||||
from akkudoktoreos.prediction.feedintariffenergycharts import FeedInTariffEnergyCharts
|
||||
from akkudoktoreos.prediction.feedintarifffixed import FeedInTariffFixed
|
||||
from akkudoktoreos.prediction.feedintariffimport import FeedInTariffImport
|
||||
@@ -47,6 +48,7 @@ def forecast_providers():
|
||||
ElecPriceFixed(),
|
||||
ElecPriceImport(),
|
||||
ElecPriceTibber(),
|
||||
FeedInTariffAkkudoktor(),
|
||||
FeedInTariffEnergyCharts(),
|
||||
FeedInTariffFixed(),
|
||||
FeedInTariffImport(),
|
||||
@@ -101,23 +103,24 @@ def test_provider_sequence(prediction):
|
||||
assert isinstance(prediction.providers[2], ElecPriceFixed)
|
||||
assert isinstance(prediction.providers[3], ElecPriceImport)
|
||||
assert isinstance(prediction.providers[4], ElecPriceTibber)
|
||||
assert isinstance(prediction.providers[5], FeedInTariffEnergyCharts)
|
||||
assert isinstance(prediction.providers[6], FeedInTariffFixed)
|
||||
assert isinstance(prediction.providers[7], FeedInTariffImport)
|
||||
assert isinstance(prediction.providers[8], LoadAkkudoktor)
|
||||
assert isinstance(prediction.providers[9], LoadAkkudoktorAdjusted)
|
||||
assert isinstance(prediction.providers[10], LoadVrm)
|
||||
assert isinstance(prediction.providers[11], LoadImport)
|
||||
assert isinstance(prediction.providers[12], PVForecastAkkudoktor)
|
||||
assert isinstance(prediction.providers[13], PVForecastVrm)
|
||||
assert isinstance(prediction.providers[14], PVForecastPVNode)
|
||||
assert isinstance(prediction.providers[15], PVForecastForecastSolar)
|
||||
assert isinstance(prediction.providers[16], PVForecastSolcast)
|
||||
assert isinstance(prediction.providers[17], PVForecastImport)
|
||||
assert isinstance(prediction.providers[18], WeatherBrightSky)
|
||||
assert isinstance(prediction.providers[19], WeatherClearOutside)
|
||||
assert isinstance(prediction.providers[20], WeatherOpenMeteo)
|
||||
assert isinstance(prediction.providers[21], WeatherImport)
|
||||
assert isinstance(prediction.providers[5], FeedInTariffAkkudoktor)
|
||||
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)
|
||||
|
||||
|
||||
def test_provider_by_id(prediction, forecast_providers):
|
||||
@@ -135,6 +138,7 @@ def test_prediction_repr(prediction):
|
||||
assert "ElecPriceFixed" in result
|
||||
assert "ElecPriceImport" in result
|
||||
assert "ElecPriceTibber" in result
|
||||
assert "FeedInTariffAkkudoktor" in result
|
||||
assert "FeedInTariffEnergyCharts" in result
|
||||
assert "FeedInTariffFixed" in result
|
||||
assert "FeedInTariffImport" in result
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
"bidding_zone": "DE-LU"
|
||||
},
|
||||
"providers": [
|
||||
"FeedInTariffAkkudoktor",
|
||||
"FeedInTariffEnergyCharts",
|
||||
"FeedInTariffFixed",
|
||||
"FeedInTariffImport"
|
||||
|
||||
12
uv.lock
generated
12
uv.lock
generated
@@ -1187,15 +1187,15 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "httpcore2"
|
||||
version = "2.7.0"
|
||||
version = "2.8.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "h11" },
|
||||
{ name = "truststore" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d5/fe/6a3f9f1a8bb8733326140737446aaf72fddb8b54b8f202302f5c84960613/httpcore2-2.7.0.tar.gz", hash = "sha256:6dc0fedf329a52a990930a5579edfebaea81118ea700ea0dd7de2b5e5be49efc", size = 65593, upload-time = "2026-07-14T20:40:01.111Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ce/50/a33260c2a959a7f12d3cf6b96bb35c7028c5d1904fa7b2f5850fa175af01/httpcore2-2.8.0.tar.gz", hash = "sha256:44be3730e7cd4fd206478488c00f57c0960b5e00ee9f7099ef18bb2b0c5cdb79", size = 66779, upload-time = "2026-07-23T11:54:40.443Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6f/6c/62e2e279e63fc4f7a5ee841ef13175a8bbc613f258e9dcc186e9de803a42/httpcore2-2.7.0-py3-none-any.whl", hash = "sha256:1452f589fe23f55b44546cd884294c41a29330af902bc0b71a761fd52d18f92b", size = 81506, upload-time = "2026-07-14T20:39:58.053Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/12/b7/76d6baa8c087cf5170f36dbeb92471e77c5c48f8f7ca8e5ba4ad613ea492/httpcore2-2.8.0-py3-none-any.whl", hash = "sha256:60ee2f9963ca942955ffd44553fc1111f00286283f9cc047d74e19888e061ace", size = 82638, upload-time = "2026-07-23T11:54:37.976Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1258,7 +1258,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "httpx2"
|
||||
version = "2.7.0"
|
||||
version = "2.8.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "anyio" },
|
||||
@@ -1267,9 +1267,9 @@ dependencies = [
|
||||
{ name = "truststore" },
|
||||
{ name = "typing-extensions", marker = "python_full_version < '3.13'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a3/4a/129b2e21b90ac2985d3928d96792bccc39bc6dfe796c5eee2d8ec06d4105/httpx2-2.7.0.tar.gz", hash = "sha256:8b30709aed5c8465b0dd3b95c09ce301c8f79e7e7a2d00ab0af551e0d0375b07", size = 94487, upload-time = "2026-07-14T20:40:02.318Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/31/ca/928387a80e8e6ebbfa7ed020f1412e99038092657d63d801fe935f56677c/httpx2-2.8.0.tar.gz", hash = "sha256:7137d9278553773c672856112c36062ae691146212ab748a6a8362479b19bdee", size = 94485, upload-time = "2026-07-23T11:54:41.363Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/1d/b8/c341bba6411bdfda786020343c47a75ef472f6085caf82391b142b1a3ad9/httpx2-2.7.0-py3-none-any.whl", hash = "sha256:ed2a2719c696789e09493bd8e2bec3d8bd925cc6e26b68389ec25ade132f7bf4", size = 90234, upload-time = "2026-07-14T20:39:59.531Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e6/a7/aea061b450d51cf448c1ccc8e1fc6f04c0d8fdc97c17524c7f835018bb92/httpx2-2.8.0-py3-none-any.whl", hash = "sha256:9617a6af8354667c94dc06a1b7b88a32db618ffb1f0649f8be31c0639dc58227", size = 90232, upload-time = "2026-07-23T11:54:39.222Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user