Any good ideas are welcome. Nordpool Energy Price per hour

all code in condition → Template condition

Thank you guys for your quick response! :slight_smile:

Does anyone have a good way of calculating somewhat accurate monthly energy price with nordpool? We do have a “variable electricity cost” (rörligt avtal in swedish) and to my basic understanding it takes things into account that I can’t use like the average energy usage of the entire area where I live and such. But with some tricks can I get a somewhat accurate price anyways?

This is what I’ve used so far just adding the extras of electricity contract with vat etc. And it has been fairly stable and was pretty close to what Öresundskraft had in their app. But nowdays when energy prices goes bananas it’s not close to right. Right now it gets me 3.36kr and Öresundskraft says price is 2,10kr their calculations on my price it’s up 4,08kr.

I reached out to them asking how they make these calculations and they replied with this (in swedish)

“Gällande hur vi räknar fram inköpspris avser priset på elbörsen det raka inköpspriset dvs. ett rakt snitt av inköpspriset för varje timme i månaden. Sedan är ditt avtalade pris ett volymvägt elområdespris ett så kallat schablonavräkningspris som räknas fram av Svenska Kraftnät genom att multiplicera inköpspriset för varje timme med elområdets elanvändning under motsvarande timmar. Den summerade kostnaden av samtliga timmar delas därefter med periodens totala elanvändning. I det fakturerade priset ingår även kostnad för inköp av ursprungsgarantier.”

{% set d = {
"elhandel_avtal_paslag": 0.0255,
"elhandel_elcertifikatsavgift": 0.0190,
"elhandel_bra_miljoval": 0.0290,
"elhandel_svk_grundavgift": 0.0089,
"elnat_eloverforing": 0.1760,
"elnat_energiskatt": 0.3600,
"moms": 1.25, 
"nordpool": (states('sensor.nordpool_kwh_se4_sek_2_10_0')| float(0) / 100)
}%}
{% set price = (( d.elhandel_avtal_paslag + d.elhandel_elcertifikatsavgift + d.elhandel_bra_miljoval + d.elhandel_svk_grundavgift + d.elnat_eloverforing + d.elnat_energiskatt ) * d.moms | float(0) ) + d.nordpool | float(0) %}
{{ price | round(2) }}

Hi. Struggled to make decisions in automations based on all the attributes nordpool entity. Found “nordpool_diff” which I thought would solve it but ended up being a new integration “nordpool_planner” after my fork became to different.

It searches in a sliding window ahead in time, but reading about charging vehicles I suppose it could be adapted to also give those amounts of hours within a time span.

I am working on an integration to fetch the day ahead energy prices from the ENTSO-e Transparency Platform. Check it out:

For now, it only considers Dutch prices, but I am working on adding all EU countries with some configuration. It is the first integration I built, so it would be great if there are people willing to help me test and develop the integration.

2 Likes

Have you adjusted the name of the sensor?

Hi all,
I can’t seem to make this sensor report the correct spot prices. The general curves are the same, but they are always a bit higher than what is listed on the NordPool market data site itself.

For example, this is the sensor output for today for the first five hours (SEK/kWh):

1.097,
1.276,
1.125,
1.143,
1.292,

Looking at Market data | Nord Pool, I see instead these values (these are in SEK/mWh):

877,33
1 020,59
899,91
914,56
1 033,29

Both are for Oct 3:rd, region SE3, and sensor is configured like this:

- platform: nordpool
  friendly_name: "SE3 Price"
  region: "SE3"
  VAT: True
  currency: "SEK"
  price_in_cents: False
  low_price_cutoff: 0.7
  precision: 3
  price_type: kWh

What am I missing?

You’re missing VAT. As far as I can see you have 25% VAT in Sweden, so that would be exactly your difference.

You sir, are correct! Nordpool naturally doesn’t include VAT.

