Active Energy vs Returned Energy on Grid sensor and Solar panels sensor

Hi there,

I am struggling defining the correct sensors to be used for the energy dashboard (house, GRID, solar panels).
My configuration is pretty simple, with the following sensors I have from a Shelly PRO 3EM :

GRID

SOLAR PANELS

From the measuring device directly :

My first question is … I see power and energy sensors.
Power is instantaneous consumption in W … where energy is the “sum up” of this power over an hour, in kW … The Energy dashboard is showing this schema showing kWh (so energy), but it shows a kind of live value … (we see the dots moving on the lines from 1 location to another … HOW CAN THAT BE as I assume the Energy in kWh is only calculated every hour when the sum up is done, and not presented as an instantaneous value right ??

image

My second question is … related to the “energy” sensors I have … I have for the GRID and for the solar panels a “total active energy” and a “total active returned energy” … so 4 counters in total … which ones do I need to use ???

Many Thanks if you can help me !!