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.
Use the custom template to show the next x cheapest hours
Ensure that HACS is installed.Search for and install the "Stromligning" integration.Restart Home Assistant.
- 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.
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)
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