Use device class ENUM for Accuweather pressure tendency sensor (#86887)
* Use device class ENUM for pressure tendency sensor * Format
This commit is contained in:
parent
a4fa0925b7
commit
d485630ce9
2 changed files with 5 additions and 1 deletions
|
@ -300,8 +300,10 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
|
|||
),
|
||||
AccuWeatherSensorDescription(
|
||||
key="PressureTendency",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
icon="mdi:gauge",
|
||||
name="Pressure tendency",
|
||||
options=["falling", "rising", "steady"],
|
||||
translation_key="pressure_tendency",
|
||||
value_fn=lambda data, _: cast(str, data["LocalizedText"]).lower(),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue