1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

Use new enums in nzbget (#61946)

This commit is contained in:
epenet 2021-12-16 21:42:05 +01:00 committed by GitHub
parent 7a1b05d166
commit 329d90b568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,13 +4,16 @@ from __future__ import annotations
from datetime import timedelta
import logging
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_NAME,
DATA_MEGABYTES,
DATA_RATE_MEGABYTES_PER_SECOND,
DEVICE_CLASS_TIMESTAMP,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -69,7 +72,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key="UpTimeSec",
name="Uptime",
device_class=DEVICE_CLASS_TIMESTAMP,
device_class=SensorDeviceClass.TIMESTAMP,
),
)