From 0dc5ae6dca30a0d5352add02b7af56567e8b589a Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Thu, 16 Dec 2021 08:34:51 -0500 Subject: [PATCH] Use enums in ridwell (#62040) --- homeassistant/components/ridwell/sensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/ridwell/sensor.py b/homeassistant/components/ridwell/sensor.py index f80ddc45176..269a08587c7 100644 --- a/homeassistant/components/ridwell/sensor.py +++ b/homeassistant/components/ridwell/sensor.py @@ -7,9 +7,8 @@ from typing import Any from aioridwell.client import RidwellAccount, RidwellPickupEvent -from homeassistant.components.sensor import SensorEntity +from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.config_entries import ConfigEntry -from homeassistant.const import DEVICE_CLASS_DATE from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import StateType @@ -40,7 +39,7 @@ async def async_setup_entry( class RidwellSensor(CoordinatorEntity, SensorEntity): """Define a Ridwell pickup sensor.""" - _attr_device_class = DEVICE_CLASS_DATE + _attr_device_class = SensorDeviceClass.DATE def __init__( self, coordinator: DataUpdateCoordinator, account: RidwellAccount