Skip to content

Commit

Permalink
refactor: replace hard coded strings
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Jul 21, 2022
1 parent ac93145 commit a08cc04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/alexa_media/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async def async_step_start_proxy(self, user_input=None):
self.hass.http.register_view(AlexaMediaAuthorizationCallbackView())
self.hass.http.register_view(self.proxy_view)
callback_url = (
URL(self.config["hass_url"])
URL(self.config[CONF_HASS_URL])
.with_path(AUTH_CALLBACK_PATH)
.with_query({"flow_id": self.flow_id})
)
Expand Down Expand Up @@ -442,7 +442,7 @@ async def async_step_user_legacy(self, user_input=None):
async def async_step_totp_register(self, user_input=None):
"""Handle the input processing of the config flow."""
self._save_user_input_to_config(user_input=user_input)
if user_input and user_input.get("registered") is False:
if user_input and user_input.get(CONF_TOTP_REGISTER) is False:
_LOGGER.debug("Not registered, regenerating")
otp: str = self.login.get_totp_token()
if otp:
Expand Down

0 comments on commit a08cc04

Please sign in to comment.