From fa522fc50408078995a2f67a64b6492ec31a6870 Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Thu, 16 Dec 2021 08:42:43 -0500 Subject: [PATCH] Use enums in rova (#62044) --- homeassistant/components/rova/sensor.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/rova/sensor.py b/homeassistant/components/rova/sensor.py index 60d0fbe6df0..654323a79f4 100644 --- a/homeassistant/components/rova/sensor.py +++ b/homeassistant/components/rova/sensor.py @@ -10,14 +10,11 @@ import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, + SensorDeviceClass, SensorEntity, SensorEntityDescription, ) -from homeassistant.const import ( - CONF_MONITORED_CONDITIONS, - CONF_NAME, - DEVICE_CLASS_TIMESTAMP, -) +from homeassistant.const import CONF_MONITORED_CONDITIONS, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.util import Throttle from homeassistant.util.dt import get_time_zone, now @@ -110,7 +107,7 @@ class RovaSensor(SensorEntity): self.data_service = data_service self._attr_name = f"{platform_name}_{description.name}" - self._attr_device_class = DEVICE_CLASS_TIMESTAMP + self._attr_device_class = SensorDeviceClass.TIMESTAMP def update(self): """Get the latest data from the sensor and update the state."""