Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove leading/trailing spaces from include_devices, exclude_devices #2761

Merged
merged 3 commits into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading