Use new enums in motioneye (#61932)

This commit is contained in:
epenet 2021-12-15 20:43:39 +01:00 committed by GitHub
parent 85199b4cde
commit f9a310ea49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,8 +17,8 @@ from motioneye_client.const import (
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ENTITY_CATEGORY_CONFIG
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
@ -30,37 +30,37 @@ MOTIONEYE_SWITCHES = [
key=KEY_MOTION_DETECTION,
name="Motion Detection",
entity_registry_enabled_default=True,
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=KEY_TEXT_OVERLAY,
name="Text Overlay",
entity_registry_enabled_default=False,
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=KEY_VIDEO_STREAMING,
name="Video Streaming",
entity_registry_enabled_default=False,
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=KEY_STILL_IMAGES,
name="Still Images",
entity_registry_enabled_default=True,
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=KEY_MOVIES,
name="Movies",
entity_registry_enabled_default=True,
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=KEY_UPLOAD_ENABLED,
name="Upload Enabled",
entity_registry_enabled_default=False,
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=EntityCategory.CONFIG,
),
]