Skip to content

MTrab/stromligning

Repository files navigation

Current Release Github All Releases

Buy Me A Coffee

Stromligning for Home Assistant integrates Day Ahead spotprices for electricity, from the Stromligning API.

The integration automatically recognises tariff settings from the Home Assistant home location coordinates and allows you to select your electricity vendor.

Table of Content

Installation

Setup

Use the custom template to show the next x cheapest hours  

Installation:

Option 1 (easy) - HACS:

  • Ensure that HACS is installed.
  • Search for and install the "Stromligning" integration.
  • Restart Home Assistant.

Option 2 - Manual installation:

  • Download the latest release.
  • Unpack the release and copy the custom_components/stromligning directory into the custom_components directory of your Home Assistant installation.
  • Restart Home Assistant.

Setup

My Home Assistant shortcut:

Or go to Home Assistant > Settings > Integrations

Add "Stromligning" integration (If it doesn't show, try CTRL+F5 to force a refresh of the page)

Use the custom template to show the next x cheapest hours

Copy the custom_templates/FindCheapestPrice.jinja to the custom_templates directory in your config folder (if it doesn't exist then create the folder) Reload Home Assistant and use the Jinja template by inserting the example below in a template sensor helper

{% from 'FindCheapestPeriod.jinja' import FindCheapestPeriod%}
{% set earliestStartTime = now() %}
{% set latestStartTime = now() + timedelta(days=2) %}
{% set periodLength = timedelta(hours=3) %}
{{ FindCheapestPeriod(earliestStartTime , latestStartTime , periodLength, false) }}

This will result in a sensor showing the cheapest 3 hours within the known prices