Energy monitor not showing battery consumption

Hello there,
I would like to ask more experienced users to help with settings of my Energy Dashboard.

There is schematic of my photovoltaic system.

fve_spotreba - energy from grid
fve_vyroba - everything what comes from inverter (fve_spotrea + total_pv + total_battery_charged + total_battery_discharged)
total_pv - energy from PV
total_battery_charged - energy charged to the battery
total_battery_discharged - energy discharged from the battery

Wha is my issue? I don’t see any battery discharging since midnight which definitely should be there.

I cant find any information how HA handle values. I tried to set energy as I though it is selfeplaining. But it is not obviously.

Is there any equation how HA calculates the battery, pv and grid energies?
Thanks in advance.

(sorry for splitting messages, as a new member I was not allowed to post more than one pic)