Use enums in yandex_transport (#61978)

pull/62011/head
Robert Hillis 2021-12-16 03:10:38 -05:00 committed by GitHub
parent 806366a0c1
commit 173582d4fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -6,8 +6,12 @@ import logging
from aioymaps import CaptchaError, YandexMapsRequester
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME, DEVICE_CLASS_TIMESTAMP
from homeassistant.components.sensor import (
PLATFORM_SCHEMA,
SensorDeviceClass,
SensorEntity,
)
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME
from homeassistant.helpers.aiohttp_client import async_create_clientsession
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
@ -140,7 +144,7 @@ class DiscoverYandexTransport(SensorEntity):
@property
def device_class(self):
"""Return the device class."""
return DEVICE_CLASS_TIMESTAMP
return SensorDeviceClass.TIMESTAMP
@property
def name(self):