Using daily-resetting energy counter for solar energy dashboard

Hi all!

I am almost done with the migration from Domoticz to HA and trying to finalize the last step; energy dashboard.

I would like to add my solar production figures and for this I am reading the energy statistics via an ESPHome solution. This solution gives me:

  • a total energy counter (kWh) with a precision of 1 kWh. This counter never resets and represents the amount of energy generated in its lifetime.

  • a daily energy counter (kWh) with a precision of 0.1kWh. This counter resets every day.

I would like to use the daily energy counter information for the energy dashboard since it provides a better precision.

Is HA smart enough to work with such counter or do I need to do any additional tricks to make this work?

As long as the daily sensor resets at midnight or just before, but never after midnight, (even by a few seconds) and has a state_class of total_increasing then it should work well.

Great !

I can confirm the counter has the total_increasing class:

The entity is available as long as the solar inverter is active. After sunset, the inverter shuts down and becomes unavailable till the next sunrise.

I tried to find this answer myself but the information I found was a bit limited to this regard.

Did you try usin Utility Meters with periodically_resetting enabled? I have the same issue with Emporia Vue but that they can reset anytime (when restarting) or daily but sometimes a few seconds after midnight but when using Utility Meter Helpers seems to be reliable so far.