Total_increasing sensors crossing midnight

I have an annoying problem* which is that my solar panels power off when there is insufficient sun to power the controller but the interpretation by my total_increasing sensor varies whether its crosses midnight. I capture data from the controller and during the day the controller powers off periodically and my sensor value resets to zero (even though it’s set to total_increasing).

However I have also found that at night when it turns off, and then turns on at dawn, the sensor carries over the value and thinks its had a huge solar generation activity.

This is playing havoc with my energy dashboard as it registers a huge input at dawn that didn’t really happen, skewing all my dashboard stats

You can see here that yesterday it rained hard and my solar panels shut down at about 4pm,value reset to zero then overnight it got dark and at dawn powered up with yesterdays value.

Any ideas how I address this in HA? In theory as total _increasing I expected it to be OK with the continuation of the value between sessions but actually it seems like the rollover from midnight is making the sensor think the dawn data is fresh and not followed on

Is it possible to tell it not to presume daily resets and just remain continuous?

Chris

I have found the root of the problem. Using the history-explorer-card in HACS you can export the data in CSV (worth remembering!) and I can see a 0 value at dawn before values continue to grow. Almost certain its because of the value_template I had to create to solve a different problem here Graphing total_increasing variables without zeros - #7 by zuzzy So I made this issue myself (not for a moment thinking that the controller would have a bug where the value reset to 0 during daytime but was stored overnight. It’s doing the opposite of what you would expect a ‘today’ counter to do, so the bug is in the Solis controller!)