Skip to content
This repository was archived by the owner on Jul 14, 2023. It is now read-only.

Commit da34407

Browse files
committed
Fix Commissioned tokens, fixes #22
1 parent 7acb338 commit da34407

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/enphase_envoy_custom/envoy_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
ENVOY_MODEL_C = "P"
4141
ENVOY_MODEL_LEGACY = "P0"
4242

43-
LOGIN_URL = "https://entrez.enphaseenergy.com/login_main_page"
43+
LOGIN_URL = "https://entrez.enphaseenergy.com/login"
4444
TOKEN_URL = "https://entrez.enphaseenergy.com/entrez_tokens"
4545

4646
# paths for the enlighten 6 month owner token
@@ -275,7 +275,7 @@ async def _getEnphaseToken( # pylint: disable=invalid-name
275275
time_left_days = (token_json["expires_at"] - time.time())/(24*3600)
276276
_LOGGER.debug("Commissioned Token valid for %s days", time_left_days)
277277

278-
elif self.commissioned == "True" or self.commissioned == "Commissioned":
278+
elif self.commissioned == True or self.commissioned == "True" or self.commissioned == "Commissioned":
279279
# Login to website and store cookie
280280
resp = await self._async_post(LOGIN_URL, data=payload_login)
281281
payload_token = {

0 commit comments

Comments
 (0)