What is the correct device class for a dewpoint value?

I am creating an MQTT client to send some dewpoints to home assistant. I am using automatic MQTT discovery. In my message to the discovery topic homeassistant/#, I use "dev_cla": "dewpoint". But then I get the following error in the log view of home assistant:

Error 'expected SensorDeviceClass or one of 'date', 'enum', 'timestamp', 'absolute_humidity', 'apparent_power', 'aqi', 'area', 'atmospheric_pressure', 'battery', 'blood_glucose_concentration', 'carbon_monoxide', 'carbon_dioxide', 'conductivity', 'current', 'data_rate', 'data_size', 'distance', 'duration', 'energy', 'energy_distance', 'energy_storage', 'frequency', 'gas', 'humidity', 'illuminance', 'irradiance', 'moisture', 'monetary', 'nitrogen_dioxide', 'nitrogen_monoxide', 'nitrous_oxide', 'ozone', 'ph', 'pm1', 'pm10', 'pm25', 'pm4', 'power_factor', 'power', 'precipitation', 'precipitation_intensity', 'pressure', 'reactive_energy', 'reactive_power', 'signal_strength', 'sound_pressure', 'speed', 'sulphur_dioxide', 'temperature', 'volatile_organic_compounds', 'volatile_organic_compounds_parts', 'voltage', 'volume', 'volume_storage', 'volume_flow_rate', 'water', 'weight', 'wind_direction', 'wind_speed'
for dictionary value @ data['device_class']' when processing MQTT discovery message topic: 'homeassistant/sensor/C6CFC7267C2B-dewpoint/config',
message: [...]

I could of course just use “temperature” as the device class, as the dew point is a temperature. Is this what am I supposed to do? Or is home assistant just missing support for dew points?

Here

you can find all supported device classes

I see thanks. There is no mention of dewpoint there. Then I’ll make GitHub issue.

I’m not readily seeing any benefit or reason to not just use temperature.

A dew point is a measure of absolute humidity, for which there is the device class absolute_humidity. (A percentage is a measure of relative humidity, by contrast).

1 Like

You’re mixing things up; dew point is a temperature.

I don’t think I am. Whether it’s a temperature or something else, that’s for the unit_of_measurement, isn’t it?

A dew point is a measure of absolute humidity because it expresses water content without dependence on ambient temperature. It’s expressed as a temperature, but absolute humidity can be expressed in other ways too.

https://www.weather.gov/lmk/humidity

A dew point is indeed an absolute measure of fo humidity. I didn’t realise. Then absolute_humidity is the right class. Would be good to mention dewpoint in the docs of absolute_humidity as well, such that it is clear that this should encompass dewpoint as well. Right now it looks like it’s only for measurement of water content per volume of air, and not for any more advanced interpretation such as a dew point.

Dew point and Absolute Humidity are indeed both similar in that you don’t need any additional information to fully know the water content of the air (such as with relative humidity). But they are discreetly different values with different meanings, definitions and units. Dew Point is a temperature and absolute humidity is a measurement of weight of water per unit volume of air.

Additionally, the absolute humidity device class explicitly doesn’t include temperature as an acceptable unit:

absolute_humidity: Absolute humidity in g/mÂł, mg/mÂł.

Temperature is indeed the correct device class for dew point.

Edit: I’ll add that while it could be possible for a Dew Point device class to be added, I don’t see where it would add any value. It would be analogous to having different device classes for indoor and outdoor temperature: they’re all still just temperature values that have specific contextual meanings. In the case of Dew Point, it just happens to be the temperature that corresponds to the relative humidity being 100%.