Add and use more unit constants (#32122)
* Add and use speed constants * Add and use meter based volume and area constants * Add and use more mass unit constants * Add and use concentration unit constants * Add and use watts per square meter constant * Use more time constants * Use more data constants
This commit is contained in:
1 parent
c98f50115d
commit
496bd3dddf
44 files changed
+422
-177
No files matched your search
@@ -13,7 +13,7 @@ from withings_api.common import (
|
||||
)
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import TIME_SECONDS
|
||||
from homeassistant.const import MASS_KILOGRAMS, SPEED_METERS_PER_SECOND, TIME_SECONDS
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -87,35 +87,35 @@ WITHINGS_ATTRIBUTES = [
|
||||
const.MEAS_WEIGHT_KG,
|
||||
MeasureType.WEIGHT,
|
||||
"Weight",
|
||||
const.UOM_MASS_KG,
|
||||
MASS_KILOGRAMS,
|
||||
"mdi:weight-kilogram",
|
||||
),
|
||||
WithingsMeasureAttribute(
|
||||
const.MEAS_FAT_MASS_KG,
|
||||
MeasureType.FAT_MASS_WEIGHT,
|
||||
"Fat Mass",
|
||||
const.UOM_MASS_KG,
|
||||
MASS_KILOGRAMS,
|
||||
"mdi:weight-kilogram",
|
||||
),
|
||||
WithingsMeasureAttribute(
|
||||
const.MEAS_FAT_FREE_MASS_KG,
|
||||
MeasureType.FAT_FREE_MASS,
|
||||
"Fat Free Mass",
|
||||
const.UOM_MASS_KG,
|
||||
MASS_KILOGRAMS,
|
||||
"mdi:weight-kilogram",
|
||||
),
|
||||
WithingsMeasureAttribute(
|
||||
const.MEAS_MUSCLE_MASS_KG,
|
||||
MeasureType.MUSCLE_MASS,
|
||||
"Muscle Mass",
|
||||
const.UOM_MASS_KG,
|
||||
MASS_KILOGRAMS,
|
||||
"mdi:weight-kilogram",
|
||||
),
|
||||
WithingsMeasureAttribute(
|
||||
const.MEAS_BONE_MASS_KG,
|
||||
MeasureType.BONE_MASS,
|
||||
"Bone Mass",
|
||||
const.UOM_MASS_KG,
|
||||
MASS_KILOGRAMS,
|
||||
"mdi:weight-kilogram",
|
||||
),
|
||||
WithingsMeasureAttribute(
|
||||
@@ -188,7 +188,7 @@ WITHINGS_ATTRIBUTES = [
|
||||
const.MEAS_PWV,
|
||||
MeasureType.PULSE_WAVE_VELOCITY,
|
||||
"Pulse Wave Velocity",
|
||||
const.UOM_METERS_PER_SECOND,
|
||||
SPEED_METERS_PER_SECOND,
|
||||
None,
|
||||
),
|
||||
WithingsSleepStateAttribute(
|
||||
|
||||
Reference in new issue
Block a user