Skip to content

Commit

Permalink
fix: remove CONF_OAUTH_LOGIN calls
Browse files Browse the repository at this point in the history
closes #1612
  • Loading branch information
alandtse committed May 29, 2022
1 parent 774ca09 commit 139fded
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ async def async_setup(hass, config, discovery_info=None):
].total_seconds(),
CONF_OAUTH: account.get(CONF_OAUTH, {}),
CONF_OTPSECRET: account.get(CONF_OTPSECRET, ""),
CONF_OAUTH_LOGIN: account.get(CONF_OAUTH_LOGIN, True),
},
)
entry_found = True
Expand All @@ -171,7 +170,6 @@ async def async_setup(hass, config, discovery_info=None):
CONF_SCAN_INTERVAL: account[CONF_SCAN_INTERVAL].total_seconds(),
CONF_OAUTH: account.get(CONF_OAUTH, {}),
CONF_OTPSECRET: account.get(CONF_OTPSECRET, ""),
CONF_OAUTH_LOGIN: account.get(CONF_OAUTH_LOGIN, True),
},
)
)
Expand Down Expand Up @@ -307,10 +305,7 @@ async def login_success(event=None) -> None:
otp_secret=account.get(CONF_OTPSECRET, ""),
oauth=account.get(CONF_OAUTH, {}),
uuid=uuid,
oauth_login=bool(
account.get(CONF_OAUTH, {}).get("access_token")
or account.get(CONF_OAUTH_LOGIN)
),
oauth_login=True,
),
)
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["login_obj"] = login
Expand Down

0 comments on commit 139fded

Please sign in to comment.