Forecasts are divided into three categories:
For both options, data is delivered from midnight of the current day. Forecasts are updated twice daily.
In Home Assistant you can integrate the forecasts via the EPEX Spot plugin. Depending on whether you use the Free or Pro plan, you get 2 or 6 full days of forecast.
Here's how:
The forecasts can be integrated into EVCC to control when your car is charged.
Here's how:
The price is then calculated using the formula <code class="bg-gray-50 px-2 py-1 rounded text-sm font-mono">(Preis + fixed_cost_cent) * (1 + vat / 100.0)</code>.
tariffs:
grid:
type: template
template: energyforecast
token: # Your API token
charges: # Additional fixed surcharge per kWh (e.g. 0.05 for 5 cents) (optional)
tax: # Tax, additional percentage surcharge (e.g. 0.2 for 20%) (optional)
Before integration, only EPEX Spot day-ahead prices are available.
After integration
ioBroker is an open-source IoT platform that is especially popular in Germany. You can retrieve energy price forecasts via a JavaScript script using httpGet().
Here's how:
schedule("0 * * * *", async () => {
const res = await httpGet("https://www.energyforecast.de/api/v2/forecast?token=YOUR_API_TOKEN");
const data = JSON.parse(res.result);
setState("javascript.0.energyforecast.data", JSON.stringify(data), true);
});
Replace YOUR_API_TOKEN with your API key.
Tip: The API delivers data in JSON format. Use the `total_ct_kwh` field for the total price incl. fixed costs and VAT. Blockly or JavaScript scripts can determine the cheapest hours and control your devices accordingly.
If you know your way around, you can easily retrieve data via the API and use it in your project. The API documentation can be found at Swagger / Open API Documentation
If you build an integration that could be useful to others, let us know. We appreciate every integration and are happy to help spread the word.
Contact