Total Energy and Daily Ennergy jumps by KWs when power comes on

Hi,
I have a very strange thing about my daily energy and total energy. It jumps by 21kw when power comes on, after that it seems to increase gradually.
Here is my integration for this entity, it is configured in configuration.yaml

This takes w to Kwh

sensor integration:
  - platform: integration
    source: sensor.kaz_geyser_power
    name: Kaz Geyser Energy
    unit_prefix: k
    round: 2

Then I have a a utility meter for daily totals

utility_meter:
  daily_energy_kaz_geyser:
    source: sensor.kaz_geyser_energy
    unique_id: sensor.kaz_geyser_daily_energy
    cycle: daily

Below it can be observed that when to watts goes to almost 2000W the Total Energy jumps immediately by about 21kwh and from thereon it seems to do the calculation correctly by steadily increasing the energy.
I am not sure why this happens and hope there is some logical explaining for that and a easy fix.

image

Are you confusing power and energy?

Use the “left” mode on the integration.

By default it uses a trapezoid. What this means is it draws a line from the first zero to 2000 watts and integrates the area under the line. So if is turned off at 0:00 and on at 10:00, the first hour will have 50 watts, 2nd 100 watts, 3rd 150 watts, etc.

So for on off loads only use left mode. If you have a whole house power meter that is constantly varying then trapezoid usually gives a better result.

I do understand the difference, not sure why you think I am confused?
Seems like I might have found the problem, looking at Grafana I can see most likely the cause. It seems like the last data point is at 1200w so it keeps on accumulating the kwh but do not show it until the next, but still how to fix this?
But looking at the state in developers actions I can see it shows 0

image

Thanks will try and confirm