📈 Home Assistant integration that forecasts day-ahead electricity prices up to 7 days ahead for DE-LU, NL, DK1, DK2 and NO2. Machine-learning model on open weather and market data, peak-risk and negative-price alerts, Plotly dashboards, a look-back of past forecasts. No API key, HACS-ready.
翻译准备中
正在加载完整 README。
查看完整 README ↗Day-ahead electricity prices for Germany, Luxembourg, the Netherlands, Denmark and southern Norway, six days further than the auction.
Project website · Documentation · Releases
The day-ahead auction publishes prices for today and, from about 13:00, for tomorrow. Anyone who plans a home battery, an electric car or a heat pump further ahead has to guess. Spot Forecast is a Home Assistant integration that fills the six days after the last published price with an hourly forecast for the DE-LU, NL, DK1, DK2 or NO2 bidding zone (see Supported zones), and says how far to trust it: an expected price per hour, a peak-risk value that the price exceeded in 12–13 % of the hours of the backtest (the target is one in ten), and a low-price value for likely negative prices.
It runs on open data (Energy-Charts and Open-Meteo), needs no account and no API key, and is light enough for a Raspberry Pi: the models are trained every month on GitHub and only evaluated on your device, with numpy.
A run repeats after each new weather model run (four times a day) and again once the auction result for tomorrow is published. Before that, the forecast covers tomorrow to today + 6; after it, today + 2 to today + 7. Known prices always come first and the forecast follows without a gap. Details: how the model works.
Out of sample, walk-forward: the models were refit month by month on past data
only and forecast days they had never seen, with weather forecasts never
fresher than, and up to a day older than, what a live install uses. Mean
absolute error (MAE) in ct/kWh for DE-LU, from the shipped model's own report
(de_lu-2026-10; NL in Supported zones):
| Horizon | MAE Apr 2025 – Sep 2026 | Naive MAE, same period | Skill, same period | MAE Jul – Sep 2026 | Naive MAE, Jul – Sep 2026 | Skill, Jul – Sep 2026 | Above peak risk |
|---|---|---|---|---|---|---|---|
| D+1 | 1.70 | 3.39 | 50% | 1.99 | 4.29 | 54% | 12% |
| D+2 | 1.78 | 3.39 | 48% | 2.14 | 4.29 | 50% | 12% |
| D+3 | 1.89 | 3.39 | 44% | 2.29 | 4.29 | 47% | 12% |
| D+4 | 2.04 | 3.39 | 40% | 2.50 | 4.29 | 42% | 12% |
| D+5 | 2.31 | 3.39 | 32% | 2.92 | 4.29 | 32% | 12% |
| D+6 | 2.43 | 3.39 | 28% | 3.03 | 4.29 | 29% | 12% |
Naive repeats the price of the same hour a week before. Skill is
1 − MAE ÷ naive MAE, which depends far less on how volatile the market was.
The model report has the naive MAE for the full period only; for July to
September 2026 it is computed from the bundled backfill and Energy-Charts
prices (tools/site_data.py), on the same hours as the
report's MAE. Above peak risk (full period) is how often the actual price
exceeded the calibrated P90; the target is about 10 %.
Peaks come out too low. The forecast gets the timing of price peaks right, not their height. In hours above 21.2 ct/kWh it is on average 7.5 ct too low one day ahead and 9.7 ct six days ahead. For peaks, use the peak-risk band (P90) and the peak-risk sensor that switches on it, not the expected price.
The error depends on the market. From July 2026 gas and electricity prices were higher and more volatile, and the MAE rose to 1.99 ct (D+1) … 3.03 ct (D+6). The naive forecast got worse too (4.29 ct against 3.39 ct), so the skill held at 54 % … 29 %. A frozen model degrades within months when the market shifts, so new models are trained every month and can reach your install without an integration update (see model updates).
The low-price value catches negative prices: in 79–85 % of the hours that turned out negative (depending on the horizon), P10 was below zero. More in accuracy; the website has the forecast against the actual price, per horizon, as an interactive chart.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