Use new enums in nextbus (#61954)
This commit is contained in:
parent
890dcfee11
commit
81ea811b74
1 changed files with 7 additions and 3 deletions
|
@ -5,8 +5,12 @@ import logging
|
|||
from py_nextbus import NextBusClient
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import CONF_NAME, DEVICE_CLASS_TIMESTAMP
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
)
|
||||
from homeassistant.const import CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util.dt import utc_from_timestamp
|
||||
|
||||
|
@ -112,7 +116,7 @@ class NextBusDepartureSensor(SensorEntity):
|
|||
the future using fuzzy logic and matching.
|
||||
"""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_TIMESTAMP
|
||||
_attr_device_class = SensorDeviceClass.TIMESTAMP
|
||||
_attr_icon = "mdi:bus"
|
||||
|
||||
def __init__(self, client, agency, route, stop, name=None):
|
||||
|
|
Loading…
Add table
Reference in a new issue