mirror of
https://github.com/USA-RedDragon/badnest.git
synced 2025-01-18 22:50:44 +00:00
Fixup google vs nest login logic
This commit is contained in:
parent
aeecf31aea
commit
d24b037e74
@ -16,10 +16,10 @@ class NestAPI:
|
|||||||
self._session = requests.Session()
|
self._session = requests.Session()
|
||||||
self._session.headers.update({"Referer": "https://home.nest.com/"})
|
self._session.headers.update({"Referer": "https://home.nest.com/"})
|
||||||
self._device_id = None
|
self._device_id = None
|
||||||
if email is not None and password is not None:
|
if not email and not password:
|
||||||
self._login_nest(email, password)
|
|
||||||
else:
|
|
||||||
self._login_google(issue_token, cookie, api_key)
|
self._login_google(issue_token, cookie, api_key)
|
||||||
|
else:
|
||||||
|
self._login_nest(email, password)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def _login_nest(self, email, password):
|
def _login_nest(self, email, password):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user