forked from home-assistant/core
Fix Onvif Camera that does not have SnapshotUri such as Sricam (#33902)
This commit is contained in:
@@ -411,8 +411,11 @@ class ONVIFHassCamera(Camera):
|
|||||||
req = media_service.create_type("GetSnapshotUri")
|
req = media_service.create_type("GetSnapshotUri")
|
||||||
req.ProfileToken = profiles[self._profile_index].token
|
req.ProfileToken = profiles[self._profile_index].token
|
||||||
|
|
||||||
snapshot_uri = await media_service.GetSnapshotUri(req)
|
try:
|
||||||
self._snapshot = snapshot_uri.Uri
|
snapshot_uri = await media_service.GetSnapshotUri(req)
|
||||||
|
self._snapshot = snapshot_uri.Uri
|
||||||
|
except ServerDisconnectedError as err:
|
||||||
|
_LOGGER.debug("Camera does not support GetSnapshotUri: %s", err)
|
||||||
|
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"ONVIF Camera Using the following URL for %s snapshot: %s",
|
"ONVIF Camera Using the following URL for %s snapshot: %s",
|
||||||
|
Reference in New Issue
Block a user