Add entity translations to Rympro (#96087)

This commit is contained in:
Joost Lekkerkerker 2023-07-07 19:24:52 +02:00 committed by GitHub
parent 849aa5d9ef
commit 17440c9608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class RymProSensor(CoordinatorEntity[RymProDataUpdateCoordinator], SensorEntity)
"""Sensor for RymPro meters."""
_attr_has_entity_name = True
_attr_name = "Total consumption"
_attr_translation_key = "total_consumption"
_attr_device_class = SensorDeviceClass.WATER
_attr_native_unit_of_measurement = UnitOfVolume.CUBIC_METERS
_attr_state_class = SensorStateClass.TOTAL_INCREASING

View File

@ -16,5 +16,12 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"entity": {
"sensor": {
"total_consumption": {
"name": "Total consumption"
}
}
}
}