Skip to content

Commit

Permalink
Merge pull request #378 from alandtse/#377
Browse files Browse the repository at this point in the history
fix(config_flow): fix handling of filter options
  • Loading branch information
alandtse committed Sep 21, 2019
2 parents 990e379 + 1a53b98 commit 2f33b1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/alexa_media/config_flow.py
Expand Up @@ -163,15 +163,17 @@ async def async_step_user(self, user_input=None):
if isinstance(user_input[CONF_INCLUDE_DEVICES], str):
self.config[CONF_INCLUDE_DEVICES] = (
user_input[CONF_INCLUDE_DEVICES].split(",")
if "CONF_INCLUDE_DEVICES" in user_input
if CONF_INCLUDE_DEVICES in user_input and
user_input[CONF_INCLUDE_DEVICES] != ""
else []
)
else:
self.config[CONF_INCLUDE_DEVICES] = user_input[CONF_INCLUDE_DEVICES]
if isinstance(user_input[CONF_EXCLUDE_DEVICES], str):
self.config[CONF_EXCLUDE_DEVICES] = (
user_input[CONF_EXCLUDE_DEVICES].split(",")
if "CONF_EXCLUDE_DEVICES" in user_input
if CONF_EXCLUDE_DEVICES in user_input and
user_input[CONF_EXCLUDE_DEVICES] != ""
else []
)
else:
Expand Down

0 comments on commit 2f33b1a

Please sign in to comment.