Tariffs
You can configure electricity tariffs for grid consumption, feed-in and CO₂ intensity. This allows evcc to calculate your savings and automatically shift charging to cheaper times.
Fixed Electricity Price
The simplest case is fixed values for grid consumption (grid
) and feed-in (feedin
).
tariffs:
currency: EUR # (default EUR)
grid:
type: fixed
price: 0.294 # EUR/kWh
feedin:
type: fixed
price: 0.08 # EUR/kWh
co2:
...
Time-based Electricity Price
Electricity tariffs with fixed time-based prices can also be defined.
tariffs:
grid:
type: fixed
price: 0.294 # EUR/kWh (default)
zones:
- days: Mo-Fr
hours: 2-5
price: 0.2 # EUR/kWh
- days: Sa,So
price: 0.15 # EUR/kWh
You can also define a list of price zones under zones
.
The validity period is defined by days
and/or hours
.
If no price zone is defined for a time, the default price is used.
The evcc tariff
command shows the price list for the upcoming hours.
$ ./evcc tariff
grid:
From To Price/Cost
2026-05-03 00:00:00 2026-05-03 01:00:00 0.399
...
feedin:
From To Price/Cost
2026-05-03 00:00:00 2026-05-03 01:00:00 0.080
...
Exchange Prices
You have a contract that is calculated based on exchange prices? For many providers, we have integrated a dedicated interface (e.g., Awattar or Tibber). You can find the list of all available providers in the section Dynamic Electricity Price.
Fees and Taxes
If your provider is not included, you can calculate your tariff based on the day-ahead prices of the European electricity exchange yourself. The Energy-Charts API from Fraunhofer ISE provides current and forecasted prices. These are used by almost all providers as the basis for calculating their energy prices.
tariffs:
grid:
type: template
template: energy-charts-api
bzn: DE-LU # Bidding zone, see https://api.energy-charts.info/#/prices/day_ahead_price_price_get
charges: 0.22 # Fixed surcharge per kWh (e.g., 20ct grid fee, 2ct extra charges)
tax: 0.19 # Percentage surcharge (e.g., 19% VAT)
The interface provides the exchange prices in euros without local fees or taxes.
With the parameters charges
and tax
, you can define an additional fixed and percentage surcharge per kWh.
You can find the exact values in your contract.
Custom Formulas
If the model of tax and charges is not sufficient, you can define an individual formula.
Use the formula
parameter for for more flexible pricing.
tariffs:
grid:
type: template
template: energy-charts-api
bzn: DE-LU
charges: 0.22 # Fixed surcharge per kWh
tax: 0.19 # Percentage surcharge
formula: math.Min(0.5, (price + charges) * (1 + tax))
In the example above, a price cap of 50 ct/kWh is defined.
The formula is written in Go syntax.
In addition to the values price
, charges
, and tax
, the math
library is available.
Exchange Prices with Time Component
The formula is executed for the current electricity price and each time slot in the forecast.
If the calculation is time-dependent, you can also access the time of the respective slot via ts
.
tariffs:
grid:
type: template
template: energy-charts-api
bzn: DE-LU
formula: extra := 0.1; if ts.Hour() < 6 || ts.Hour() > 22 { extra = 0.0 }; price + extra
In this example, there is a surcharge of 10 ct/kWh. No surcharge is calculated from 10:00 PM to 6:00 AM. There are no limits to your imagination.
The formula
mechanism also works for many other data-providers.
Check the documentation below.
You can view the respective calculation results using the command evcc tariff
.
CO₂ forecast
Electricity Maps
Commercial API
CO₂ data for many countries from https://electricitymaps.com/. The 'Free Personal Tier' unfortunately does not include forecast data. You'll need a commercial account from https://api-portal.electricitymaps.com/. Free trial available.
tariffs:
co2:
type: template
template: electricitymaps
uri: https://api-access.electricitymaps.com/2w...1g/ # HTTP(S) address
token:
zone: DE # see https://api.electricitymap.org/v3/zones
Free API
CO₂ data for many countries from https://electricitymaps.com/. The 'Free Personal Tier' unfortunately does not include forecast data. You'll need a commercial account from https://api-portal.electricitymaps.com/. Free trial available.
tariffs:
co2:
type: template
template: electricitymaps-free
token:
zone: DE # see https://api.electricitymap.org/v3/zones
Grünstromindex
Regional emission data from https://gruenstromindex.de. Only available for Germany.
tariffs:
co2:
type: template
template: grünstromindex
zip:
National Grid ESO
Only available for the United Kingdom.
tariffs:
co2:
type: template
template: ngeso
region: 1 # Coarser than using a postcode. See https://carbon-intensity.github.io/api-definitions/#region-list (optional)
postalcode: SW1 # Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only. (optional)
Dynamic electricity price
Custom Plugin
Use the plugin mechanism to connect a custom tariff source.
Example: Current price via HTTP
tariffs:
grid:
type: custom
price:
source: http
uri: https://example.com/api/price
The value returned by the endpoint is used as the grid price.
Example: Forecasts via HTTP
tariffs:
grid:
type: custom
forecast:
source: http
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "price": .[1] }) | tostring'
The plugin must return a JSON structure containing a list of time periods and prices.
The date fields must be in the form YYYY-MM-DDTHH:MM:SSZ
and the price in the correct currency unit (e.g. EUR).
See the following example:
[
{ "start": "2025-01-01T00:00:00Z", "end": "2025-01-01T01:00:00Z", "price": 25.0 },
{ "start": "2025-01-01T01:00:00Z", "end": "2025-01-01T02:00:00Z", "price": 30.0 },
]
The plugin is updated once per hour.
Amber Electric
Only available for Australia.
tariffs:
grid:
type: template
template: amber
token: # optional
siteid: # optional
channel: # optional
Awattar
Only available for Germany and Austria.
tariffs:
grid:
type: template
template: awattar
region: AT # optional
Energinet
Only available for Denmark.
tariffs:
grid:
type: template
template: energinet
region: dk1 # optional
Enever
Only available for Netherlands.
tariffs:
grid:
type: template
template: enever
token:
provider:
ENTSO-E
Day-ahead prices for the European electricity market. See https://transparency.entsoe.eu for more information. Basis for many dynamic tariffs.
tariffs:
grid:
type: template
template: entsoe
securitytoken: # Registration and subsequent helpdesk request required. Details on the process can be found here https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation (optional)
domain: BZN|DE-LU # see https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas (optional)
Fraunhofer ISE
Day-ahead forecast of energy prices (per kWh) on the exchange. No prior registration for https://api.energy-charts.info/ necessary. Can be used for dynamic electricity tariffs, for example, where the supplier does not yet offer a price forecast on the customer interface.
tariffs:
grid:
type: template
template: energy-charts-api
bzn: DE-LU # Bidding zones - https://api.energy-charts.info/#/prices/day_ahead_price_price_get
Groupe E Vario Plus
Only available for Switzerland.
tariffs:
grid:
type: template
template: groupe-e
Nordpool spot prices
Nordpool spot prices in day-ahead market for all markets in the Nordpool region.
tariffs:
grid:
type: template
template: nordpool
region: GER # optional
currency: EUR # optional
Octopus Energy
API
You can get the API key in the Octopus portal https://octopus.energy/dashboard/new/accounts/personal-details/api-access
tariffs:
grid:
type: template
template: octopus-api
apiKey: # Octopus Energy API Key.
Product Code
tariffs:
grid:
type: template
template: octopus-productcode
productCode: AGILE-FLEX-22-11-25 # The tariff code for your energy contract. Make sure this is set to your import tariff code.
region: # The DNO region you are located in. More information: https://www.energy-stats.uk/dno-region-codes-explained/
Ostrom
Create a 'Production Client' in the Ostrom developer portal: https://developer.ostrom-api.io/
tariffs:
grid:
type: template
template: ostrom
clientid: 476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4
clientsecret: 476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4a
contract: 100523456 # Only required if multiple contracts belong to the same user (optional)
PUN Orario
Price data from https://www.mercatoelettrico.org/it/. Often used for feeding into the grid. Only available for Italy.
tariffs:
grid:
type: template
template: pun
SmartEnergy smartCONTROL
Only available for Austria.
tariffs:
grid:
type: template
template: smartenergy
Spotty Energie
Only available for Austria.
tariffs:
grid:
type: template
template: spottyenergy
contractid: ffffffff-4444-6666-2222-aaaaaabbbbbb # You can get your contract id from the customer portal https://i.spottyenergie.at/
pricetype: CONSUMPTION # Price type, either spotmarket price, consumption price or generation compensation (if contractually agreed), more info at https://www.spottyenergie.at/blog/energie-smart-produzieren
Tibber
Get your API token from the Tibber developer portal: https://developer.tibber.com/
tariffs:
grid:
type: template
template: tibber
token: 476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4
homeid: cc83e83e-8cbf-4595-9bf7-c3cf192f7d9c # Only required if you have multiple homes in your Tibber account. (optional)