Fix error for Reolink snapshot streams (#119572)

This commit is contained in:
starkillerOG 2024-06-13 09:30:53 +02:00 committed by GitHub
parent c02ac5e538
commit 440771bdea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,7 +116,6 @@ async def async_setup_entry(
class ReolinkCamera(ReolinkChannelCoordinatorEntity, Camera):
"""An implementation of a Reolink IP camera."""
_attr_supported_features: CameraEntityFeature = CameraEntityFeature.STREAM
entity_description: ReolinkCameraEntityDescription
def __init__(
@ -130,6 +129,9 @@ class ReolinkCamera(ReolinkChannelCoordinatorEntity, Camera):
ReolinkChannelCoordinatorEntity.__init__(self, reolink_data, channel)
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:
self._attr_translation_key = (
f"{entity_description.translation_key}_lens_{self._channel}"