Skip to content

Instantly share code, notes, and snippets.

@woopstar
Last active October 18, 2022 08:03
Show Gist options
  • Select an option

  • Save woopstar/c13a75a1e8914bdd9d19f799cdeadbfa to your computer and use it in GitHub Desktop.

Select an option

Save woopstar/c13a75a1e8914bdd9d19f799cdeadbfa to your computer and use it in GitHub Desktop.

Revisions

  1. woopstar revised this gist Oct 18, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion template.yaml
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {{ sum_price + costs.nettarif_c_time_vinter_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
  2. woopstar revised this gist Oct 18, 2022. No changes.
  3. woopstar revised this gist Oct 18, 2022. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions energi-data-service-2023
    Original file line number Diff line number Diff line change
    @@ -6,12 +6,12 @@ https://www.elbiil.dk/opladning/aendring-i-elafgiften
    https://elspotpris.dk/

    Udgifterne er regnet ud fra:
    Vores Elnet som net leverandør
    Hustand med varmepumpe og nedsat elafgift
    Jysk Energi - Min strøm med abonnement (https://jyskenergi.dk/el/privat/min-stroem/)
    - Vores Elnet - Gruppe C - som net leverandør
    - Hustand med varmepumpe og nedsat elafgift
    - Jysk Energi - Min strøm (https://jyskenergi.dk/el/privat/min-stroem/)

    Ændringer:
    Balancetarif lægges ind under system tarif
    Balancetarif lægges ind under system tarif jævnfør energinet

    Abonnement net er regnet som:
    433 kr / 8.765,8 timer på et år
  4. woopstar revised this gist Oct 18, 2022. 2 changed files with 63 additions and 66 deletions.
    67 changes: 1 addition & 66 deletions energi-data-service-2023
    Original file line number Diff line number Diff line change
    @@ -17,69 +17,4 @@ Abonnement net er regnet som:
    433 kr / 8.765,8 timer på et år

    Abonemment el leverandør er regnet som:
    15 kr om måneden / 30 dage / 24 timer

    Template 2023:

    {% set costs = {
    "transmission_nettarif": 0.0760,
    "systemtarif": 0.0670,
    "nettarif_c_time_sommer_lav": 0.1588,
    "nettarif_c_time_sommer_hoj": 0.2382,
    "nettarif_c_time_sommer_spids": 0.6194,
    "nettarif_c_time_vinter_lav": 0.1588,
    "nettarif_c_time_vinter_hoj": 0.4765,
    "nettarif_c_time_vinter_spids": 1.4294,
    "abonnement_net": 0.04939651829,
    "abonnement_el_leverandor": 0.020833,
    "eltillaeg_el_leverandor": 0.00,
    "spotpris_tillaeg": 0.00
    }
    %}

    {% if states("sensor.hovedforsyning_energy_total_current_month") | float < 336 %}
    {% if now().month >= 1 or now().month < 7 %}
    {% set elafgift = 0.008 %}
    {% else %}
    {% set elafgift = 0.680 %}
    {% endif %}
    {% else %}
    {% set elafgift = 0.008 %}
    {% endif %}

    {% set sum_price = costs.transmission_nettarif +
    costs.spotpris_tillaeg +
    costs.systemtarif +
    elafgift +
    costs.abonnement_net +
    costs.eltillaeg_el_leverandor +
    costs.abonnement_el_leverandor
    %}

    {% if now().month >= 10 or now().month < 4 %}
    {% if now().hour >= 0 and now().hour < 6 %}
    {{ sum_price + costs.nettarif_c_time_vinter_lav }}
    {% endif %}
    {% if now().hour >= 6 and now().hour < 17 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% else %}
    {% if now().hour >= 0 and now().hour < 6 %}
    {{ sum_price + costs.nettarif_c_time_sommer_lav }}
    {% endif %}
    {% if now().hour >= 6 and now().hour < 17 %}
    {{ sum_price + costs.nettarif_c_time_sommer_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_sommer_hoj }}
    {% endif %}
    {% endif %}
    15 kr om måneden / 30 dage / 24 timer
    62 changes: 62 additions & 0 deletions template.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    {% set costs = {
    "transmission_nettarif": 0.0760,
    "systemtarif": 0.0670,
    "nettarif_c_time_sommer_lav": 0.1588,
    "nettarif_c_time_sommer_hoj": 0.2382,
    "nettarif_c_time_sommer_spids": 0.6194,
    "nettarif_c_time_vinter_lav": 0.1588,
    "nettarif_c_time_vinter_hoj": 0.4765,
    "nettarif_c_time_vinter_spids": 1.4294,
    "abonnement_net": 0.04939651829,
    "abonnement_el_leverandor": 0.020833,
    "eltillaeg_el_leverandor": 0.00,
    "spotpris_tillaeg": 0.00
    }
    %}

    {% if states("sensor.hovedforsyning_energy_total_current_month") | float < 336 %}
    {% if now().month >= 1 or now().month < 7 %}
    {% set elafgift = 0.008 %}
    {% else %}
    {% set elafgift = 0.680 %}
    {% endif %}
    {% else %}
    {% set elafgift = 0.008 %}
    {% endif %}

    {% set sum_price = costs.transmission_nettarif +
    costs.spotpris_tillaeg +
    costs.systemtarif +
    elafgift +
    costs.abonnement_net +
    costs.eltillaeg_el_leverandor +
    costs.abonnement_el_leverandor
    %}

    {% if now().month >= 10 or now().month < 4 %}
    {% if now().hour >= 0 and now().hour < 6 %}
    {{ sum_price + costs.nettarif_c_time_vinter_lav }}
    {% endif %}
    {% if now().hour >= 6 and now().hour < 17 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% else %}
    {% if now().hour >= 0 and now().hour < 6 %}
    {{ sum_price + costs.nettarif_c_time_sommer_lav }}
    {% endif %}
    {% if now().hour >= 6 and now().hour < 17 %}
    {{ sum_price + costs.nettarif_c_time_sommer_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_sommer_hoj }}
    {% endif %}
    {% endif %}
  5. woopstar created this gist Oct 18, 2022.
    85 changes: 85 additions & 0 deletions energi-data-service-2023
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,85 @@
    Kilder:

    https://energinet.dk/Om-nyheder/Nyheder/2022/09/06/Energinet-justerer-tarif
    https://www.voreselnet.dk/-/media/vores-elnet/dokumenter/samlet/priser/vores-elnet_prisblad_-differentieret_nettariffer_1-jan-2023.ashx?la=da&hash=F16E3CF53FC01591F387E70C252E04183AF1D2C1
    https://www.elbiil.dk/opladning/aendring-i-elafgiften
    https://elspotpris.dk/

    Udgifterne er regnet ud fra:
    Vores Elnet som net leverandør
    Hustand med varmepumpe og nedsat elafgift
    Jysk Energi - Min strøm med abonnement (https://jyskenergi.dk/el/privat/min-stroem/)

    Ændringer:
    Balancetarif lægges ind under system tarif

    Abonnement net er regnet som:
    433 kr / 8.765,8 timer på et år

    Abonemment el leverandør er regnet som:
    15 kr om måneden / 30 dage / 24 timer

    Template 2023:

    {% set costs = {
    "transmission_nettarif": 0.0760,
    "systemtarif": 0.0670,
    "nettarif_c_time_sommer_lav": 0.1588,
    "nettarif_c_time_sommer_hoj": 0.2382,
    "nettarif_c_time_sommer_spids": 0.6194,
    "nettarif_c_time_vinter_lav": 0.1588,
    "nettarif_c_time_vinter_hoj": 0.4765,
    "nettarif_c_time_vinter_spids": 1.4294,
    "abonnement_net": 0.04939651829,
    "abonnement_el_leverandor": 0.020833,
    "eltillaeg_el_leverandor": 0.00,
    "spotpris_tillaeg": 0.00
    }
    %}

    {% if states("sensor.hovedforsyning_energy_total_current_month") | float < 336 %}
    {% if now().month >= 1 or now().month < 7 %}
    {% set elafgift = 0.008 %}
    {% else %}
    {% set elafgift = 0.680 %}
    {% endif %}
    {% else %}
    {% set elafgift = 0.008 %}
    {% endif %}

    {% set sum_price = costs.transmission_nettarif +
    costs.spotpris_tillaeg +
    costs.systemtarif +
    elafgift +
    costs.abonnement_net +
    costs.eltillaeg_el_leverandor +
    costs.abonnement_el_leverandor
    %}

    {% if now().month >= 10 or now().month < 4 %}
    {% if now().hour >= 0 and now().hour < 6 %}
    {{ sum_price + costs.nettarif_c_time_vinter_lav }}
    {% endif %}
    {% if now().hour >= 6 and now().hour < 17 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_vinter_hoj }}
    {% endif %}
    {% else %}
    {% if now().hour >= 0 and now().hour < 6 %}
    {{ sum_price + costs.nettarif_c_time_sommer_lav }}
    {% endif %}
    {% if now().hour >= 6 and now().hour < 17 %}
    {{ sum_price + costs.nettarif_c_time_sommer_hoj }}
    {% endif %}
    {% if now().hour >= 17 and now().hour < 21 %}
    {{ sum_price + costs.nettarif_c_time_sommer_spids }}
    {% endif %}
    {% if now().hour >= 21 and now().hour <= 23 %}
    {{ sum_price + costs.nettarif_c_time_sommer_hoj }}
    {% endif %}
    {% endif %}