mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Add more measurement sensors to Withings (#102074)
This commit is contained in:
parent
b95060df99
commit
471d1abe47
@ -193,6 +193,38 @@ MEASUREMENT_SENSORS: dict[
|
||||
device_class=SensorDeviceClass.SPEED,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
MeasurementType.VO2: WithingsMeasurementSensorEntityDescription(
|
||||
key="vo2_max",
|
||||
measurement_type=MeasurementType.VO2,
|
||||
translation_key="vo2_max",
|
||||
native_unit_of_measurement="ml/min/kg",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
MeasurementType.EXTRACELLULAR_WATER: WithingsMeasurementSensorEntityDescription(
|
||||
key="extracellular_water",
|
||||
measurement_type=MeasurementType.EXTRACELLULAR_WATER,
|
||||
translation_key="extracellular_water",
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
MeasurementType.INTRACELLULAR_WATER: WithingsMeasurementSensorEntityDescription(
|
||||
key="intracellular_water",
|
||||
measurement_type=MeasurementType.INTRACELLULAR_WATER,
|
||||
translation_key="intracellular_water",
|
||||
native_unit_of_measurement=UnitOfMass.KILOGRAMS,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
MeasurementType.VASCULAR_AGE: WithingsMeasurementSensorEntityDescription(
|
||||
key="vascular_age",
|
||||
measurement_type=MeasurementType.VASCULAR_AGE,
|
||||
translation_key="vascular_age",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,6 +72,18 @@
|
||||
"pulse_wave_velocity": {
|
||||
"name": "Pulse wave velocity"
|
||||
},
|
||||
"vo2_max": {
|
||||
"name": "VO2 max"
|
||||
},
|
||||
"extracellular_water": {
|
||||
"name": "Extracellular water"
|
||||
},
|
||||
"intracellular_water": {
|
||||
"name": "Intracellular water"
|
||||
},
|
||||
"vascular_age": {
|
||||
"name": "Vascular age"
|
||||
},
|
||||
"breathing_disturbances_intensity": {
|
||||
"name": "Breathing disturbances intensity"
|
||||
},
|
||||
|
@ -93,6 +93,26 @@
|
||||
"type": 91,
|
||||
"unit": 0,
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
"type": 123,
|
||||
"unit": 0,
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
"type": 155,
|
||||
"unit": 0,
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
"type": 168,
|
||||
"unit": 0,
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
"type": 169,
|
||||
"unit": 0,
|
||||
"value": 100
|
||||
}
|
||||
],
|
||||
"modelid": 45,
|
||||
|
@ -20,6 +20,10 @@
|
||||
54,
|
||||
77,
|
||||
91,
|
||||
123,
|
||||
155,
|
||||
168,
|
||||
169,
|
||||
]),
|
||||
'received_sleep_data': True,
|
||||
'webhooks_connected': True,
|
||||
@ -46,6 +50,10 @@
|
||||
54,
|
||||
77,
|
||||
91,
|
||||
123,
|
||||
155,
|
||||
168,
|
||||
169,
|
||||
]),
|
||||
'received_sleep_data': True,
|
||||
'webhooks_connected': False,
|
||||
@ -72,6 +80,10 @@
|
||||
54,
|
||||
77,
|
||||
91,
|
||||
123,
|
||||
155,
|
||||
168,
|
||||
169,
|
||||
]),
|
||||
'received_sleep_data': True,
|
||||
'webhooks_connected': True,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,8 +36,9 @@ async def test_all_entities(
|
||||
)
|
||||
|
||||
for entity in entities:
|
||||
if entity.platform == Platform.SENSOR:
|
||||
if entity.domain == Platform.SENSOR:
|
||||
assert hass.states.get(entity.entity_id) == snapshot
|
||||
assert entities
|
||||
|
||||
|
||||
async def test_update_failed(
|
||||
|
Loading…
x
Reference in New Issue
Block a user