Skip to content

Commit

Permalink
fix: process include/exclude devices (#2478)
Browse files Browse the repository at this point in the history
closes #2477
  • Loading branch information
danielbrunt57 committed Aug 24, 2024
1 parent 8a0aac7 commit b17ccbd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,18 @@ async def http2_error_handler(message):
_LOGGER.debug("Setting up Alexa devices for %s", hide_email(login_obj.email))
config = config_entry.data
email = config.get(CONF_EMAIL)
include = config.get(CONF_INCLUDE_DEVICES)
exclude = config.get(CONF_EXCLUDE_DEVICES)
include = (
cv.ensure_list_csv(config[CONF_INCLUDE_DEVICES])
if config[CONF_INCLUDE_DEVICES]
else ""
)
_LOGGER.debug("include: %s", include)
exclude = (
cv.ensure_list_csv(config[CONF_EXCLUDE_DEVICES])
if config[CONF_EXCLUDE_DEVICES]
else ""
)
_LOGGER.debug("exclude: %s", exclude)
scan_interval: float = (
config.get(CONF_SCAN_INTERVAL).total_seconds()
if isinstance(config.get(CONF_SCAN_INTERVAL), timedelta)
Expand Down

0 comments on commit b17ccbd

Please sign in to comment.