Add translation_key
property to entites (#82701)
* Add translation_key attribute to entity state * Update accuweather test * Index entity translation keys by platform * Store translation key in entity registry
This commit is contained in:
parent
843f537109
commit
8e617bbc1d
15 changed files with 127 additions and 32 deletions
|
@ -301,9 +301,9 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
|
|||
),
|
||||
AccuWeatherSensorDescription(
|
||||
key="PressureTendency",
|
||||
device_class="accuweather__pressure_tendency",
|
||||
icon="mdi:gauge",
|
||||
name="Pressure tendency",
|
||||
translation_key="pressure_tendency",
|
||||
value_fn=lambda data, _: cast(str, data["LocalizedText"]).lower(),
|
||||
),
|
||||
AccuWeatherSensorDescription(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue