Home Assistant
You can get current and historical electricity prices in Home Assistant by using the REST endpoint together with Home Assistant's RESTful integration.
The example configuration gives you an entity called sensor.spotprice_now, which displays the price right now. The entity also receives a number of attributes:
- data – every price point, yesterday to tomorrow.
- min/max/avg – today's prices
- min/max/avg_tomorrow – tomorrow's prices
- min/max/avg_yesterday – yesterday's prices
The API supports hourly and 15-minute data and determines the current price based on the interval. If you customize your price settings (cogwheel in the top right), the configuration is updated immediately.
The service is free and open to everyone, no API key is required. It is used at your own risk, no guarantees are given.
Parameters
The endpoint is https://spot.56k.guru/api/v2/hass and accepts:
- area – the last part of the url when browsing an area, e.g.
SE3,FI,DE-LU. - currency –
SEKNOKDKKEURPLN…(any ECB currency), orOREfor öre. - extra – fees per kWh in chosen currency, before VAT, e.g.
0.05. - multiplier – multiplier for spot price before adding fees and VAT, 1.02 is a 2% surcharge.
- factor – VAT factor, 1.25 is 25% VAT.
- decimals – precision of all prices.
- interval – PT15M or PT60M. Defaults to the current market resolution of the area.
configuration.yaml
Apexcharts-card in Lovelace
An example showing how to use the configuration above with apexcharts-card to render a graph of prices today and tomorrow.
Apexcharts-card