mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Add suggested display precision to Withings (#102023)
This commit is contained in:
parent
1f1a27d6a5
commit
f9615999db
@ -62,6 +62,7 @@ MEASUREMENT_SENSORS = [
|
||||
key="weight_kg",
|
||||
measurement_type=MeasurementType.WEIGHT,
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
suggested_display_precision=2,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -70,6 +71,7 @@ MEASUREMENT_SENSORS = [
|
||||
measurement_type=MeasurementType.FAT_MASS_WEIGHT,
|
||||
translation_key="fat_mass",
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
suggested_display_precision=2,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -78,6 +80,7 @@ MEASUREMENT_SENSORS = [
|
||||
measurement_type=MeasurementType.FAT_FREE_MASS,
|
||||
translation_key="fat_free_mass",
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
suggested_display_precision=2,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -86,6 +89,7 @@ MEASUREMENT_SENSORS = [
|
||||
measurement_type=MeasurementType.MUSCLE_MASS,
|
||||
translation_key="muscle_mass",
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
suggested_display_precision=2,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -93,7 +97,9 @@ MEASUREMENT_SENSORS = [
|
||||
key="bone_mass_kg",
|
||||
measurement_type=MeasurementType.BONE_MASS,
|
||||
translation_key="bone_mass",
|
||||
icon="mdi:bone",
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
suggested_display_precision=2,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -102,6 +108,7 @@ MEASUREMENT_SENSORS = [
|
||||
measurement_type=MeasurementType.HEIGHT,
|
||||
translation_key="height",
|
||||
native_unit_of_measurement=UnitOfLength.METERS,
|
||||
suggested_display_precision=1,
|
||||
device_class=SensorDeviceClass.DISTANCE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_registry_enabled_default=False,
|
||||
@ -134,6 +141,7 @@ MEASUREMENT_SENSORS = [
|
||||
measurement_type=MeasurementType.FAT_RATIO,
|
||||
translation_key="fat_ratio",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
suggested_display_precision=2,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
WithingsMeasurementSensorEntityDescription(
|
||||
|
@ -561,6 +561,7 @@
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'weight',
|
||||
'friendly_name': 'henk Bone mass',
|
||||
'icon': 'mdi:bone',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfMass.KILOGRAMS: 'kg'>,
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user