This is one of my energy sensors (iotawatt on phase 1):
It resets at midnight.
In the energy dashboard it is set to use another sensor (electricity price, that changes hour for hour) to calculate the cost. It then creates a new sensor with the cost by simply multiplying the two. So far so good, all as expected.
But if I restart HA, then the cost for the day is reset. This is the associated (automatically created by Home Assistant) cost sensor:
At around 13:00/1pm I restarted HA, and you can see the cost for the day going to zero. However, as you can see from the energy graph, the energy use is not reset. Only the calculated price is.
I assumed that HA just multiplies the two to values get the cost, and that the cost sensor (second graph in first post) is just the result of setting this up in the Energy Dashboard UI (HA creating it). It appeared and was named the same as the energy sensor, just suffixed with _cost, and I’m pretty sure iotawatt doesn’t have anything with “cost” natively.
Yes it does multiply the current price by the kWh used, but it does not create a sensor. Not sure where you are getting that from.
In fact the difficulty of getting the the results from the Energy dashboard are the subject of a few WTH posts. People want these results as entities. But they don’t exist now. So you must be creating it some other way.
not sure if this is related, I am using the daily energy sensor that is generated from my tasmota devices, the sensor resets @ 7am every day instead of midnight - see screenshot?
I have checked the HA system time and its set correctly, any ideas would be appreciated.