Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: Additional Cost based on date... again #457

Open
boelle opened this issue Dec 12, 2024 · 5 comments
Open

Q: Additional Cost based on date... again #457

boelle opened this issue Dec 12, 2024 · 5 comments

Comments

@boelle
Copy link

boelle commented Dec 12, 2024

i use this template to add fee's on top of what nordpool reports

{% set s = {
"cost": 88.6,
"summer": {"night": 5.5125, "day": 8.2725, "eve": 21.5025, "eve2": 8.2725, "fail": 0.0},
"winter": {"night": 5.5125, "day": 16.545, "eve": 49.6275, "eve2": 16.545, "fail": 0.00}
}
%}
{% set season = 'summer' if 4 <= now().month < 10 else 'winter' %}
{% if 0 <= now().hour < 6 %}
{% set tod = 'night' %}
{% elif 6 <= now().hour < 17 %}
{% set tod = 'day' %}
{% elif 17 <= now().hour < 21 %}
{% set tod = 'eve' %}
{% elif 21 <= now().hour < 24 %}
{% set tod = 'eve2' %}
{% else %}
{% set tod = 'fail' %}
{% endif %}
{{ s[season][tod] + s.cost}}

it should work with the tariff model 3 in denmark

image

fee's for each kwh depends on summer/winter and what time of day it is

the prices today are:

image

but i get much lower prices

{FBCC8989-C282-4C72-BFAE-FEF9A767E778}

{1F7C527E-C0D9-4C98-B632-6CB09DBFFF15}

have i f'ed up or is the data pulled from nordpool wrong?

one thing i have never figured is to add VAT which is 25% for denmark... how do i do that?

@boelle
Copy link
Author

boelle commented Dec 12, 2024

as for the prices... they are listed in MWh

if during config i select that i get close

{57CB131C-2A53-4F45-A627-BC3A8B7CE310}

but my template is based on KWh... so do i just select KWh instead during config?

@boelle
Copy link
Author

boelle commented Dec 12, 2024

so, with this config i'm close....

{6953FC9D-29C1-4458-BDA4-3B34A4438AAA}

{C293E6CA-E336-4CAE-815A-969E5C750AFC}

its just 100x to big... the number should be 547,6402 Øre/kWh which would turn in to 5,476402 kr

@boelle
Copy link
Author

boelle commented Dec 12, 2024

so to sum it up, i need to add 25% and divide by 100

@boelle
Copy link
Author

boelle commented Dec 12, 2024

if i change the last line in my template to this would that add the 25% danish VAT?

{{ (s[season][tod] + s.cost)*0.25}}

@boelle
Copy link
Author

boelle commented Dec 12, 2024

i came even closer, this is more notes for others until i hit the nail fully

{28A7316A-AFC4-438F-A73E-7AF8FC9FAEA1}

and this template. its need adjusting once a year when tarrif changes

{% set s = {
    "cost": 0,
    "summer": {"night": 0.0555125, "day": 0.082725, "eve": 0.215025, "eve2": 0.082725, "fail": 0.0},
    "winter": {"night": 0.0555125, "day": 0.16545, "eve": 0.496275, "eve2": 0.16545, "fail": 0.0}
}
%}
{% set season = 'summer' if 4 <= now().month < 10 else 'winter' %}
{% if 0 <= now().hour < 6 %}
  {% set tod = 'night' %}
{% elif 6 <= now().hour < 17 %}
  {% set tod = 'day' %}
{% elif 17 <= now().hour < 21 %}
  {% set tod = 'eve' %}
{% elif 21 <= now().hour < 24 %}
  {% set tod = 'eve2' %}
{% else %}
  {% set tod = 'fail' %}
{% endif %}
{{ s[season][tod] + s.cost}}

i guess i can now tick the VAT box, but that one does not say what % it uses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant