Last active
October 26, 2022 18:41
-
-
Save JBoye/09af58dc09f9e0ffe893964ff291bfd4 to your computer and use it in GitHub Desktop.
Energi Data Service Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Find lavlast, spidslast og evt. fortjeneste/tillæg på elspotpris.dk #} | |
{% set lavlast = 0.13976 %} | |
{% if (now().month < 3 or now().month >= 10) %} | |
{# vinter takst #} | |
{% set hojlast = 0.4192 %} | |
{% set spidslast = 1.2576 %} | |
{% else %} | |
{# sommer takst #} | |
{% set hojlast = 0.2096 %} | |
{% set spidslast = 0.54496 %} | |
{% endif %} | |
{% set tillaeg = 0 %} | |
{% set afgift = 0.723 if now().year == 2022 else 0.008 %} | |
{% set tariffer = [0.00229, 0.061, 0.049] | sum %} | |
{{[tariffer, tillaeg, afgift, (lavlast if now().hour <= 6 else spidslast if now().hour >= 17 and now().hour <= 20 else hojlast)] | sum}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment