1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00

Add entity name translations for Nest sensors (#90677)

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
This commit is contained in:
Patrick ZAJDA 2023-04-03 02:19:03 +02:00 committed by GitHub
parent 368d1c9b54
commit 22fd6138bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class TemperatureSensor(SensorBase):
_attr_device_class = SensorDeviceClass.TEMPERATURE
_attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
_attr_name = "Temperature"
_attr_translation_key = "temperature"
@property
def native_value(self) -> float:
@ -96,7 +96,7 @@ class HumiditySensor(SensorBase):
_attr_device_class = SensorDeviceClass.HUMIDITY
_attr_native_unit_of_measurement = PERCENTAGE
_attr_name = "Humidity"
_attr_translation_key = "humidity"
@property
def native_value(self) -> int:

View File

@ -98,5 +98,15 @@
"title": "Nest Authentication Credentials must be updated",
"description": "To improve security and reduce phishing risk Google has deprecated the authentication method used by Home Assistant.\n\n**This requires action by you to resolve** ([more info]({more_info_url}))\n\n1. Visit the integrations page\n1. Click Reconfigure on the Nest integration.\n1. Home Assistant will walk you through the steps to upgrade to Web Authentication.\n\nSee the Nest [integration instructions]({documentation_url}) for troubleshooting information."
}
},
"entity": {
"sensor": {
"temperature": {
"name": "[%key:component::sensor::entity_component::temperature::name%]"
},
"humidity": {
"name": "[%key:component::sensor::entity_component::humidity::name%]"
}
}
}
}