From 7df717fd3a0f6af49e6ccb151a4782923a610096 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Fri, 5 Jun 2026 23:02:29 +0200 Subject: [PATCH] add chargezones --- .../docs/de/features/dynamic-prices.mdx | 5 +++ .../de/reference/configuration/tariffs.md | 39 +++++++++++++++++++ src/content/docs/de/user-defined-devices.mdx | 17 ++++---- .../docs/en/features/dynamic-prices.mdx | 5 +++ .../en/reference/configuration/tariffs.md | 39 +++++++++++++++++++ src/content/docs/en/user-defined-devices.mdx | 17 ++++---- 6 files changed, 106 insertions(+), 16 deletions(-) diff --git a/src/content/docs/de/features/dynamic-prices.mdx b/src/content/docs/de/features/dynamic-prices.mdx index 647eb9481..69c96d375 100644 --- a/src/content/docs/de/features/dynamic-prices.mdx +++ b/src/content/docs/de/features/dynamic-prices.mdx @@ -61,6 +61,11 @@ tariffs: Unter [Stromtarife](../tariffs) findest du eine Liste aller unterstützten Tarife. Wenn dein Anbieter eine Schnittstelle hat, aber noch nicht von evcc unterstützt wird, dann mach gerne einen [Feature Request](https://github.com/evcc-io/evcc/issues/new/choose) auf. +### Zeitabhängige Netzentgelte + +Berechnet dein Netzbetreiber zeitvariable Netzentgelte (z. B. nach § 14a EnWG), kannst du diese über `chargesZones` zusätzlich zu jedem Tarif abbilden. +Details unter [zeitabhängige Netzentgelte](/de/reference/configuration/tariffs#charges-zones). + ## Günstiges Netzladen Hast du einen zeitabhängigen oder dynamischen Stromtarif konfiguriert, erscheint im Einstellungsdialog am Ladepunkt der Bereich "Günstiges Netzladen". diff --git a/src/content/docs/de/reference/configuration/tariffs.md b/src/content/docs/de/reference/configuration/tariffs.md index 0d3b6b9eb..b510a97ea 100644 --- a/src/content/docs/de/reference/configuration/tariffs.md +++ b/src/content/docs/de/reference/configuration/tariffs.md @@ -40,6 +40,45 @@ tariffs: Mehr Beispiele und eine Übersicht der verfügbaren Anbieter findest du unter [Stromtarife](/de/tariffs). +## Zeitabhängige Netzentgelte {#charges-zones} + +Über `charges` kannst du einen festen Aufschlag pro kWh auf jeden Preiswert addieren. +Berechnet dein Netzbetreiber zeitvariable Netzentgelte (z. B. nach § 14a EnWG), kannst du über `chargesZones` den Standardaufschlag `charges` für bestimmte Zeiträume überschreiben. +Das funktioniert mit jedem Netztarif, egal ob Anbieter-Template, `fixed`-Preis oder `custom`-Quelle. + +Jede Zone hat folgende Felder: + +| Feld | Erfordert | Beschreibung | +| --------- | --------- | ----------------------------------------------------------------- | +| `charges` | ja | Aufschlag pro kWh in dieser Zone. Ersetzt den Standard-`charges`. | +| `months` | nein | z. B. `Nov-Mär` oder `Jun`. Leer bedeutet ganzjährig. | +| `days` | nein | z. B. `Mo-Fr` oder `Sa,So`. Leer bedeutet täglich. | +| `hours` | nein | z. B. `17-20` oder `15:30-21`. Leer bedeutet ganztägig. | + +**Beispiel**: + +```yaml +tariffs: + grid: + type: template + template: tibber + token: "..." + charges: 0.0941 # Standard-Netzentgelt pro kWh + chargesZones: + - months: Nov-Mär + days: Mo-Fr + hours: 17-20 + charges: 0.1838 # Hochtarif + - hours: 0-6 + charges: 0.0299 # Niedrigtarif +``` + +Trifft keine Zone zu, gilt der Standardaufschlag `charges`. +Überlappen sich Zonen, gewinnt die letzte zutreffende Zone. +Ist eine `formula` konfiguriert, enthält die Variable `charges` den Zonenwert des jeweiligen Zeitfensters. + +Ein `fixed`-Tarif mit `chargesZones` wird wie ein dynamischer Tarif behandelt: Der Planer bevorzugt günstige Zeiträume und das Preisdiagramm wird angezeigt. + ## Feature-Flags Bei eigenen Tarifen vom Typ `custom` kannst du über `features` das Verhalten beeinflussen: diff --git a/src/content/docs/de/user-defined-devices.mdx b/src/content/docs/de/user-defined-devices.mdx index daea6345a..10d8349df 100644 --- a/src/content/docs/de/user-defined-devices.mdx +++ b/src/content/docs/de/user-defined-devices.mdx @@ -413,14 +413,15 @@ Die Attribute `price` und `forecast` schließen sich gegenseitig aus. Genau eine ### Konfiguration -| Attribut | Typ | Erfordert | Beschreibung | -| ---------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tariff` | `string` | nein | `price` (Standard), `co2` oder `solar`. Bestimmt die Einheit der zurückgegebenen Werte: Preis in konfigurierter Währung pro kWh, CO₂-Intensität in g/kWh, Solar-Vorhersage in W. | -| `charges` | `float` | nein | Fester Aufschlag pro kWh, der zu jedem Wert addiert wird. Standard `0`. | -| `tax` | `float` | nein | Prozentualer Steuersatz auf das Ergebnis, z. B. `0.2` für 20 %. Standard `0`. | -| `formula` | `string` | nein | Go-Ausdruck für eine eigene Berechnung, mit `price`, `charges` und `tax` im Scope. Siehe [Beispiele](#formula-examples). | -| `interval` | `duration` | nein | Abfrageintervall für `forecast`. Standard `1h`. | -| `cache` | `duration` | nein | Cache-Dauer für `price`. Standard `15m`. | +| Attribut | Typ | Erfordert | Beschreibung | +| -------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `tariff` | `string` | nein | `price` (Standard), `co2` oder `solar`. Bestimmt die Einheit der zurückgegebenen Werte: Preis in konfigurierter Währung pro kWh, CO₂-Intensität in g/kWh, Solar-Vorhersage in W. | +| `charges` | `float` | nein | Fester Aufschlag pro kWh, der zu jedem Wert addiert wird. Standard `0`. | +| `chargesZones` | `list` | nein | Zeitabhängige Aufschläge (z. B. Netzentgelte), die `charges` für bestimmte Zeiträume überschreiben. Siehe [zeitabhängige Netzentgelte](/de/reference/configuration/tariffs#charges-zones). | +| `tax` | `float` | nein | Prozentualer Steuersatz auf das Ergebnis, z. B. `0.2` für 20 %. Standard `0`. | +| `formula` | `string` | nein | Go-Ausdruck für eine eigene Berechnung, mit `price`, `charges` und `tax` im Scope. Siehe [Beispiele](#formula-examples). | +| `interval` | `duration` | nein | Abfrageintervall für `forecast`. Standard `1h`. | +| `cache` | `duration` | nein | Cache-Dauer für `price`. Standard `15m`. | diff --git a/src/content/docs/en/features/dynamic-prices.mdx b/src/content/docs/en/features/dynamic-prices.mdx index 55df3f1e2..607f45d35 100644 --- a/src/content/docs/en/features/dynamic-prices.mdx +++ b/src/content/docs/en/features/dynamic-prices.mdx @@ -61,6 +61,11 @@ tariffs: You can find a list of all supported tariffs under [tariffs](../tariffs). If your provider has an interface but is not yet supported by evcc, please submit a [Feature Request](https://github.com/evcc-io/evcc/issues/new/choose). +### Time-based grid fees + +If your grid operator bills time-dependent grid fees (e.g. time-variable network charges according to § 14a EnWG in Germany), you can add them on top of any tariff using `chargesZones`. +See [time-based grid fees](/en/reference/configuration/tariffs#charges-zones) for details. + ## Smart feed-in During certain periods of the day and in specific regions, there might be an abundance of solar power. At the same time, there may be almost no load on the grid. diff --git a/src/content/docs/en/reference/configuration/tariffs.md b/src/content/docs/en/reference/configuration/tariffs.md index e7f31b305..ab280aff4 100644 --- a/src/content/docs/en/reference/configuration/tariffs.md +++ b/src/content/docs/en/reference/configuration/tariffs.md @@ -38,6 +38,45 @@ tariffs: More examples and a list of available providers can be found in the section [Tariffs](/en/tariffs). +## Time-Based Grid Fees {#charges-zones} + +Use `charges` to add a fixed fee per kWh to every price value. +If your grid operator bills time-dependent grid fees (e.g. time-variable network charges according to § 14a EnWG in Germany), use `chargesZones` to override the default `charges` for specific periods. +This works with any grid tariff, no matter if it uses a provider template, a `fixed` price or a `custom` source. + +Each zone has the following fields: + +| Field | Required | Description | +| --------- | -------- | --------------------------------------------------------- | +| `charges` | yes | Fee per kWh in this zone. Replaces the default `charges`. | +| `months` | no | e.g. `Nov-Mar` or `Jun`. Empty means all year. | +| `days` | no | e.g. `Mon-Fri` or `Sat,Sun`. Empty means every day. | +| `hours` | no | e.g. `17-20` or `15:30-21`. Empty means all day. | + +**Example**: + +```yaml +tariffs: + grid: + type: template + template: tibber + token: "..." + charges: 0.0941 # default grid fee per kWh + chargesZones: + - months: Nov-Mar + days: Mon-Fri + hours: 17-20 + charges: 0.1838 # peak + - hours: 0-6 + charges: 0.0299 # low +``` + +If no zone matches, the default `charges` applies. +If zones overlap, the last matching zone wins. +When a `formula` is configured, the `charges` variable contains the zone value of the respective time slot. + +A `fixed` tariff with `chargesZones` is treated like a dynamic tariff: the planner prefers cheap periods and the price chart is shown. + ## Feature Flags For custom tariffs (`type: custom`) you can influence behaviour via `features`: diff --git a/src/content/docs/en/user-defined-devices.mdx b/src/content/docs/en/user-defined-devices.mdx index 829af1db4..21c6bd995 100644 --- a/src/content/docs/en/user-defined-devices.mdx +++ b/src/content/docs/en/user-defined-devices.mdx @@ -413,14 +413,15 @@ Exactly one of `price` or `forecast` must be configured. ### Configuration -| Attribute | Type | Required | Description | -| ---------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tariff` | `string` | no | `price` (default), `co2` or `solar`. Sets the unit of the returned values: price in configured currency per kWh, CO₂ intensity in g/kWh, solar forecast in W. | -| `charges` | `float` | no | Fixed additional charge per kWh added to every value. Default `0`. | -| `tax` | `float` | no | Percentage tax applied to the result, e.g. `0.2` for 20 %. Default `0`. | -| `formula` | `string` | no | Go expression for a custom calculation, with `price`, `charges` and `tax` in scope. See [examples](#formula-examples). | -| `interval` | `duration` | no | Polling interval for `forecast`. Default `1h`. | -| `cache` | `duration` | no | Cache duration for `price`. Default `15m`. | +| Attribute | Type | Required | Description | +| -------------- | ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tariff` | `string` | no | `price` (default), `co2` or `solar`. Sets the unit of the returned values: price in configured currency per kWh, CO₂ intensity in g/kWh, solar forecast in W. | +| `charges` | `float` | no | Fixed additional charge per kWh added to every value. Default `0`. | +| `chargesZones` | `list` | no | Time-based charges (e.g. grid fees) that override `charges` for specific periods. See [time-based grid fees](/en/reference/configuration/tariffs#charges-zones). | +| `tax` | `float` | no | Percentage tax applied to the result, e.g. `0.2` for 20 %. Default `0`. | +| `formula` | `string` | no | Go expression for a custom calculation, with `price`, `charges` and `tax` in scope. See [examples](#formula-examples). | +| `interval` | `duration` | no | Polling interval for `forecast`. Default `1h`. | +| `cache` | `duration` | no | Cache duration for `price`. Default `15m`. |