Any good ideas are welcome. Nordpool Energy Price per hour

Hi, Thanks for the answer and the help! worked fine to sort out the cheapest!

Also found this: Nordpool price cheap/expensive actions. Thanks to anhelgesen. Seems to sort out the most cheap/expensive ones, not sequentially. easy to adjust back and forth in the ui and do actions with , if anyone look for a done solution. Will try it out

1 Like

Try entso-e? Not too worried myself about nordpool but the entso-e api is fully free and open. There is an integration:

https://github.com/JaccoR/hass-entso-e

only reason I’m still using nordpool is another integration which optimizes my ev charging and relies on nordpool:

https://github.com/jonasbkarlsson/ev_smart_charging

The creator is adding entso-e support, once that’s implemented I can fully move away from nordpool.

Soooo…it seems Nordpool is the safe bet for now. Tibber won’t give me any meaningful data (not even current price) at the moment and entso-e appears to be “down for maintenance”
Maybe tibber will work once my contract actually starts…

Ok, so now I have all the data sources, entso, Nordpool and Tibber. I just need to figure out the best way to create templates and automations to optimally manage my PV battery, heat pump (future) and Tesla (though that works well enough with EV Smart Charge).

Update:
Right…so my initial trial went reasonably well, but did hit some snags. My main issue right now is (as usual) with the way HA handles Triggers.
I used a binary sensor to start charging my PV battery when the price was “very cheap” and it fired off fine (though the Huawei Integration didn’t react the first time, but that’s a separate issue).
Problem is…it charged until it reached the target SoC and then started discharging. The price remained “very cheap” for quite a while afterwards and it could have topped the battery up again after it had discharged for a bit, but since the trigger never moved from “on” to “off” and back again (since the price remained below the threshold) it didn’t rerun the automation.
I will have to figure out a graceful way of handling this and would welcome and ideas. Thanks!

Update2: I might have found a way by switching the Trigger and the Condition…will see if it actually works.

2 Likes

This is probably a very newbie question, but if I want to extract the specific energy price at a specific time to Google Sheets, how do I format an automation for this?

I’m currently using the Nordpool prices to charge our EV during the cheapest price at night, and it works great, but I would also like to log the hours and price to Google Sheets. So far, my automation just logs the name of the Nordpool entity…

Any help would be greatly appreciated :slightly_smiling_face:

Why not store it in influxdb?

Hi Ronald,

Thanks for the suggestion. I’ve not used influxdb yet, so I’ll look into how to set that up :slight_smile:

Stuck with modifiying 'additional_costs in YAML config. In documentation there is an additional argument current_price which can be altered as e.g. {{current_price + 0.013}}. But somehow I do not succeed in making a condition like this: (here not in Jinja) if(current_price < x) then {{current_price + y}} ?
TIA and best, JR

https://web-api.tp.entsoe.eu/api?securityToken=sec&documentType=A65&processType=A16&outBiddingZone_Domain=10YLT-1001A0008Q&periodStart=202301130300&periodEnd=202301130600

Am I doing it right, because for some reason the price seems different from Nordpool. what should be “document type” and “process type”?

I would suggest not using the “template” part in entso-e at all. Rather just add VAT and then make a template for the price with fees included seperately?
That’s what I ended up with because the template thingy kept going a bit crazy.

For those looking for a simple way to get entso-e spotprices, check out Electricity price right now - Home Assistant REST integration . Simple rest api endpoint (without need for a key), which provides min/max for today and tomorrow, currency conversion, support adding fees, and VAT-factor. The example gets all properties with a single sensor, which provide data (for presenning with apex charts) and additional values as attributes. But it’s of course possible to configure in any way you want :slight_smile:

That’s a nice little helper, but I honestly think we have enough data sources by now, what I would really like to see is an integration with UI configurable properties to extract the relevant info from all those sensor attributes.

There are various different requirements, individual cheap hours, absolute cheap prices, sequential cheap hours etc…and right now getting them all into some kind of useful shape is a bit of a pain for those of us not well versed in writing yaml code.

