Energy save consumption_cost

Hi, i added consumption and solar generation to my home assistant.

Works great. The system added than sensor.smartmeter_consumption_cost what is great, but after every restart its resetting and starts from 0.0 as i can see in developer tools.

Is there a way to save the consumption cost, so after restart it starts where it was before?

But what i see is in the graph there is data, but the number starts at 0 after restart? The history is there?
costs

so how can i remove reset? :confused:

Or how did i get that 0,84€ from the energy dashboard to my own dashboard?
There it is correct with overall cost since its implemented.

How did i get that 0,84€? I mean that number is saved somewhere? But how read and get it?

Did you found the solution for this?
I’m looking for this too… How can we use the cost value given by energy dashboard

Same problem here. Every reboot causes the cost sensor to be reset to zero:

I’m having the same problems, first I thought that the availability template of my sensors was wrong but I’ve verified that it is not the case.

The first thing that comes up to me is that at boot the state machine is not updated with the last value from the recorder but rather set 0. I’ll see if I can find this in the code.