mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use new SensorDeviceClass in cert_expiry (#61331)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
dfc85fe372
commit
fb7bab2a5d
@ -5,14 +5,13 @@ from datetime import datetime, timedelta
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.config_entries import SOURCE_IMPORT
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_PORT,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
EVENT_HOMEASSISTANT_START,
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
)
|
||||
from homeassistant.config_entries import SOURCE_IMPORT
|
||||
from homeassistant.const import CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_START
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.event import async_call_later
|
||||
@ -78,7 +77,7 @@ class CertExpiryEntity(CoordinatorEntity):
|
||||
class SSLCertificateTimestamp(CertExpiryEntity, SensorEntity):
|
||||
"""Implementation of the Cert Expiry timestamp sensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_TIMESTAMP
|
||||
_attr_device_class = SensorDeviceClass.TIMESTAMP
|
||||
|
||||
def __init__(self, coordinator) -> None:
|
||||
"""Initialize a Cert Expiry timestamp sensor."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user