More sensor device classes (meter, Hz, SPL)

Today there is a quite uncomplete list of device classes available for sensors. There is a PR for adding force and mass that is closed - I would like to get distance (in meters) and I guess there are some other - frequency (Hz) and maybe sound pressure level (SPL), PM2.5/10? What is the plan for this? Is there a plan for adding more sensor classes? I would not want to spend time doing a PR if there is no interest.

Some more suggestions ā€¦

Sensors:

  • Flow - m3/h, USGPM etc.
  • Level - %, m, mm, ft etc.
  • Speed - m/s, MPH etc.

Binary Sensors:

  • CO - CO detected/no CO detected
  • Low Flow - low flow detected/no low flow detected
  • High Flow - high flow detected/no high flow detected
  • Low Level - low level detected/no low level detected
  • High Level - high level detected/no high level detected
  • Low Pressure - low pressure detected/no low pressure detected
  • High Pressure - high pressure detected/no high pressure detected
1 Like

Direction or Bearing also (non-binary of course!)

Came here looking for just this. Another vote for particulate matter.

1 Like

Here are some more:

  • pulses
  • monetary
  • rain_amount
  • wind_speed
  • speed
  • time_delta / time_period
  • ppm
  • power_density
  • angle / rotation_angle
  • color_temperature
  • brightness
  • length
  • area
  • acceleration
  • capacitance
  • density
  • force
  • frequency
  • impedance
  • mass
  • resistance
  • volume / sound_intensity
  • temperature_difference (K)
  • volume (mĀ³ / l)
  • work (J)

There is currently a discussion and PR about adding binary_sensor device classes:

And discussions about some of the mentioned:

1 Like

Ok, so there are at least some interest - I will look into reviving the PR that intended to add a few and add some more to that one then (and hope it gets in this time)!

Best regards,
/Joakim

The description of the last_reset properties of a sensor which is needed for longterm statistics talks about gas and water meter Sensor Entity | Home Assistant Developer Docs. However the device_class , which is also required for longterm statistics, for volume is not available.

In my opinion a volume device class is very common and should be suported, especially in the light of the new energy management development

There will be a gas device_class.

1 Like

Now I did a PR for some of the sensor classes: Additional sensors update by joakimeriksson Ā· Pull Request #54605 Ā· home-assistant/core Ā· GitHub

Not sure that all features are there yet.

1 Like

Iā€™ll add my suggestion here:

Add ā€œlevelā€ device class for binary sensor.

For binary_sensors ā€œlevelā€ would be ā€œrisingā€ if ā€œonā€, ā€œloweringā€ if ā€œoffā€

For sensors ā€œlevelā€ would be in ā€œinā€ or ā€œcmā€.

My use case is I track the temperature trend of my fish tank with a trend binary sensor. If I use a device_class of ā€œheatā€ or ā€œcoldā€ it shows as ā€œHotā€ or ā€œColdā€.

It would be nice to see ā€œRisingā€ or ā€œFallingā€.

Iā€™ll chime in as well with a request for weight (assuming itā€™s not covered by ā€œmassā€ above)

2 Likes

Hello,
To follow wave tide, a device_class with meter will be usefull.
Can we add a generic class ?

Sorry Iā€™ve created the topic https://community.home-assistant.io/t/long-term-statistic-for-not-listed-device-class-e-g-distance-with-meter-measurement/330533

Bandwidth (Mbps) hasnā€™t been mentioned jet.

There is not enough device class for the Geiger counter (ĀµSv/h).

3 Likes

Iā€™m confused. Itā€™s 2022 and we still donā€™t have device classes for mass, force etc.? The set of documented device classes is woeful: Sensor Entity | Home Assistant Developer Docs

Is there a way users can extend the set of device classes themselves?

3 Likes

I would also like to see some more device classes, it shouldnā€™t be too hard to add them. Especially one for distance (m).

I need one for pH as well.

2 Likes