mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add CameraEntityDescription to camera integration (#53636)
This commit is contained in:
parent
c53e7bc8c2
commit
19245a5b63
@ -6,6 +6,7 @@ import base64
|
|||||||
import collections
|
import collections
|
||||||
from collections.abc import Awaitable, Mapping
|
from collections.abc import Awaitable, Mapping
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
|
from dataclasses import dataclass
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
@ -46,7 +47,7 @@ from homeassistant.helpers.config_validation import ( # noqa: F401
|
|||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
PLATFORM_SCHEMA_BASE,
|
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.entity_component import EntityComponent
|
||||||
from homeassistant.helpers.network import get_url
|
from homeassistant.helpers.network import get_url
|
||||||
from homeassistant.helpers.typing import ConfigType
|
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
|
@attr.s
|
||||||
class Image:
|
class Image:
|
||||||
"""Represent an image."""
|
"""Represent an image."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user