1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 09:38:58 +01:00

Remove deprecated camera frontend_stream_type (#144539)

This commit is contained in:
Robert Resch
2025-05-09 13:08:34 +02:00
committed by GitHub
parent 6350ed3415
commit c4ceb4759a
9 changed files with 7 additions and 130 deletions
@@ -1,41 +0,0 @@
"""Provide a mock remote platform.
Call init before using it in your tests to ensure clean test data.
"""
from homeassistant.components.camera import Camera, CameraEntityFeature, StreamType
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
async def async_setup_platform(
hass: HomeAssistant,
config: ConfigType,
async_add_entities_callback: AddEntitiesCallback,
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Return mock entities."""
async_add_entities_callback(
[AttrFrontendStreamTypeCamera(), PropertyFrontendStreamTypeCamera()]
)
class AttrFrontendStreamTypeCamera(Camera):
"""attr frontend stream type Camera."""
_attr_name = "attr frontend stream type"
_attr_supported_features: CameraEntityFeature = CameraEntityFeature.STREAM
_attr_frontend_stream_type: StreamType = StreamType.WEB_RTC
class PropertyFrontendStreamTypeCamera(Camera):
"""property frontend stream type Camera."""
_attr_name = "property frontend stream type"
_attr_supported_features: CameraEntityFeature = CameraEntityFeature.STREAM
@property
def frontend_stream_type(self) -> StreamType | None:
"""Return the stream type of the camera."""
return StreamType.WEB_RTC