Grid Export Energy Compensation resets to zero on reboot

Hi

Why does the sensor.grid_energy_export_compensation reset after each reboot? (And how do i prevent that?)

Energy costs sensor resets after restart - #13 by diamant-x shows the same problem with grid_energy_import_cost

Interestingly the Energy dashboard continues to show the correct values for compensation + cost, even though the sensors reset to zero.
My Grid Export and Import energy sensors are calculated from the relevant Power sensors via a Riemann Sum helper, which is correctly increasing over time (it never resets to zero)

I’d like to make a graph that shows our net energy costs (grid_energy_import_cost - grid_energy_export_compensation) for each day to encourage people to use less power :slight_smile:. But a reboot will cause my source sensors to reset to zero, messing up the graph…

I have just found this as well! Did you ever find a way to solve this ?

no. just living with it…

I have solved this in a bit of a stupid way, I use the utility meter with the compensation sensor as an input and select “this sensor may reset to 0” I now have a new sensor that is a utility meter set for the day that never resets and handles the dropping back to 0. its not elegant but it works :slight_smile: