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.

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.

API domain

New integrations should use https://api.energypriceforecast.eu/api/v1/.... Older legacy paths may still work for existing setups, but they should no longer be the reference for new ones.

Price forecast For dynamic or flexible electricity tariffs. evcc receives values in EUR/kWh or, for Denmark, optionally in DKK/kWh.
CO2 forecast For CO2-aware charging. The value describes expected CO2e per consumed kWh, including import effects.
No private tax logic The standard endpoint returns wholesale or forecast-style prices, not automatically your exact household end price.

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=120

  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=120

hours=120 means up to 5 days. If fewer fresh values exist, the endpoint only returns the meaningful slots that are currently available.

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

Price DE, NL, BE, DK1, DK2, and FR.
CO2 DE, NL, BE, DK1, and DK2.
Denmark For DK1 and DK2 you can optionally request currency=DKK.
https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=dk1&type=grid&currency=DKK&hours=120

Test 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=1
https://api.energypriceforecast.eu/api/v1/evcc/tariff?country=de&type=co2&hours=24&debug=1

Important 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 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.

Beta note

The evcc path is still relatively new. It was tested technically with evcc tariff, but not yet across many real-world setups. If you use it, compare the values with the web app at first and report anything that looks implausible.

Related: evcc tariff documentation and evcc CO2 charging documentation.