Sensor for built-in energy dashboard "grid total cost"?

I’ve looked around for this, but wondering if there’s a builtin sensor (that I can use elsewhere) for the “total grid cost” value shown on the built-in Energy Dashboard? Seems odd that it wouldn’t be available as a sensor.

Have you tried using the ‘‘Utility’’ helper? You can specify the costs sensor and set your own reset cycle.

Thanks! I had seen that, but from reading the docs I didn’t see much about it being able to create a running tally for daily cost in addition to usage. I’m sure someone has done this before, but it does seem odd to have to re-invent something where some sort of virtual sensor clearly already exists.

you are trying, just lite me, to “pull” the value of teh current calculated energy cost value in the energy dashboard, to be able to use this value in a different sensor and calculations ?

It has the same name as your entity for the total grid energy with “_cost” appended to the entity name.

Just search for “_cost” in devtools.

D’oh, found it - was named after my grid sensor. Thanks!

Hi All,

I’m on a variable rate tariff that changes every 30 minutes for import and export. I have all the APIs set up to retrieve all the current costs and payments and am using them in the energy dashboard. The rates at which I import and export are summed and are visible at the bottom of the table in the Grid Total

My issues is a relatively minor one, in that this figure seems accurate but doesn’t include the standing charge.

I have another sensor set up to tell me the total import cost including standing charge, but this doesn’t subtract any exports and payments. haha.

Essentially, i’d like to extract the Grid Total figure from the energy dashbaord and add the standing charge to it to display on another dashboard.

I have seen that this is possible in SQL (my skills in this area aren’t great but I can learn) and Ive identified what I think is the correct item in the Dev Tools> Statistics section of Home Assistant, but when i click on it it states that it is no longer being provided…

Screenshot 2023-10-19 at 12.56.04

Please can someone point me in the right direction with some simple step by step, on how to identify the correct ‘statistic’ for the cost value shown at the very bottom of the Sources Table in the Energy Dashboard, and how I might go about writing SQL to have this value as a Sensor (I should be able to figure out how to add the standing charge to this from there)

Apologies if this is a very simple thing to figure out, Ive done plenty of googling and seen plenty of people have solved this but haven’t seen exactly how at this point.

Thank you in advance for any assistance.