magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
500 stars 67 forks source link

HA Energy dashboard showing incorrect daily usage only for today #314

Open Jerryxe opened 1 month ago

Jerryxe commented 1 month ago

I have the Emporia Vue 3 added to HA, and I picked "XXX This Month" device as source of energy usage for the HA Energy dashboard. It has been running well, and everyday I use ~100 kwh. (see chart 2)

But today (10/1), it suddenly shows I used 1300 kwh in the Energy dash, see chart 1 (which seems like the total kwh I used since my integration). I checked the history of the device, it looks fine, see chart 3, and the daily chart shows I only used ~100kwh on 10/1 (see chart 4).

1 2 3 4
magico13 commented 1 month ago

I normally recommend the "Energy Today" sensors for the dashboard because they update more frequently, so your hourly usage will be more correct, but the "This Month" sensor should be fine to use as well.

In the Emporia app please double check the time zone and the billing cycle reset day. I am assuming that the cycle day is set to the 1st, so a new cycle just started, but if the time zone is not the same between Home Assistant and the Emporia app then the resets won't line up and you'll get this sort of behavior.

If those line up then I would guess the API returned old data during an update, that can happen for up to an hour after midnight for some reason. You may be able to correct the statistics within Home Assistant to remove the usage jump but as of right now there's not a fix in place for the API returning bad/old data.

Jerryxe commented 1 month ago

I checked, Emporia has the same time zone as HA, and the Emporia bill cycle starts at 9th of the month.

But when I change to use Energy Today, the issue on 10/1 disappeared! I will continue to monitor it to see if the issue come back again.

Thanks for the detailed explanation!