Skip to content

Commit

Permalink
fix: fix saving of otp_secret during relogin
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Dec 12, 2020
1 parent 7f4da8a commit efb2e37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/alexa_media/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ def _save_user_input_to_config(self, user_input=None) -> None:
" ", ""
):
self.config[CONF_OTPSECRET] = user_input[CONF_OTPSECRET].replace(" ", "")
elif CONF_OTPSECRET in self.config:
elif user_input.get(CONF_OTPSECRET):
# a blank line
self.config.pop(CONF_OTPSECRET)
if CONF_EMAIL in user_input:
self.config[CONF_EMAIL] = user_input[CONF_EMAIL]
Expand Down

0 comments on commit efb2e37

Please sign in to comment.