This works for me:

    additional_costs:  >-
        {% set s = {
            "hourly_fixed_cost": 0.0,
            "winter_low": 0.23,
            "winter_high": 0.689,
            "winter_peak":2.067,
            "summer_low": 0.23,
            "summer_high": 0.344,
            "summer_peak":0.896,
            "cert": 0.01
        }
        %}
        {% if now().month >= 4 and now().month < 10 %}
            {% if now().hour >= 16 and now().hour < 22 %}
                {{ s.summer_peak | float }}
            {% else %}
                {% if now().hour >= 6 %}
                    {{ s.summer_high | float }}
                {% else %}
                    {{ s.summer_low | float }}
                {% endif %}
            {% endif %}
        {% else %}
            {% if now().hour >= 16 and now().hour < 22 %}
                {{ s.winter_peak | float }}
            {% else %}
                {% if now().hour >= 6 %}
                    {{ s.winter_high | float }}
                {% else %}
                    {{ s.winter_low | float }}
                {% endif %}
            {% endif %}
        {% endif %}

I hope it helps you.

Is it possible to have the price-graph as a stacked graph?
Ie “Additional cost” as one color and “Nordpool price” as an other?
The intention is to have “what do I pay for imported electricity” vs “what do I get for exported electricity” in one graph.

Newbie here. Is it possible to combine the today and tomorrow time series into one? I would like both in one chart, but the bars are not wide enough. This is obviously because it has 2 time series, and the values of half of them are always 0.
I can’t figure out if I can do this with apex, or a template or in some other way: Anyone have a suggestion?

Hi all,

I am trying to fix a sensor to trigger scenes on the cheapest consecutive hours but something is fishy. I created a new post to avoid spamming (and change the sensor along the way): Binary sensor unavailable? (Nordpool)

2 Likes

Hi.
In addition to the prices, the Nordpool page also provides min, max, avg, peak every day. Is there an easy way in HA to call these values without unnecessary calculations directly in the apexchart card?

1 Like

Hi Bent,

I tried to add the “additional costs” - I am a total novice - like the following:

type: custom:apexcharts-card
graph_span: 48h
header:
title: Energy price till tomorrow (dkk/kWh)
show: true
span:
start: day
now:
show: true
label: Now
additional_costs: |-
{% set s = {
“hourly_fixed_cost”: 0.0,
“winter_low”: 0.23,
“winter_high”: 0.689,
“winter_peak”:2.067,
“summer_low”: 0.23,
“summer_high”: 0.344,
“summer_peak”:0.896,
“cert”: 0.01
} %} {% if now().month >= 4 and now().month < 10 %}
{% if now().hour >= 16 and now().hour < 22 %}
{{ s.summer_peak | float }}
{% else %}
{% if now().hour >= 6 %}
{{ s.summer_high | float }}
{% else %}
{{ s.summer_low | float }}
{% endif %}
{% endif %}
{% else %}
{% if now().hour >= 16 and now().hour < 22 %}
{{ s.winter_peak | float }}
{% else %}
{% if now().hour >= 6 %}
{{ s.winter_high | float }}
{% else %}
{{ s.winter_low | float }}
{% endif %}
{% endif %}
{% endif %}
series:

  • entity: sensor.nordpool_kwh_dk1_dkk_3_10_025
    type: column
    data_generator: |
    return entity.attributes.raw_today.map((start, index) => {
    return [new Date(start[“start”]).getTime(), entity.attributes.raw_today[index][“value”]];
    });

Unfortunately I get an error message: "value.additional_costs is extraneous". What am I doing wrong?

Hi!
I have a Horizontal Stack Card with entities that shows current price and average price, high, low today.
But how can i get 4 or more decimals?

type: horizontal-stack
cards:
  - type: entity
    entity: sensor.nordpool_kwh_fi_eur_3_10_01
    icon: mdi:currency-eur
    attribute: current_price
    name: Spotpris nu
    unit: €
  - type: entity
    entity: sensor.nordpool_kwh_fi_eur_3_10_01
    name: Snittpris idag
    icon: mdi:currency-eur
    attribute: average
    unit: €

When you create the sensor, you also specify the number of decimal