From 139fded9a3dcd18b78e6bcecc16034f602f4bce4 Mon Sep 17 00:00:00 2001 From: "Alan D. Tse" Date: Sun, 29 May 2022 10:33:15 -0700 Subject: [PATCH] fix: remove CONF_OAUTH_LOGIN calls closes #1612 --- custom_components/alexa_media/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/custom_components/alexa_media/__init__.py b/custom_components/alexa_media/__init__.py index 3c542829..3f604e3f 100644 --- a/custom_components/alexa_media/__init__.py +++ b/custom_components/alexa_media/__init__.py @@ -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 @@ -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), }, ) ) @@ -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