Power consumption reset on power cycle

Hi

I have a couple of Shelly Plug S, where I need to subtract the total_increasing power consumption from the reading from my electricity meter.
But unfortunately the total_increasing (kWh) from the plug is reset on power cycle of the plug.

How can I create a persistent sensor, that will work as an increasing sensor, even if the Shelly plug is power cycled ?
Searching the web shows results with Riemann Left - but I have no clue about how to configure the rest of the settings on such a helper/device…

The scenario: I have a sensor for power consumption on my electricity meter.
In order to track costs for the individual devices, I will have to add them to the energy dashboard as well.
But in order to avoid “double consumption”, I need to subtract the consumption from the smartplugs from the meter reading…

Eg.: Before power cycle, the electricity meter reads 120.000 kWh
Shelly Plug 1 reports 13 kWh
Shelly Plug 2 reports 12 kWh

The “reading” to be used by the energy dashboard should then be 120.000 - 13 -12 = 119.975 kWh

If power if cycled on the Shelly plugs, the consumption will suddenly be:

Shelly Plug 1: 0 kWh
Shelly Plug 2 0 kWh

Reading for the energy dashboard = 120.000 - 0 -0 = 120.000 kWh

Resulting in a sudden jump of 25 kWh - which is underiseable if you want to track the economics via the dashboard…

Can anyone enlighten me?

Regards
Brian

I have the same issue… anyone an idea???