Skip to content

Commit

Permalink
fix: strip spaces from include_devices, exclude_devices (#2761)
Browse files Browse the repository at this point in the history
closes #2556
closes #2751
  • Loading branch information
danielbrunt57 authored Dec 22, 2024
1 parent b992109 commit 7952c89
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions custom_components/alexa_media/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,15 @@ async def async_step_init(
if CONF_PUBLIC_URL in self._config_entry.data:
if not user_input[CONF_PUBLIC_URL].endswith("/"):
user_input[CONF_PUBLIC_URL] = user_input[CONF_PUBLIC_URL] + "/"
"""Remove leading/trailing spaces in device strings"""
if CONF_INCLUDE_DEVICES in self._config_entry.data:
user_input[CONF_INCLUDE_DEVICES] = user_input[
CONF_INCLUDE_DEVICES
].strip()
if CONF_EXCLUDE_DEVICES in self._config_entry.data:
user_input[CONF_EXCLUDE_DEVICES] = user_input[
CONF_EXCLUDE_DEVICES
].strip()

self.hass.config_entries.async_update_entry(
self._config_entry, data=user_input, options=self._config_entry.options
Expand Down

0 comments on commit 7952c89

Please sign in to comment.