Riemann sum W sensor; device class energy or total_increasing?

I have this Riemann sum sensor working fine:

- platform: integration
  source: sensor.stora_huset_total_power
  name: sh_total_energy
  unit_prefix: k
  round: 2
  method: left

Now I would like to customise the sensor in customize.yaml, but what is the correct device class, total_increasing or energy? Been reading the docs but could’t find a straight answer.

Thanks!

sensor.stora_huset_energy:
  device_class: energy
  friendly_name: Stora Huset & Garage 2
  icon: mdi:counter

You need both: state_class (total_increasing) and device_class (energy) are two separate characteristics…

Here is the doc:

1 Like