I have a nodemcu that’s includes temperature and humidity which appear great in HA. I’ve exposed these to homekit so they can appear on the home app. The temperature sensor appears great but the humidity sensor does not appear even though they are both exposed as sensors.
The reason is the way we know which type of sensor it is.
For temperature this is pretty simple with either °C or °F.
However humidity with % not so much (just think of battery percentage or anything else). It would be strange if those where also added as humidity sensors. That’s why the device_class parameter is needed. Some sensor do set these themselves, other don’t. In any case you can override it in the customize section. That way it would even be possible to add any other sensor as humidity sensor, although that might not make that much sense after all.