Skip to content

Instantly share code, notes, and snippets.

@JBoye
Last active October 26, 2022 18:40
Show Gist options
  • Save JBoye/c773e0ab18e1d1ac1b0164f9a4a31516 to your computer and use it in GitHub Desktop.
Save JBoye/c773e0ab18e1d1ac1b0164f9a4a31516 to your computer and use it in GitHub Desktop.
Energi Data Service Template for additional costs
{# Find lavlast, spidslast og evt. fortjeneste/tillæg på elspotpris.dk #}
{% set spidslast = 0.4537 %}
{% set lavlast = 0.1636 %}
{% set tillaeg = 0 %}
{% set tariffer = [0.723, 0.00229, 0.061, 0.049] | sum %}
{% set spids = (now().month < 3 or now().month >= 10) and (now().hour >= 17 and now().hour <= 19) %}
{{tariffer + tillaeg + (spidslast if spids else lavlast)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment