Clean up Ombi const file (#95541)
parent
4fa9f25e38
commit
52313bfce5
|
@ -1,8 +1,6 @@
|
|||
"""Support for Ombi."""
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.sensor import SensorEntityDescription
|
||||
|
||||
ATTR_SEASON = "season"
|
||||
|
||||
CONF_URLBASE = "urlbase"
|
||||
|
@ -16,36 +14,3 @@ DEFAULT_URLBASE = ""
|
|||
SERVICE_MOVIE_REQUEST = "submit_movie_request"
|
||||
SERVICE_MUSIC_REQUEST = "submit_music_request"
|
||||
SERVICE_TV_REQUEST = "submit_tv_request"
|
||||
|
||||
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="movies",
|
||||
name="Movie requests",
|
||||
icon="mdi:movie",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="tv",
|
||||
name="TV show requests",
|
||||
icon="mdi:television-classic",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="music",
|
||||
name="Music album requests",
|
||||
icon="mdi:album",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="pending",
|
||||
name="Pending requests",
|
||||
icon="mdi:clock-alert-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="approved",
|
||||
name="Approved requests",
|
||||
icon="mdi:check",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="available",
|
||||
name="Available requests",
|
||||
icon="mdi:download",
|
||||
),
|
||||
)
|
||||
|
|
|
@ -11,13 +11,47 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .const import DOMAIN, SENSOR_TYPES
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SCAN_INTERVAL = timedelta(seconds=60)
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="movies",
|
||||
name="Movie requests",
|
||||
icon="mdi:movie",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="tv",
|
||||
name="TV show requests",
|
||||
icon="mdi:television-classic",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="music",
|
||||
name="Music album requests",
|
||||
icon="mdi:album",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="pending",
|
||||
name="Pending requests",
|
||||
icon="mdi:clock-alert-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="approved",
|
||||
name="Approved requests",
|
||||
icon="mdi:check",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="available",
|
||||
name="Available requests",
|
||||
icon="mdi:download",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def setup_platform(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
|
|
Loading…
Reference in New Issue