mirror of
https://github.com/ep1cman/unifi-protect-backup.git
synced 2025-12-05 23:53:30 +00:00
Block all calls to protect client when the connection is
dropped and we are awaiting a reconnect
This commit is contained in:
@@ -286,6 +286,9 @@ async def get_camera_name(protect: ProtectApiClient, id: str):
|
||||
|
||||
If the camera ID is not know, it tries refreshing the cached data
|
||||
"""
|
||||
# Wait for unifi protect to be connected
|
||||
await protect.connect_event.wait()
|
||||
|
||||
try:
|
||||
return protect.bootstrap.cameras[id].name
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user