From 25db4a4f1f599d7a10cdd767bff5d0b6e61fd25e Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 8 Dec 2021 21:56:41 +0100 Subject: [PATCH] Use new SensorDeviceClass in arwn (#61275) Co-authored-by: epenet --- homeassistant/components/arwn/sensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/arwn/sensor.py b/homeassistant/components/arwn/sensor.py index 2571d35f98e..4f06ac169ad 100644 --- a/homeassistant/components/arwn/sensor.py +++ b/homeassistant/components/arwn/sensor.py @@ -3,10 +3,9 @@ import json import logging from homeassistant.components import mqtt -from homeassistant.components.sensor import SensorEntity +from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.const import ( DEGREE, - DEVICE_CLASS_TEMPERATURE, PRECIPITATION_INCHES, TEMP_CELSIUS, TEMP_FAHRENHEIT, @@ -37,7 +36,7 @@ def discover_sensors(topic, payload): else: unit = TEMP_CELSIUS return ArwnSensor( - topic, name, "temp", unit, device_class=DEVICE_CLASS_TEMPERATURE + topic, name, "temp", unit, device_class=SensorDeviceClass.TEMPERATURE ) if domain == "moisture": name = f"{parts[2]} Moisture"