Skip to content

Commit

Permalink
Add log str (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielhiversen authored Oct 12, 2020
1 parent 2dcf5ee commit 0c059ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/adax/adax.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,15 @@ async def get_adax_token(websession, account_id, password):
},
)
if response.status != 200:
if "invalid_grant" in response.reason:
log_str = "https://github.com/Danielhiversen/home_assistant_adax/issues/18#issuecomment-707238234"
else:
log_str = ""
_LOGGER.error(
"Adax: Failed to login to retrieve token: %s %s",
"Adax: Failed to login to retrieve token: %s %s %s",
response.status,
response.reason,
log_str,
)
return None
token_data = json.loads(await response.text())
Expand Down

0 comments on commit 0c059ba

Please sign in to comment.