Enforce CameraEntityFeature (#82325)
This commit is contained in:
parent
7df711f1f3
commit
8b54a0679f
5 changed files with 11 additions and 10 deletions
|
@ -175,9 +175,10 @@ class ProtectCamera(ProtectDeviceEntity, Camera):
|
|||
self._stream_source = ( # pylint: disable=attribute-defined-outside-init
|
||||
None if disable_stream else rtsp_url
|
||||
)
|
||||
self._attr_supported_features = (
|
||||
CameraEntityFeature.STREAM if self._stream_source else 0
|
||||
)
|
||||
if self._stream_source:
|
||||
self._attr_supported_features = CameraEntityFeature.STREAM
|
||||
else:
|
||||
self._attr_supported_features = CameraEntityFeature(0)
|
||||
|
||||
@callback
|
||||
def _async_update_device_from_protect(self, device: ProtectModelWithId) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue