Generic "capability.measurement"

I’m not familiar with all the things that can be measured, but it seems there are a lot. Temperature, CO2, CO, pressure, sound, etc.

Would it be better for each one of these things to have it’s own capability, or for there to be a generic “measurement” capability to use for all of them?

One argument for having each one as it’s own is for multi-sensors. Currently, there’s no way for a given device to have multiple of the same capability. (can’t have two switches, two temp gauges, etc) So, if the measurement is made generic, then any device wouldn’t be able to measure more than one thing.

attributes:

  • unit (string) (example: “degrees”, “ppm”, “db”, etc) (this is specific to the type of measurement)
  • subUnit (string) (can be used for scales… example: “C” or “F”; “inches” or “centimeters”, etc)
  • value (float)

commands:

  • setValue(float)
  • setUnit(string)
  • setSubUnit(string)
1 Like

I looked at the zwave spec and this is what capability.sensor is supposed to do, but I don’t think it quite works that way as implemented in ST

1 Like

The second reason, and major ST limitation at this time, is the UI input filter can only be based on a single Capability (there is no “AND” operator). So if too granular used, you can no longer show the list of only Thermometers.

Ref my Guidelines topic and contributions there very welcome… (in fact, I need to add your first drawback that I quoted here!).

I tried reading it. Then I realized it was quite long and decided it should wait until I get home from work. :wink:

3 Likes