Closed nareddyt closed 3 years ago
It's easier to accept changes to the entity model if we can see an overview of the current integrations and also possible devices/brands in the wild and how many would benefit from the added device classes. Can you make a table or summary of this?
Good point. Here is a summary of what I've found:
mass
(reference). Other sensors can be connected to measure force and/or pressure (example). I plan to implement https://github.com/esphome/feature-requests/issues/553 so device classes can be set for non-binary sensors directly in the ESP config. Both device classes will be useful here.body/weight
. It is exposed as a sensor in HA. The mass
device class will help here.bodyWeightMeasurement
sensor.fat_mass_lbs
, bone_mass_lbs
, muscle_mass_lbs
. Notice they all say mass
in the name.Tasmota supports load cells.
Bluetooth scale data gathered with https://github.com/lolouk44/xiaomi_mi_scale
Context
Smart bathroom scales, load cells, etc. read dimensions that HA can handle only as generic. I would like to introduce a device class for weight-based sensors.
Proposal
Add 2 new device classes for weight-related items:
force
andmass
The original goal was to add a device class for weight. However, I found that the term
weight
is often misused. Weight is aforce
, but most people are really referring tomass
when they measure their weight.After further reading, the SI units clearly define the distinction:
mass
(kg, lbs for imperial conversion): This is what people commonly refer to as weight. Can be used for measurements by smart bathroom scales, bed occupancy sensors, etc.force
(N): Can be used by any sensors that are not manufactured to take into account gravity. Anything that senses force horizontally.So I added support for both. Users can choose between the two to refer to the correct scientific term when they want to measure
weight
.PRs:
Consequences
Sensors can use more specific device class for "weight" measurement.