Add entity translations to Notion (#95755)

* Add entity translations to Notion

* Use device class translations

* Use device class translations
This commit is contained in:
Joost Lekkerkerker 2023-07-03 18:31:07 +02:00 committed by GitHub
parent 0a165bb35a
commit f0eb084908
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 11 deletions

View file

@ -27,13 +27,12 @@ class NotionSensorDescription(SensorEntityDescription, NotionEntityDescriptionMi
SENSOR_DESCRIPTIONS = (
NotionSensorDescription(
key=SENSOR_MOLD,
name="Mold risk",
translation_key="mold_risk",
icon="mdi:liquid-spot",
listener_kind=ListenerKind.MOLD,
),
NotionSensorDescription(
key=SENSOR_TEMPERATURE,
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,