Energy dashboard, missing data, documentation issue

Hi there, I’m trying to setup energy dashboard based on current energy consumption by my gas stove. It allows to read current kWh consumption using mqtt. I followed this documentation:

and used measurement entity type (because of current consumption, not a sum):

mqtt:
  sensor:
    - name: "piec_kociol_moc_chwilowa"
      state_topic: "heating/boiler/power-inst"
      state_class: measurement
      unit_of_measurement: kWh
      value_template: "{{ value | round(2) }}"
      #device_class: energy

homeassistant:
  customize_glob:
    sensor.piec_kociol_moc_chwilowa:
      last_reset: '1970-01-01T00:00:00+00:00'
      native_value: decimal.Decimal

device_class property is commented, because of the documentation:

and the device_class must not be either of energy, gas, or monetary

With this configuration I’m getting error in energy dashboard configuration related to missing class of entity. And there’s no data in chart. I also tried to add device_class, then there’s no error, but also no data.

Do I need to configure something more? Should I use device_class or not?

For an energy sensor to be used in the energy dashboard it must have the attributes:

state_class: total_increasing # or total
device_class: energy
unit_of_measuremen: kWh # or Wh

You don’t need the customizations.

However that topic (/power-inst) looks suspiciously like a power sensor, not an energy sensor.

You’re right, I was focused on stove’s documentation which was badly translated. This sensor shows power, not an energy. When switched to power and added integration function - it started to work. Thanks for the tip.