Use SensorDeviceClass in gtfs (#61657)
Co-authored-by: epenet <epenet@users.noreply.github.com>pull/61693/head
parent
a6a388721f
commit
2462d4cdf6
|
@ -14,15 +14,10 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA as SENSOR_PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
CONF_NAME,
|
||||
CONF_OFFSET,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
STATE_UNKNOWN,
|
||||
)
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME, CONF_OFFSET, STATE_UNKNOWN
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
@ -522,7 +517,7 @@ def setup_platform(
|
|||
class GTFSDepartureSensor(SensorEntity):
|
||||
"""Implementation of a GTFS departure sensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_TIMESTAMP
|
||||
_attr_device_class = SensorDeviceClass.TIMESTAMP
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
Loading…
Reference in New Issue