Sorry, on phone, so apologies for any formatting issues. This is what I have on a markdown card. I don’t trust the tomorrow_valid flag, so I just assume that tomorrow’s values are available at 13:01 local time:
Complete card code below:
type: markdown
content: >-
Snitt: {{state_attr('sensor.nordpool_kwh_trheim_nok_3_095_025',
'today')|average|round(1)}}
Max: {{state_attr('sensor.nordpool_kwh_trheim_nok_3_095_025',
'today')|max|round(1)}}
Min: {{state_attr('sensor.nordpool_kwh_trheim_nok_3_095_025',
'today')|min|round(1)}}
Nå: {{(states('sensor.nordpool_kwh_trheim_nok_3_095_025')|float|round(1))}}
{% if (now().strftime('%T')) > '13:01:00' %}
I morgen:
Snitt: {{state_attr('sensor.nordpool_kwh_trheim_nok_3_095_025',
'tomorrow')|average|round(1)}}
Max: {{state_attr('sensor.nordpool_kwh_trheim_nok_3_095_025',
'tomorrow')|max|round(1)}}
Min: {{state_attr('sensor.nordpool_kwh_trheim_nok_3_095_025',
'tomorrow')|min|round(1)}}
{%- else %}
Strømpris for i morgen er ikke klar.
{% endif -%}
title: Strømpris
Well. actually, the entire content “fails” if tomorrow is unavailable, but it has been more reliable than using the tomorrow_valid flag. It’s quite some time since I tried to use the flag, but since this is mostly working I am sticking with it.
Before 13:01 it shows this (The last sentence says: “The energy price for tomorrow is not ready”:
This thread is really cool and super helpful for a Newbie like myself.
I live in Denmark and have solar panels on the roof and I am selling excessive power to a company called “Jysk Energi”. The price I get is my consumption price in DKK reduced by 25 ore, I believe.
Of course I would like to assess the “returned to grid” in monetary terms. Could I use the Nordpool price per hour and somehow apply “minus 0,25 DKK”?
You are missing the beginning of the code I’ve shared where the template: is and also some Indentation.
Try to copy my code again, including the first line.
cmon guys, such a long thread and nobody has come up with a graph that includes tariffs?
Or am i just bad at search?
Isnt the day and night difference in tariffs common in most countries?
for example in EE the tariff price changes to night at 22:00, so doing whatever automation to track cheapest hours, might be thrown off a lot, if market price between 21-22 and 22-23 is reversing the tariffs gain.
One should calculate the, lets say, “cheapest hours” by a table that includes tariffs.
Can we get @arva, @kalapragu, @wjaceh or any other smart guy to show how this nordpool array can be shot through the tariffs template to come up with “final price” graph?
example to the graph or just “current price”?
We have many examples how to take current price and add current tariff to that.
But I see none that go through the whole graph and adjust this to tariffs.
Current is easy. But that does not visualize the day with changing tariffs.
didnt you really read the problem before answering or am i really bad at search?
You say there are examples of nordpool graph that includes in it’s prices not just market price but also changing tariffs prices, on the graph columns throughout the day?
Could you link one please?
As i havent’t tested it, i cannot tell if it then shows the current value + additional cost (eg. "final price) on the graph, but I’m quite sure it does. Test it out and let us know.
I do have Võrk4 tariff, and you should check yours, since in your example they are old, life got more expensive while you were not looking!
But now i get it, tariff sensor can be added into the additional costs… thank you sir.
But nordpool graph with tariff added this way seems to only look at the tariff entity’s current value and slaps that onto everything. It seems like we cant get away that easy… because the tariff value should change when daytime begins etc, so it cant be just looking at the entitys current value…