From 172237f4f1b13ec8f17850fd52e4e1c722dc2edd Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 10 Dec 2021 14:48:48 +0100 Subject: [PATCH] Use new SensorDeviceClass enum in foobot (#61442) Co-authored-by: epenet --- homeassistant/components/foobot/sensor.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/foobot/sensor.py b/homeassistant/components/foobot/sensor.py index 21510771cd5..5b252716d92 100644 --- a/homeassistant/components/foobot/sensor.py +++ b/homeassistant/components/foobot/sensor.py @@ -9,7 +9,11 @@ import aiohttp from foobot_async import FoobotClient import voluptuous as vol -from homeassistant.components.sensor import SensorEntity, SensorEntityDescription +from homeassistant.components.sensor import ( + SensorDeviceClass, + SensorEntity, + SensorEntityDescription, +) from homeassistant.const import ( ATTR_TEMPERATURE, ATTR_TIME, @@ -18,7 +22,6 @@ from homeassistant.const import ( CONCENTRATION_PARTS_PER_MILLION, CONF_TOKEN, CONF_USERNAME, - DEVICE_CLASS_TEMPERATURE, PERCENTAGE, TEMP_CELSIUS, TIME_SECONDS, @@ -54,7 +57,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( key="tmp", name=ATTR_TEMPERATURE, native_unit_of_measurement=TEMP_CELSIUS, - device_class=DEVICE_CLASS_TEMPERATURE, + device_class=SensorDeviceClass.TEMPERATURE, ), SensorEntityDescription( key="hum",