Mqtt heat pump energy dashboard

Hej dear community,

I got an iobroker running and am reading data from my electricity meter.
I cannot get the data into the energy dashboard. The sensor does not show up.
mqtt:
sensor:
- name: “Wärmepumpe”
state_topic: “homeassistant/sensor/aktueller_Verbrauch_WP”
unit_of_measurement: “W”
device_class: energy
state_class: measurement
unique_id: “sensor.mqtt_WP”

As you can see here I do get the values…

But why does it not show up in the energy dashboard?

Thank you very much for your help.
Unfortunately googling did not help…

The energy dashboard uses energy values. Watt is a power value which you actually configured wrong at device_class. Put power as the device_class and make a reimann sum helper to get the energy values (Wh).