Can't get EV kWh usage in Energy Dashboard

I’m trying to use the battery part of the energy dashboard for my EV charger. The EV-charger only has a sensor that counts kWh per charging session. Every new charging session it starts at 0.

Below the EV charger sensor, above it a template sensor I created. I also created a dummy sensor.

The issue is that the dummy sensor shows up in the energy dashboard battery dropdown, the templated kWh sensor does not.

Dummy sensor:

  - sensor:
    - name: "Battery unload dummy"
      unique_id: battery_unload_dummy
      unit_of_measurement: "kWh"
      state_class: total
      state: "{{0.0|float}}"

templated sensor for kWh total usage:

    - name: "EVSE energieverbruik"
      unit_of_measurement: "kWh"
      unique_id: evse_energieverbruik
      state_class: total
      state: "{{ states('sensor.evse_energy')|float(0) }}"
      availability: "{{ states('sensor.evse_energy')|is_number }}"
      icon: mdi:ev-station

nope:

Some help would be greatly appreciated.

Nobody?

I tried all different variations, but none of those work.

Even configuring it exactly the same as the (working!) dummy sensor, does not help.

template:
  - sensor:
    - name: "Battery unload dummy"
      unique_id: battery_unload_dummy
      unit_of_measurement: "kWh"
      state_class: total
      state: "{{0.0|float}}"
      
  - sensor:
    - name: "EVSE energieverbruik"
      unique_id: evse_energieverbruik
      unit_of_measurement: "kWh"
      state_class: total
      state: "{{states('sensor.evse_energy')|float}}"

As nobody is responding, I am clearly asking for the impossible :wink:

After 2 day’s of trying and reading the forums, I’m giving up on adding the EV-charger to the energy dashboard.

Check this out - there is obviously someone out there using the battery section this way:
EV charging support in the Energy dashboard - Energy - Home Assistant Community (home-assistant.io)