Use enums in ridwell (#62040)

pull/62088/head
Robert Hillis 2021-12-16 08:34:51 -05:00 committed by GitHub
parent d5fe0fcee0
commit 0dc5ae6dca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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