diff --git a/custom_components/badnest/api.py b/custom_components/badnest/api.py index 6695414..b2eb235 100644 --- a/custom_components/badnest/api.py +++ b/custom_components/badnest/api.py @@ -127,6 +127,7 @@ class NestAPI(): return self._get_cameras() def _get_devices(self): + assert self._user_id, "No user_id found; check configuration" try: r = self._session.post( f"{API_URL}/api/0.1/user/{self._user_id}/app_launch", @@ -178,6 +179,7 @@ class NestAPI(): return "Unknown" def update(self): + assert self._user_id, "No user_id found; check configuration" try: # To get friendly names r = self._session.post(