Add CameraEntityDescription to camera integration (#53636)

pull/53638/head
jan iversen 2021-07-28 21:09:45 +02:00 committed by GitHub
parent c53e7bc8c2
commit 19245a5b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import base64
import collections
from collections.abc import Awaitable, Mapping
from contextlib import suppress
from dataclasses import dataclass
from datetime import datetime, timedelta
import hashlib
import logging
@ -46,7 +47,7 @@ from homeassistant.helpers.config_validation import ( # noqa: F401
PLATFORM_SCHEMA,
PLATFORM_SCHEMA_BASE,
)
from homeassistant.helpers.entity import Entity, entity_sources
from homeassistant.helpers.entity import Entity, EntityDescription, entity_sources
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.network import get_url
from homeassistant.helpers.typing import ConfigType
@ -117,6 +118,11 @@ SCHEMA_WS_CAMERA_THUMBNAIL: Final = websocket_api.BASE_COMMAND_MESSAGE_SCHEMA.ex
)
@dataclass
class CameraEntityDescription(EntityDescription):
"""A class that describes camera entities."""
@attr.s
class Image:
"""Represent an image."""