Any good ideas are welcome. Nordpool Energy Price per hour

This looks interesting, but it gives me “false” as a result instead of the cheapest non-sequential hours…

It will give you true in case it’s one of the cheapest. Just add the following to get attributes containing the date/time of the cheapest hours (or most expensive hours if you sort them the other way around)

attribute_templates:
  Hour1: {{ l[0] }}
  Hour2: {{ l[1] }}
  Hour3: {{ l[2] }}
  Hour4: {{ l[3] }}
1 Like

Thanks. I will try it out.

I decided to switch to Tibber today, of course it will take a while until the switch will actually happen, so I have some time to get my scripts ready.

My “endgame” is to charge my solar battery when electricity is cheap and then use the power. Of course always calculating in how much power my solar is going to generate within the next 12 (or 24?) Hours. I can already do it with “cheapest consecutive hours” but not yet with individual hours.

I will do the same switch to Tibber. As far as I can tell from Nordpools license agreement, any unlicensed usage of their data is not allowed (even personal). Looking for licensed users on their web page, Tibber is one of them. I cannot find Home Assistant as a licensed end user nor as a licensed data re-distributor.
For sure I cannot afford to pay the ridiculously expensive license fee myself.
But maybe I am not looking in the right place.

1 Like

I would prefer to use data right from Tibber eventually, but right now I don’t get anything useful. I hope that will change when I get the “Pulse”.
Nordpool has some kind of fair use policy for their API it I am not mistaken… but I am not sure about the details.

Edit: actually…I just found some neat Tibber based Templates that look promising…

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?