Last active
October 26, 2022 18:40
-
-
Save JBoye/2386d84fd9be722acf4370bf435db076 to your computer and use it in GitHub Desktop.
Energi Data Service Template with reduced tax
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 spidslast = 0.4537 %} | |
{% set lavlast = 0.1636 %} | |
{% set tillaeg = 0 %} | |
{% set afgift = 0.723 if (states("sensor.manedligt_elforbrug") | float(0) < 334) else 0.008 %} | |
{% set tariffer = [0.00229, 0.061, 0.049] | sum %} | |
{% set spids = (now().month < 3 or now().month >= 10) and (now().hour >= 17 and now().hour <= 19) %} | |
{{tillaeg + afgift + tariffer + (spidslast if spids else lavlast)}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment