All, sorry to jump in here in this ongoing conversation.
After spending several days to build cool dashboards on InfluxDB and Grafana and fighting to understand why they look sometimes very good and sometimes weird, I did some troubleshooting on the data and saw the issue was coming from the problem described here (reset of the energy costs after HA restart). Unfortunately I do not see regular reset once a day as mentioned above. Is there a way to configure the regular reset at 00:00 as example?
For the second issue (reset when HA restarts) I will try to apply the sensor workaround as described as well here. as I am a beginner in HA hope to make it working before a new release of HA solve this reset issue .
Thanks
I saw the same issue. They reset on restart but not daily or anything else so they are kind of pointless actually.
What I did now is create utility meter sensors for daily/monthly/yearly cycles for the desired generated sensors.
So for example I have sensor.e3dc_grid_import_energy
and sensor.e3dc_grid_import_energy_cost
and I just created utility_meter sensors for them like:
# Grid Import Energy
e3dc_grid_import_daily_energy:
source: sensor.e3dc_grid_import_energy
unique_id: e3dc_grid_import_daily_energy
name: E3DC Grid Import Daily Energy
cycle: daily
e3dc_grid_import_monthly_energy:
source: sensor.e3dc_grid_import_energy
unique_id: e3dc_grid_import_monthly_energy
name: E3DC Grid Import Monthly Energy
cycle: monthly
e3dc_grid_import_yearly_energy:
source: sensor.e3dc_grid_import_energy
unique_id: e3dc_grid_import_yearly_energy
name: E3DC Grid Import Yearly Energy
cycle: yearly
# Grid Import Energy Cost
e3dc_grid_import_daily_energy_cost:
source: sensor.e3dc_grid_import_energy_cost
unique_id: e3dc_grid_import_daily_energy_cost
name: E3DC Grid Import Daily Energy Cost
cycle: daily
e3dc_grid_import_monthly_energy_cost:
source: sensor.e3dc_grid_import_energy_cost
unique_id: e3dc_grid_import_monthly_energy_cost
name: E3DC Grid Import Monthly Energy Cost
cycle: monthly
e3dc_grid_import_yearly_energy_cost:
source: sensor.e3dc_grid_import_energy_cost
unique_id: e3dc_grid_import_yearly_energy_cost
name: E3DC Grid Import Yearly Energy Cost
cycle: yearly
I actually did this for almost all sensors related to energy, cost or compensation.
This makes it much easier to export to prometheus (VictoriaMetrics) and use them in Grafana for Daily/Monthly/Yearly graphs.
I just did this today, hope it works as I want them to.
Good day, I was wondering dit this work for you? I am experiencing the same problem.
Well another year on and the problem still exists in the entity created by the Energy Dashboard.
Can we register this as a bug in the energy dashboard so it can be fixed in the next releases?
A few workarounds work but the energy cost meter should not reset on a restart of HASSā¦ only at midnight.
This open issue should cover this problem, letĀ“s hope it is solved soon: energy dashboard showing incorrect costs for power consumed Ā· Issue #17536 Ā· home-assistant/frontend Ā· GitHub
Cost sensor resets to zero on system restartā¦
Is there an open issue in core? Nothing is going to happen by commenting on an issue in frontend that has been closed for 6 months.