evcc · price and CO2
Use electricity price and CO2 forecasts in evcc
Energy Price Forecast provides an evcc-compatible HTTP endpoint. evcc can use it as a custom tariff source for either price forecasts or CO2 forecasts.
- tested with evcc 0.305.1 via
evcc tariff - published day-ahead is returned in quarter-hour resolution; later forecast hours stay hourly
- price and CO2 can be configured independently
Change from October 1, 2026
The price endpoint remains free without an API key, but will then return a maximum of 48 hours. Private Pro continues to provide up to 120 hours of price forecasts. CO2 forecasts remain free without a key for up to 120 hours.
Existing evcc configurations continue to work: without a key, only the price series is shortened to 48 hours. The endpoint does not return a hard API error.
What is this for?
The endpoint only provides the time series. evcc still decides when to charge. In practice, evcc can use the values for charge planning around cheap hours or lower-CO2 hours. The optimizer can also use forecast data, but that part remains experimental inside evcc.
As soon as published day-ahead prices exist, the endpoint prefers those values first. For later hours, the forecast fills the remaining horizon. That is mainly useful when you plan charging across multiple days.
Quick start: add it to evcc
The block belongs at the top level of evcc.yaml. Do not place it under loadpoints, chargers, meters, or inside a single device. If you already have a tariffs: block, extend or replace the entries there instead of creating a second one.
tariffs:
currency: EUR
grid:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=48
co2:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=120
Restart evcc afterwards. You can verify the result with evcc tariff. If you want to test only the price forecast first, the grid: part is enough.
Price forecast in evcc
Germany example. Values are returned in EUR/kWh.
tariffs:
currency: EUR
grid:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=48
hours=48 uses the free price horizon. Until October 1, 2026, the endpoint continues to honor existing anonymous 120-hour configurations in full.
Up to 120 hours with an API key
Add your personal API key as a bearer token directly to the HTTP block and set hours=120. The key belongs under forecast.auth, not in the URL.
tariffs:
currency: EUR
grid:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=120
auth:
type: bearer
token: "YOUR_API_KEY"
Restart evcc and verify the result with evcc tariff. Do not share the API key publicly or include it in forum posts and logs.
CO2 forecast in evcc
Germany example. Values are returned in g/kWh.
tariffs:
co2:
type: custom
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=120
CO2 values are forecasts. They help with timing decisions and describe estimated CO2e per consumed kWh, but they do not replace official emissions accounting.
Supported markets
currency=DKK.
https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=dk1&type=grid¤cy=DKK&hours=48Test it in the browser
With debug=1 you also get metadata about the source. Do not use debug=1 inside the real evcc configuration.
https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=grid&hours=24&debug=1https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=24&debug=1Important notes
Are these prices my exact household electricity prices?
No. The standard endpoint returns wholesale or forecast-style prices. Grid fees, taxes, levies, and supplier markups vary by country, region, and contract. For charging optimization, the relative shape often matters more: when is electricity likely cheaper and when is it likely more expensive?
How does evcc use these values?
evcc uses them as a forecast data source. The grid forecast can help with dynamic tariffs and cheap charging windows. The co2 forecast can help with lower-CO2 charging windows. The endpoint itself does not decide when charging happens.
What resolution does evcc get?
Published day-ahead prices are returned in their native quarter-hour resolution. For hours beyond the published day-ahead, the endpoint continues with hourly forecast values. evcc can handle both intervals; this was tested locally with evcc tariff.
What changes on October 1, 2026?
Without an API key, only the price forecast is limited to 48 hours. A valid Private Pro key provides up to 120 hours. CO2 remains free for up to 120 hours.
What happens if data is stale or missing?
The endpoint intentionally does not return historical test data as if it were current. Instead, it returns an error status so evcc does not optimize against false prices.
Usage note
The evcc integration is regularly used by many installations and is also checked technically with evcc tariff. For a new setup, still compare the values with the web app initially and report anything that looks implausible.
Related: evcc tariff documentation and evcc CO2 charging documentation.