Skip to content

Commit

Permalink
2.2.3 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludy87 authored Aug 15, 2023
1 parent 83d393d commit 2412bbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pyecotrend_ista/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.2.2"
VERSION = "2.2.3"
LOGIN_HEADER = {"Content-Type": "application/json"}
BASE_URL = "https://api.prod.eed.ista.com/"
ACCOUNT_URL = BASE_URL + "account"
Expand Down
10 changes: 8 additions & 2 deletions src/pyecotrend_ista/pyecotrend_ista.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@

class PyEcotrendIsta:
def __init__(
self, email: str, password: str, logger: logging.Logger = None, hass_dir: str | None = None, totp: str = None
self,
email: str,
password: str,
logger: logging.Logger = None,
hass_dir: str | None = None,
totp: str = None,
session: Any = None,
) -> None:
self._accessToken: str | None = None
self._refreshToken: str | None = None
Expand All @@ -36,7 +42,7 @@ def __init__(
self._LOGGER = logger if logger else _LOGGER
self._hass_dir = hass_dir

self.loginhelper = LoginHelper(username=self._email, password=self._password, totp=totp)
self.loginhelper = LoginHelper(username=self._email, password=self._password, totp=totp, session=session)

self.session = self.loginhelper.session

Expand Down

0 comments on commit 2412bbb

Please sign in to comment.