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: