Home assistant device classes, what are they for

I have some difficulties to understand what the device classes are for. I am creating a new platform for home assistant and one function is supposed to return the device class.

The sensor init has a few definitions, but they seem just words. I can’t seem to find proper definitions anywhere. The homekit integration seems to use and define them, but it seems just own judgement.

I have the feeling that or I’m missing something, or due to the lack of definitions, this feature isn’t as useful as it should be.

The concept itself could be really powerful if they are also linked to for instance units and symbols. However, currently this doesn’t seem the case.

Could anyone elaborate on their use and structure?

Does this help?

I actually already have the new platform implemented. Indeed the documentation is quite good on that. There are also many other platforms that I’ve borrowed from. All of them are on the Github repository and it is easy to inspect that code.

My question is actually more specific. How to use the device class function that I should/could implement as part of my platform. Google searches on ‘home assistant device class’ unfortunately don’t yield the answers that I’m looking for.