mirror of
https://github.com/USA-RedDragon/badnest.git
synced 2025-01-18 19:40:42 +00:00
Improve error messages when user_id is unavailable
This commit is contained in:
parent
7ab48d968e
commit
4f67bf4b49
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user