Add translations for Nuki entity name and battery critical state attribute (#90772)

* Add translations for Nuki entity name and battery critical state attribute

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Remove door sensor name

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

---------

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
This commit is contained in:
Patrick ZAJDA 2023-04-04 13:43:51 +02:00 committed by GitHub
parent 9b03d331ca
commit e962dd64cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 2 deletions

View file

@ -29,7 +29,7 @@ class NukiBatterySensor(NukiEntity[NukiDevice], SensorEntity):
"""Representation of a Nuki Lock Battery sensor."""
_attr_has_entity_name = True
_attr_name = "Battery"
_attr_translation_key = "battery"
_attr_native_unit_of_measurement = PERCENTAGE
_attr_device_class = SensorDeviceClass.BATTERY
_attr_entity_category = EntityCategory.DIAGNOSTIC