MTrab / stromligning

Home Assistant integration for the Strømligning API
GNU General Public License v3.0
14 stars 0 forks source link
home-assistant home-assistant-integration homeassistant homeassistant-custom-component

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:

Option 2 - Manual installation:

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