Use SensorDeviceClass in gtfs (#61657)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/61693/head
epenet 2021-12-13 15:05:20 +01:00 committed by GitHub
parent a6a388721f
commit 2462d4cdf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

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