Skip to content

Commit

Permalink
check for null homescreen before dereferencing for owls/lotus
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhunger committed May 31, 2024
1 parent 9be8dd4 commit de33571
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions blinkpy/blinkpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ async def setup_owls(self):
"""Check for mini cameras."""
network_list = []
camera_list = []
if self.homescreen is None:
# Don't try to iterate if homescreen is not defined
return camera_list
try:
for owl in self.homescreen["owls"]:
name = owl["name"]
Expand All @@ -203,6 +206,9 @@ async def setup_lotus(self):
"""Check for doorbells cameras."""
network_list = []
camera_list = []
if self.homescreen is None:
# Don't try to iterate if homescreen is not defined
return camera_list
try:
for lotus in self.homescreen["doorbells"]:
name = lotus["name"]
Expand Down

0 comments on commit de33571

Please sign in to comment.