mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use new enums in nzbget (#61946)
This commit is contained in:
parent
7a1b05d166
commit
329d90b568
@ -4,13 +4,16 @@ from __future__ import annotations
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
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.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
DATA_MEGABYTES,
|
DATA_MEGABYTES,
|
||||||
DATA_RATE_MEGABYTES_PER_SECOND,
|
DATA_RATE_MEGABYTES_PER_SECOND,
|
||||||
DEVICE_CLASS_TIMESTAMP,
|
|
||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
@ -69,7 +72,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
|||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="UpTimeSec",
|
key="UpTimeSec",
|
||||||
name="Uptime",
|
name="Uptime",
|
||||||
device_class=DEVICE_CLASS_TIMESTAMP,
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user