I think you should contact Öresundskraft to discuss what kind of contract you prefer. There are two alternative “variable electricity cost” agreements, (rörligt avtal ) , one with this “volume based”(volumvägt) and another type based on your individual hourly consumption. You should discuss this and decide what type of agreement you desire. If you prefer the second type, your bill will be calculated out off what you consume a particular hour based on the Nordpool pricelist you have loaded in your Nordpool sensor.

how can i get this to work with the 4 cheapest hour against each other.

{{ (state_attr('sensor.nordpool_kwh_dk1_dkk_3_10_025', 'today')[8:16] | sort(false))[1] | float(default=0) }}

Change [1] to [3]. This is the index of the sorted list of prices and starts from zero, [1] meant the second best and [3] means the fourth best.

1 Like

Thanks

I have made an automation with a trigger every hour , an this in condition :slight_smile:

{{ (state_attr('sensor.nordpool_kwh_dk1_dkk_3_10_025', 'today')[9:16] | sort(false))[1] | float(default=0) <= states('sensor.nordpool_kwh_dk1_dkk_3_10_025')|float(default=0)}}

But it is alway TRUE

Hi!

Thanks for a nice chart. looks like yours ir rounded one place after comma. Hoe can i take the rounding off?

Hi!
I have a fixed electricity price, I have an apexcard that shows what my electricity is and in the same graph I have what it should have been if I have had an hourly tariff (nordpool)
But it seems like it resets every hour and calculates the imported electricity with the new hourly price, so if the next hour is cheaper it will calculate the latest price with the imported electricity and it is less than the hour before. I want it to calculate the price for every hour and add on to the next if you understand what I’m trying to explain :slight_smile:
The white graph is nordpool integration.
I have made a sensor that looks like this:

experiment_nordpool_import:
        friendly_name: "Jämför med spotpris"
        unit_of_measurement: "EUR"
        value_template: "{{ states('sensor.grid_import_solar_daily_energy') | float * states('sensor.nordpool_kwh_fi_eur_3_10_024') | float }}"

Hello everyone.
To start of with Im very new in to HA, so this is most likely a roockie misstake but here we go.
I tried getting the graphs to work but everytime I get it “working” its allways showing the “now” in the correct place, but the graph is shifted one hour back, is it possible to of shift the graph is some way? Allso Im missing hours from 22:00 to 00:00.


As you can see in the photo the first “spike” today where at 07-08 from nordpool but in my graph it shows that it was at 06-07’

Edit:
Just notice that the its the graph being generated from 23:00 the day before and thats why its shifted and allso missing data for the last hour, some one had the same issue before and maybe know how to fix it?
I gone thought all time settings and everything sems fine. Im in sweden so its DTS +2 now if that gives eny more information…

Hi!
I have a markdown card that shows the next day cheapest 3 hours, and the most expensive 3 hours.
But how can I make it, so it shows the cheapest next day 3 hours between 07:00 - 21:00?

