mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Use enums in ridwell (#62040)
This commit is contained in:
parent
d5fe0fcee0
commit
0dc5ae6dca
@ -7,9 +7,8 @@ from typing import Any
|
|||||||
|
|
||||||
from aioridwell.client import RidwellAccount, RidwellPickupEvent
|
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.config_entries import ConfigEntry
|
||||||
from homeassistant.const import DEVICE_CLASS_DATE
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.helpers.typing import StateType
|
from homeassistant.helpers.typing import StateType
|
||||||
@ -40,7 +39,7 @@ async def async_setup_entry(
|
|||||||
class RidwellSensor(CoordinatorEntity, SensorEntity):
|
class RidwellSensor(CoordinatorEntity, SensorEntity):
|
||||||
"""Define a Ridwell pickup sensor."""
|
"""Define a Ridwell pickup sensor."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_DATE
|
_attr_device_class = SensorDeviceClass.DATE
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, coordinator: DataUpdateCoordinator, account: RidwellAccount
|
self, coordinator: DataUpdateCoordinator, account: RidwellAccount
|
||||||
|
Loading…
x
Reference in New Issue
Block a user