From 0fa0ab855b75311de7f1e609bfe44a49c233b845 Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Thu, 29 Sep 2022 09:19:20 +0200
Subject: [PATCH] Use SensorDeviceClass.SPEED in metoffice (#79263)

---
 homeassistant/components/metoffice/sensor.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/homeassistant/components/metoffice/sensor.py b/homeassistant/components/metoffice/sensor.py
index dd8ceefad23..c553904a895 100644
--- a/homeassistant/components/metoffice/sensor.py
+++ b/homeassistant/components/metoffice/sensor.py
@@ -83,15 +83,14 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
     SensorEntityDescription(
         key="wind_speed",
         name="Wind speed",
-        device_class=None,
         native_unit_of_measurement=SPEED_MILES_PER_HOUR,
+        device_class=SensorDeviceClass.SPEED,
         icon="mdi:weather-windy",
         entity_registry_enabled_default=True,
     ),
     SensorEntityDescription(
         key="wind_direction",
         name="Wind direction",
-        device_class=None,
         native_unit_of_measurement=None,
         icon="mdi:compass-outline",
         entity_registry_enabled_default=False,
@@ -99,8 +98,8 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
     SensorEntityDescription(
         key="wind_gust",
         name="Wind gust",
-        device_class=None,
         native_unit_of_measurement=SPEED_MILES_PER_HOUR,
+        device_class=SensorDeviceClass.SPEED,
         icon="mdi:weather-windy",
         entity_registry_enabled_default=False,
     ),
-- 
GitLab