Here is the code:

  {% set iterativesum = namespace(iter=[]) %}

  {% set lowestiter = namespace(kr=2) %}

  {% set timelowest = namespace(hr=2) %}

  {% set highestiter = namespace(kr=0) %}

  {% set timehighest = namespace(hr=0) %}

  {% set num_hours = 3 | int %}

  {% set nordpoolentity = 'sensor.nordpool_kwh_fi_eur_3_10_024' %}

  {% set timemapper = {

  0: '00:00',

  1 : '01:00',

  2 : '02:00',

  3 : '03:00',

  4 : '04:00',

  5 : '05:00',

  6 : '06:00',

  7 : '07:00',

  8 : '08:00',

  9 : '09:00',

  10 : '10:00',

  11 : '11:00',

  12 : '12:00',

  13 : '13:00',

  14 : '14:00',

  15 : '15:00',

  16 : '16:00',

  17 : '17:00',

  18 : '18:00',

  19 : '19:00',

  20 : '20:00',

  21 : '21:00',

  22 : '22:00',

  23 : '23:00',

  24: '00:00',

  25 : '01:00',

  26 : '02:00',

  27 : '03:00',

  28 : '04:00',

  29 : '05:00',

  30 : '06:00',

  31 : '07:00',

  32 : '08:00',

  33 : '09:00',

  34 : '10:00',
  35 : '11:00',

  36 : '12:00',

  37 : '13:00',

  38 : '14:00',

  39 : '15:00',

  40 : '16:00',

  41 : '17:00',

  42 : '18:00',

  43 : '19:00',

  44 : '20:00',

  45 : '21:00',

  46 : '22:00',

  47 : '23:00',

  48 : '0:00',

  } %}

  {% set prices = namespace(price=[]) %}

  {% set prices.price = prices.price + state_attr(nordpoolentity, 'today')
  %}
  {%- if state_attr(nordpoolentity,'tomorrow') | length == 1 -%}
  Morgondagens priser ej släppta

  {% else %}

  {% set prices.price = prices.price + state_attr(nordpoolentity,
  'tomorrow') %}

  {% endif %}

  {%- for n in range(prices.price|length -num_hours +1) -%}

  {%- set tempsum= namespace(temp=0) -%}

  {%- for i in range(num_hours) -%}

  {%- set tempsum.temp = tempsum.temp + prices.price[n+i] -%}

  {% endfor -%}

  {% set iterativesum.iter = iterativesum.iter + [tempsum.temp] -%}

  {% endfor -%}

  {% for iter in iterativesum.iter -%}

  {%- if loop.index > now().hour -%}

  {%- if iter < lowestiter.kr | float -%}

  {%- set lowestiter.kr = iter | float -%}

  {%- set timelowest.hr = loop.index -1 -%}

  {%- endif -%}
  {%- if iter > highestiter.kr | float -%}

  {%- set highestiter.kr = iter | float -%}

  {%- set timehighest.hr = loop.index -1 -%}

  {%- endif -%}

  {%- endif -%}

  {% endfor -%}
  De billigaste {{num_hours}}-timmarna startar {% if (timelowest.hr < 24)
  %}idag{% else %}imorgon{% endif %} kl {{timemapper[timelowest.hr]}}, då
  snittpriset är {{"%.2f"|format(lowestiter.kr/num_hours)}} cent/kWh
  De dyraste {{num_hours}}-timmarna startar {% if (timehighest.hr < 24)
  %}idag{% else %}imorgon{% endif %} kl {{timemapper[timehighest.hr]}}, då
  snittpriset är {{"%.2f"|format(highestiter.kr/num_hours)}} cent/kWh

Can someone tell me how to use Nordpool price this way:

Current price is less than 90% of todays average → turn on water heater
Current price is over 110% of todays average → turn off water heater

There are a bunch of updates waiting to be released to the next version. I’m a bit worried that the last release was in May. Can we have more frequent (beta) updates?

Will this work?

alias: VVP - AV - NP
description: “”
trigger:

  • platform: numeric_state
    entity_id: sensor.nordpool_kwh_krsand_nok_2_09_025
    attribute: current_price
    below: sensor.nordpool_gjennomstnittspris
    id: Undersnitt1
  • platform: numeric_state
    entity_id: sensor.nordpool_kwh_krsand_nok_2_09_025
    attribute: current_price
    above: sensor.nordpool_gjennomstnittspris
    id: Oversnitt1
    condition: []
    action:
  • choose:
    • conditions:
      • condition: trigger
        id: Undersnitt1
        sequence:
      • type: turn_on
        device_id: ea7158a561ef6a4944da6e90292fc9a1
        entity_id: switch.vvb
        domain: switch
    • conditions:
      • condition: trigger
        id: Oversnitt1
        sequence:
      • type: turn_off
        device_id: ea7158a561ef6a4944da6e90292fc9a1
        entity_id: switch.vvb
        domain: switch
        mode: single

How can I get gjennomsnittpris (average price) times 0,9? And 1,1? So that it turns on when price is less than 90% of average and off when it is 110% of average.