Need a helper to collect kWh of a wallbox per user from a sensor which resets every session

Hi, I’m new here. I might be in the wrong category. Sorry for that

I’m trying to use home assistant for my wallbox. Ideally I’d end up with something exportable and a bar chart with kWh for each user.

The ocpp integration provides a sensor.charger_energy_session with the attribute ‘ID tag’ to distinquish between different users.

I created multiple helpers with this template

{% if states("sensor.charger_id_tag") == "04B3B762DD6482" %}
  {{ states('sensor.charger_energy_session')|float }}
{% else %}
{% endif %}

with the state class ‘total_increasing’

My reasoning behind it was, if it’s not the right tag, go to 0 and if it’s the right tag, it’s a session value which starts at 0 and counts up.
I hoped total_increasing would just keep adding whatever amount is charged and I can use the energy features of hass to figure out who used how much energy.

Now I have way to high values and I’m second guessing if I’m even on the right path here.

What did I do wrong and how can I reach my goal?

Thank you