History_stats started at non-zero today

In case anyone else has a similar problem and finds this thread, as I recently did, a quick note about my issue.

I experienced the exact same issue where my history stats sensors reset to 0 at midnight but then jumped to a non-zero number and started to increment from that value. The issue for me was that the entities the history stats sensors were keyed off of had been excluded from my recorder. Ensuring that those entities were part of the recorder solved the issue. My guess is that without state history for those entities, as soon as the state changed and the respective history stats sensors activated, those sensors assumed that the entities had been active since the last reset.

It took me a little trial and error to sort this out, so hopefully if anyone else runs across the issue, this will save them some time.