Home assistant

You can easily get current and historical electricity prices in Home Assistant by using our REST endpoint together with Home Assistant's REST integration.

The example configuration gives you an entity called entities.spotprice_now, which displays the spot price right now. The device also receives a number of attributes, e.g.

  • data - full hourly history, yesterday to tomorrow.
  • min/max/avg - Today's hourly price
  • min/max/avg_tomorrow - Tomorrow's hourly price
  • min/max/avg_yesterday - Yesterday's hourly price

If you customize your price settings on the page (using the hamburger menu), your changes will be immediately reflected in the configuration to the right.

The service is free and open to everyone, no API key is required. However, it is used at your own risk, no guarantees are given! More information about data source and data quality can be found at the bottom of the page.

Parameters

The base url to the endpoint is https://spot.56k.guru/api/v2/hass, and the following parameters is available.

NOTE: If you've made any customizations on this page, the example url is already up to date with your personal settings.

  • currency - SEK NOK EUR PLN ...
  • area - If you browse to the area of interest on this page, you'll have the area id as the last part of the URL - something like SE or DE-LU
  • extra - Your fees per kWh in chosen currency, before VAT. Example: 0.05 for 5 cents per kWh
  • multiplier - Multiplier for spot price before adding fees and VAT. 1 is no multiplier, 1.02 is 2% added fee on spot price before adding extra fees and VAT.
  • factor - Factor for VAT. 1 is no VAT, 1.25 is 25% VAT and so on.
  • decimals - Precision for all price points, 2 will result in 0.05kWh, 4 -> 0.00521, and so on.
configuration.yaml
- Showing spot price (no factor or fees added) of SE2 in EUR.

Apexcharts-card in Lovelace

This is an example showing how to use above configuration out of the box, to render a nice graph showing electricity prices for today and tomorrow.

Note that all values in the graph is multiplied by 100 to show cents or öre instead of EUR or SEK.

Home Assistant spotprice example
Information and Terms of Use

All statistics are retrieved from ENTSO-e transparency platform. Current exchange rate fetched from ECB.

The figures shown should be correct, but are supplied without guarantees. The site and related services are provided for private use, at your own risk.

The source code of the page is completely open and is available at github.com/hexagon/spotweb

Bugs and issues are reported through 'Issues' on GitHub. Contact can also be made via email to hexagon{a}56k.guru.

Apexchart-card config