mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Fix error for Reolink snapshot streams (#119572)
This commit is contained in:
parent
c02ac5e538
commit
440771bdea
@ -116,7 +116,6 @@ async def async_setup_entry(
|
|||||||
class ReolinkCamera(ReolinkChannelCoordinatorEntity, Camera):
|
class ReolinkCamera(ReolinkChannelCoordinatorEntity, Camera):
|
||||||
"""An implementation of a Reolink IP camera."""
|
"""An implementation of a Reolink IP camera."""
|
||||||
|
|
||||||
_attr_supported_features: CameraEntityFeature = CameraEntityFeature.STREAM
|
|
||||||
entity_description: ReolinkCameraEntityDescription
|
entity_description: ReolinkCameraEntityDescription
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -130,6 +129,9 @@ class ReolinkCamera(ReolinkChannelCoordinatorEntity, Camera):
|
|||||||
ReolinkChannelCoordinatorEntity.__init__(self, reolink_data, channel)
|
ReolinkChannelCoordinatorEntity.__init__(self, reolink_data, channel)
|
||||||
Camera.__init__(self)
|
Camera.__init__(self)
|
||||||
|
|
||||||
|
if "snapshots" not in entity_description.stream:
|
||||||
|
self._attr_supported_features = CameraEntityFeature.STREAM
|
||||||
|
|
||||||
if self._host.api.model in DUAL_LENS_MODELS:
|
if self._host.api.model in DUAL_LENS_MODELS:
|
||||||
self._attr_translation_key = (
|
self._attr_translation_key = (
|
||||||
f"{entity_description.translation_key}_lens_{self._channel}"
|
f"{entity_description.translation_key}_lens_{self._channel}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user