mirror of
https://github.com/home-assistant/core.git
synced 2026-05-03 19:41:15 +02:00
Use entity name translations in Verisure (#90362)
This commit is contained in:
@@ -98,7 +98,7 @@ class VerisureEthernetStatus(
|
||||
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = "Ethernet status"
|
||||
_attr_translation_key = "ethernet"
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
|
||||
@@ -47,7 +47,7 @@ class VerisureThermometer(
|
||||
|
||||
_attr_device_class = SensorDeviceClass.TEMPERATURE
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = "Temperature"
|
||||
_attr_translation_key = "temperature"
|
||||
_attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
|
||||
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||
|
||||
@@ -99,7 +99,7 @@ class VerisureHygrometer(
|
||||
|
||||
_attr_device_class = SensorDeviceClass.HUMIDITY
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = "Humidity"
|
||||
_attr_translation_key = "humidity"
|
||||
_attr_native_unit_of_measurement = PERCENTAGE
|
||||
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||
|
||||
|
||||
@@ -56,5 +56,20 @@
|
||||
"error": {
|
||||
"code_format_mismatch": "The default PIN code does not match the required number of digits"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"ethernet": {
|
||||
"name": "Ethernet status"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"humidity": {
|
||||
"name": "[%key:component::sensor::entity_component::humidity::name%]"
|
||||
},
|
||||
"temperature": {
|
||||
"name": "[%key:component::sensor::entity_component::temperature::name%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user