More information in error message and entity configuration needed

It would be very helpful if this error message could state what the expected and actual device classes are.

Secondly, when examining the entity, it would be helpful for it to display (and allow correcting) the device class:

Finally, the “Integral sensor options” don’t show arguably the most important attribute - what the source sensor is. (edited) - ignore this - just user error.

It’s the energy dashboard, so device_class: energy is required.


https://www.home-assistant.io/docs/energy/faq/#resolution

The actual device_class they have you can easily look up in Developer Tools → States.

That appears to be an integral helper. The device class is generated from the integral of the source sensor device class. You can’t change this, it is a mathematical operation. e.g. power → energy, acceleration → speed, etc… You cant even change this if using YAML: https://www.home-assistant.io/integrations/integration/#configuration-variables

The source sensor is right at the top. First option:

ah, so it is. Thanks - I don’t know now I didn’t see that :slight_smile:

So why is it saying it has an unexpected device class? That’s where saying what it expected and what it found would help troubleshoot the problem.

Could be a couple of things.

Incorrect device class for the source sensor or maybe an issue that needs fixing in Developer Tools → Statistics.