From c060b5926c00ac0a9575b48139b1bb7eda9b2fdd Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 13 Dec 2021 05:23:34 +0100 Subject: [PATCH] Use new SensorDeviceClass enum in glances (#61613) Co-authored-by: epenet --- homeassistant/components/glances/const.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/glances/const.py b/homeassistant/components/glances/const.py index 50f915ef4de..a25ae1b4660 100644 --- a/homeassistant/components/glances/const.py +++ b/homeassistant/components/glances/const.py @@ -4,14 +4,8 @@ from __future__ import annotations from dataclasses import dataclass import sys -from homeassistant.components.sensor import SensorEntityDescription -from homeassistant.const import ( - DATA_GIBIBYTES, - DATA_MEBIBYTES, - DEVICE_CLASS_TEMPERATURE, - PERCENTAGE, - TEMP_CELSIUS, -) +from homeassistant.components.sensor import SensorDeviceClass, SensorEntityDescription +from homeassistant.const import DATA_GIBIBYTES, DATA_MEBIBYTES, PERCENTAGE, TEMP_CELSIUS DOMAIN = "glances" CONF_VERSION = "version" @@ -150,14 +144,14 @@ SENSOR_TYPES: tuple[GlancesSensorEntityDescription, ...] = ( type="sensors", name_suffix="Temperature", native_unit_of_measurement=TEMP_CELSIUS, - device_class=DEVICE_CLASS_TEMPERATURE, + device_class=SensorDeviceClass.TEMPERATURE, ), GlancesSensorEntityDescription( key="temperature_hdd", type="sensors", name_suffix="Temperature", native_unit_of_measurement=TEMP_CELSIUS, - device_class=DEVICE_CLASS_TEMPERATURE, + device_class=SensorDeviceClass.TEMPERATURE, ), GlancesSensorEntityDescription( key="fan_speed",