Sense Energy Monitor Statistic Values Reset Timing

Hello community,

I have noticed something weird in the sense module. I started charting my Sense sensors and it looks like there can be a difference in time when the usage vs. production sensors get reset for the time period. For example, looking at the daily sensors (sensor.daily_production and sensor.daily_usage) this morning I can see this:
image
I also calculate the net from these two (in red). When I just look at the red, there’s a spike at just after midnight:
image
This appears to be caused by the sense sensors not resetting at the same time, in this case, the usage sensor is reset one minute before the production sensor (usage at 12:02 and production at 12:03) which causes a one minute net of the entire day’s production. I’ve noticed it goes all three ways:

  • Net is zero: both sensors get reset simultaneously
  • Net goes way positive: usage gets reset just before production
  • Net goes way negative: production gets reset just before uage

I’ve also noticed that a similar thing happens on home assistant restart. On start, the Sense sensors will be in “unknown” state for a while, then when one value populates, the rest of the sensor values will reset to zero which is inaccurate most of the time. In my opinion, they should remain “unknown” until populated by data from the Sense module.

Anyone else notice this?