Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartThings continue correct config flow after external auth #34862

Merged
merged 2 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rewrote rest of config flow tests.
  • Loading branch information
andrewsayre committed Apr 29, 2020
commit 64106114d5c07f8bf454b5d9ed9484343625e5bc
4 changes: 2 additions & 2 deletions homeassistant/components/smartthings/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import voluptuous as vol

from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN, HTTP_FORBIDDEN
from homeassistant.const import CONF_ACCESS_TOKEN, HTTP_FORBIDDEN, HTTP_UNAUTHORIZED
from homeassistant.helpers.aiohttp_client import async_get_clientsession

# pylint: disable=unused-import
Expand Down Expand Up @@ -139,7 +139,7 @@ async def async_step_pat(self, user_input=None):
)
return self._show_step_pat(errors)
except ClientResponseError as ex:
if ex.status == 401:
if ex.status == HTTP_UNAUTHORIZED:
errors[CONF_ACCESS_TOKEN] = "token_unauthorized"
_LOGGER.debug(
"Unauthorized error received setting up SmartApp", exc_info=True
Expand Down
Loading