Fix setup of ONVIF devices without snapshot capability (#39723)

* Fix setup of ONVIF devices without snapshot capability

* Unrelated debug message typo fix
This commit is contained in:
Ville Skyttä 2020-09-06 23:52:06 +03:00 committed by GitHub
parent dd00cfc7a2
commit f828cdcaef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -127,6 +127,8 @@ async def _get_snapshot_auth(hass, device, entry):
return HTTP_DIGEST_AUTHENTICATION
snapshot_uri = await device.async_get_snapshot_uri(device.profiles[0])
if not snapshot_uri:
return HTTP_DIGEST_AUTHENTICATION
auth = HTTPDigestAuth(device.username, device.password)
def _get():

View File

@ -217,7 +217,7 @@ class ONVIFDevice:
raise fault
LOGGER.debug(
"Couldn't get network interfaces from ONVIF deivice '%s'. Error: %s",
"Couldn't get network interfaces from ONVIF device '%s'. Error: %s",
self.name,
fault,
)