Add entity translations to honeywell (#95440)

This commit is contained in:
Joost Lekkerkerker 2023-06-28 13:55:42 +02:00 committed by GitHub
parent c1953b0ae4
commit ff015310fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -48,7 +48,7 @@ class HoneywellSensorEntityDescription(
SENSOR_TYPES: tuple[HoneywellSensorEntityDescription, ...] = (
HoneywellSensorEntityDescription(
key=TEMPERATURE_STATUS_KEY,
name="Outdoor temperature",
translation_key="outdoor_temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda device: device.outdoor_temperature,
@ -56,7 +56,7 @@ SENSOR_TYPES: tuple[HoneywellSensorEntityDescription, ...] = (
),
HoneywellSensorEntityDescription(
key=HUMIDITY_STATUS_KEY,
name="Outdoor humidity",
translation_key="outdoor_humidity",
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda device: device.outdoor_humidity,

View File

@ -31,5 +31,15 @@
}
}
}
},
"entity": {
"sensor": {
"outdoor_temperature": {
"name": "Outdoor temperature"
},
"outdoor_humidity": {
"name": "Outdoor humidity"
}
}
}
}