Utility meter hourly tariffs

Hi!

In Estonia, actually all over Nordic countries, we have a hourly floating electricity price from Nordpool. We even know 24h ahead what the price is, that we can use for scheduling, but this in not a point at the moment.

I use custom integration (GitHub - custom-components/nordpool: This component allows you to pull in the energy prices into Home-Assistant.) to get the current price. I have a template sensor that adds network fees, vat, etc. to get the total cost of electricity in €/Kwh. I have a sensor (shelly plug at the monent) that measures the power of my EV chanrger outlet.

I have set up utility meter for that

utility_meter:
  ev_daily_energy:
    source: sensor.ev_charger_power
    cycle: daily
  ev_monthly_energy:
    source: sensor.ev_charger_power
    cycle: monthly

What i’m struggling with is how to calculate the daily and monthly cost of the power used. It would be easy template sensor calculation if the energy price will be constant during a day, but just to give a better pircture, this is the hourly price for today:

So my question is how to store and show the daily/monthly cost of electricity when price will be changed every hour?

Looks like there are a lot of topics here, so I hope my comment will make it more visible…

Use the energy dashboard and choose your template sensor as the price entity. Then it will automatically create a sensor that contains your costs based on price and consumption.

Thanks for a reply!

I thought I could use it as well, but to my understanding only way to add price component is to define the grid consumption as well. Unfortunately I don’t have a sensor for total meter yet.

Individual devices has been set up though:

I also don’t have a total meter, I just added all the individual devices to the grid consumption.
You’ll then get a list of each device with its associated cost and consumption. Or you can create a template sensor that sums up the consumption of all devices and use this in grid conwumption.

Thanks, that worked. However when my solar system arrives I will add the total power meter and after that separate consumption would not have cost part.

It would be nice if price component can be added to individual devices as well.

2 Likes

Hei! I am also from Estonia, looking for how to use nordpool tariffs with shelly 3em in energy @ home assistant. Have you gone further with your project?
Best regards Peeter

Look here: Any good ideas are welcome. Nordpool Energy Price per hour - #74 by arva

I have to relive this topic and ask, how to do a template sensor as the price entity on dashboard.

Hello maybe it’s unrelated, but I got manage to setup automation to fetch day/night consumption from Eesti energia api, which was intended to be used for mobile app.

Basically I have a python script that runs periodically fetching data and posting to mqtt meter readings.

This approach is not stable, as ocassionally you have JSESSIONID session cookie invalidated, so once a while I go to mobile app via http proxy fetching new session id and updating it in my script configuration. But In general I got manage to have something like this