Add entity translations to Eufylife BLE (#95296)
parent
a568885ad2
commit
9734f45202
|
@ -86,7 +86,7 @@ class EufyLifeSensorEntity(SensorEntity):
|
|||
class EufyLifeRealTimeWeightSensorEntity(EufyLifeSensorEntity):
|
||||
"""Representation of an EufyLife real-time weight sensor."""
|
||||
|
||||
_attr_name = "Real-time weight"
|
||||
_attr_translation_key = "real_time_weight"
|
||||
_attr_native_unit_of_measurement = UnitOfMass.KILOGRAMS
|
||||
_attr_device_class = SensorDeviceClass.WEIGHT
|
||||
|
||||
|
@ -115,7 +115,7 @@ class EufyLifeRealTimeWeightSensorEntity(EufyLifeSensorEntity):
|
|||
class EufyLifeWeightSensorEntity(RestoreEntity, EufyLifeSensorEntity):
|
||||
"""Representation of an EufyLife weight sensor."""
|
||||
|
||||
_attr_name = "Weight"
|
||||
_attr_translation_key = "weight"
|
||||
_attr_native_unit_of_measurement = UnitOfMass.KILOGRAMS
|
||||
_attr_device_class = SensorDeviceClass.WEIGHT
|
||||
|
||||
|
@ -176,7 +176,7 @@ class EufyLifeWeightSensorEntity(RestoreEntity, EufyLifeSensorEntity):
|
|||
class EufyLifeHeartRateSensorEntity(RestoreEntity, EufyLifeSensorEntity):
|
||||
"""Representation of an EufyLife heart rate sensor."""
|
||||
|
||||
_attr_name = "Heart rate"
|
||||
_attr_translation_key = "heart_rate"
|
||||
_attr_icon = "mdi:heart-pulse"
|
||||
_attr_native_unit_of_measurement = "bpm"
|
||||
|
||||
|
|
|
@ -18,5 +18,18 @@
|
|||
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"real_time_weight": {
|
||||
"name": "Real-time weight"
|
||||
},
|
||||
"weight": {
|
||||
"name": "Weight"
|
||||
},
|
||||
"heart_rate": {
|
||||
"name": "Heart rate"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue