Add new provider class for electricity fees providers. Add the generic providers: - ElecFeeFixed - ElecFeeImport The providers provide predictions for: - elecfee_consumption_amt_wh: Total fixed fee for consumed energy per Wh [amount/Wh]. This is the accumulation of all fixed per-Wh fees payable on "consumed energy - such as network charge, concession fee, and electricity charge - into a single amount. - elecfee_consumption_percent_amt: Total fixed surcharge on consumed energy, given as a percentage of the monetary amount already charged for that energy [%]. This is the accumulation of all percentage-based surcharges payable on top of the consumed-energy fee - such as VAT - into a single percentage. This is a percentage of the fee amount, not a per-Wh rate. - elecfee_feedin_amt_wh: Total fixed deduction from feed-in energy per Wh [amount/Wh]. This is the accumulation of all fixed per-Wh charges deducted from feed-in energy - such as metering fees or grid-operator handling "charges - into a single amount. Applied after the percentage-based deduction, i.e. it reduces the price by a flat amount per Wh rather than by a share of the raw price. - elecfee_feedin_percent_amt: Total percentage deducted from the raw feed-in price (spot price) [%]. This is the accumulation of all percentage-based deductions payable on the feed-in tariff - such as a marketing or balancing fee retained by the aggregator - into a single percentage. It is applied as `raw_price * (100 - percent) / 100`, i.e. it scales down the raw price rather than adding a surcharge to it. A new _apply_fee() method is added to the base class for ElecPrice and FeedInTariff to be used to add the fees in a consistent way. Fees are taken from the active ElecFee provider and applied to the raw prices given to the _apply_fee() method. The optional application of fees is added to: - ElecPriceAkkudoktor - ElecPriceFixed - ElecPriceEnergyCharts - ElecPriceSMARD - FeedInTariffEnergyCharts - FeedInTariffFixed - FeedInTariffSMARD The import providers ElecPriceImport and FeedInTariffImport do not apply fees by intentention. The following providers currently do not handle fees defined by ElecFee: - ElecPriceTibber - FeedInTariffAkkudoktor - FeedInTariffDvhubOnline - FeedInTariffTibber The tests for this feature are either added or existing tests are extended. The documentation was extended for the electricity fee provider settings. Besides this feature further improvements are added: * feat: add SMARD quarter-hour electricty price and feed-in tariff provider * feat: to_series method for TimeWindows and ValueTimeWindows Additional to to_array the time window sequence can now also produce a pandas series. Test have been extended to cover the series generation. * feat: use time windows in fixed feedin tariff provider Feedin tariff can now be configured by time windows - not a single value. * feat: EOSdash select for PVLib inverters and modules Provide PVLib inverter and module names in config selection. * feat: EOSdash lazy select for big option sets Add a new form for lazy selection of big option sets. Filtering and generation of the option set is done server-side. * fix: use raw data for ETS/ median prediction Use to raw time series data for ETS/ median prediction to avoid interference by e.g. dynamic grid charges. * fix: EOSdash config drops by type only on details resolve Drop configuration by type and path. Prevents dropping of configuration items with same type and level but different path. * fix: EOSdash configuration section closes on update Open section if searching or if last update touched this category — including updates on deeply nested sub-fields. * chore: make elecfeefixed, elecpricefixed and feedintarifffixed warn about no windows and default to 0 Missining configuration creates default 0 value and a warning instead of an exception. * fix: test setup for providers Reset db state on each test run. * chore: improve config option naming for elecpricefixed. * chore: adapt elecpricefixed test to changed time_windows naming * chore: factorized common price provider helpers to priceabc.py Factorized common price provider helpers to priceabc.py. Add tests for these helpers. Reduce/ change testing of elecpriceabc.py and feedintariffabc.py to cover only specifics. Rest of testing is already covered by test_priceabc.py. * chore: update version Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
9.0 KiB
Electricity Price Prediction Configuration
:::{table} elecprice :widths: 10 20 10 5 5 30 :align: left
| Name | Environment Variable | Type | Read-Only | Default | Description |
|---|---|---|---|---|---|
| akkudoktor | EOS_ELECPRICE__AKKUDOKTOR |
ElecPriceAkkudoktorCommonSettings |
rw |
required |
Akkudoktor electricity price provider settings. |
| elecpricefixed | EOS_ELECPRICE__ELECPRICEFIXED |
ElecPriceFixedCommonSettings |
rw |
required |
Fixed electricity price provider settings. |
| elecpriceimport | EOS_ELECPRICE__ELECPRICEIMPORT |
ElecPriceImportCommonSettings |
rw |
required |
Electricity price import provider settings. |
| energycharts | EOS_ELECPRICE__ENERGYCHARTS |
ElecPriceEnergyChartsCommonSettings |
rw |
required |
Energy Charts provider settings. |
| provider | EOS_ELECPRICE__PROVIDER |
`str | None` | rw |
None |
| providers | list[str] |
ro |
N/A |
Available electricity price provider ids. | |
| smard | EOS_ELECPRICE__SMARD |
ElecPriceSMARDCommonSettings |
rw |
required |
SMARD electricity price provider settings. |
| tibber | EOS_ELECPRICE__TIBBER |
ElecPriceTibberCommonSettings |
rw |
required |
Tibber electricity price provider settings. |
| ::: |
Example Input
{
"elecprice": {
"provider": "ElecPriceAkkudoktor",
"akkudoktor": {},
"elecpricefixed": {
"elecprice_marketprice_amt_kwh": {
"windows": []
}
},
"elecpriceimport": {
"import_file_path": null,
"import_json": null
},
"energycharts": {
"bidding_zone": "DE-LU"
},
"smard": {
"filter_id": 4169,
"region": "DE"
},
"tibber": {
"access_token": null,
"home_id": null
}
}
}
Example Output
{
"elecprice": {
"provider": "ElecPriceAkkudoktor",
"akkudoktor": {},
"elecpricefixed": {
"elecprice_marketprice_amt_kwh": {
"windows": []
}
},
"elecpriceimport": {
"import_file_path": null,
"import_json": null
},
"energycharts": {
"bidding_zone": "DE-LU"
},
"smard": {
"filter_id": 4169,
"region": "DE"
},
"tibber": {
"access_token": null,
"home_id": null
},
"providers": [
"ElecPriceAkkudoktor",
"ElecPriceEnergyCharts",
"ElecPriceFixed",
"ElecPriceImport",
"ElecPriceSMARD",
"ElecPriceTibber"
]
}
}
Common settings for the Tibber electricity price provider
:::{table} elecprice::tibber :widths: 10 10 5 5 30 :align: left
| Name | Type | Read-Only | Default | Description |
|---|---|---|---|---|
| access_token | `str | None` | rw |
None |
| home_id | `str | None` | rw |
None |
| ::: |
Example Input/Output
{
"elecprice": {
"tibber": {
"access_token": "tibber_pat_...",
"home_id": "00000000-0000-0000-0000-000000000000"
}
}
}
Common settings for the direct SMARD electricity-price provider
:::{table} elecprice::smard :widths: 10 10 5 5 30 :align: left
| Name | Type | Read-Only | Default | Description |
|---|---|---|---|---|
| filter_id | int |
rw |
4169 |
SMARD filter id for the German/Luxembourg day-ahead price. |
| region | str |
rw |
DE |
SMARD market region used in the chart-data endpoint. |
| ::: |
Example Input/Output
{
"elecprice": {
"smard": {
"filter_id": 4169,
"region": "DE"
}
}
}
Common settings for Energy Charts electricity price provider
:::{table} elecprice::energycharts :widths: 10 10 5 5 30 :align: left
| Name | Type | Read-Only | Default | Description |
|---|---|---|---|---|
| bidding_zone | <enum 'EnergyChartsBiddingZones'> |
rw |
DE-LU |
Bidding Zone: 'AT', 'BE', 'CH', 'CZ', 'DE-LU', 'DE-AT-LU', 'DK1', 'DK2', 'FR', 'HU', 'IT-NORTH', 'NL', 'NO2', 'PL', 'SE4' or 'SI' |
| ::: |
Example Input/Output
{
"elecprice": {
"energycharts": {
"bidding_zone": "AT"
}
}
}
Common settings for elecprice data import from file or JSON String
:::{table} elecprice::elecpriceimport :widths: 10 10 5 5 30 :align: left
| Name | Type | Read-Only | Default | Description |
|---|---|---|---|---|
| import_file_path | `str | pathlib.Path | None` | rw |
| import_json | `str | None` | rw |
None |
| ::: |
Example Input/Output
{
"elecprice": {
"elecpriceimport": {
"import_file_path": null,
"import_json": "{\"elecprice_marketprice_wh\": [0.0003384, 0.0003318, 0.0003284]}"
}
}
}
Common configuration settings for fixed electricity pricing
This model defines a fixed electricity price schedule using a sequence of time windows. Each window specifies a time interval and the electricity price applicable during that interval.
:::{table} elecprice::elecpricefixed :widths: 10 10 5 5 30 :align: left
| Name | Type | Read-Only | Default | Description |
|---|---|---|---|---|
| elecprice_marketprice_amt_kwh | ValueTimeWindowSequence |
rw |
required |
Sequence of time windows defining the fixed price schedule. If not provided, no fixed pricing is applied. |
| ::: |
Example Input/Output
{
"elecprice": {
"elecpricefixed": {
"elecprice_marketprice_amt_kwh": {
"windows": [
{
"start_time": "00:00:00.000000",
"duration": "8 hours",
"day_of_week": null,
"date": null,
"locale": null,
"value": 0.288
},
{
"start_time": "08:00:00.000000",
"duration": "16 hours",
"day_of_week": null,
"date": null,
"locale": null,
"value": 0.34
}
]
}
}
}
}
Common configuration settings for Akkodoktor electricity pricing
:::{table} elecprice::akkudoktor :widths: 10 10 5 5 30 :align: left
| Name | Type | Read-Only | Default | Description |
|---|---|---|---|---|
| ::: |
Example Input/Output
{
"elecprice": {
"akkudoktor": {}
}
}