Delayed helper entity data

Hi, I had to create an utility meter helper entity that resets daily to show correctly as a source on my energy dashboard. The problem is that when I compare the actual entity data with the utility helper entity, the helper seems to be with some sort of delay of up to 15min. Another issue is that the helper entity ends the day with slightly lower value than the actual meter entity. See the chart with the entity and the helper below:


The blue line represents the helper entity and the other one is the actual meter.

Can someone help me understand why this difference and how to correct it?

This is the helper entity: