Skip to content

Commit

Permalink
Update config_flow.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Feb 5, 2024
1 parent 50e31ad commit 569456d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions custom_components/bluesound_alt/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def validate_input(hass: HomeAssistant, data: dict) -> dict[str, Any]:
"""

hosts = {
"CONF_HOSTS": [
CONF_HOSTS: [
{
"CONF_HOST": data[CONF_HOST],
"CONF_NAME": data[CONF_NAME],
Expand Down Expand Up @@ -86,9 +86,13 @@ async def async_step_user(self, user_input=None):
await validate_input(self.hass, user_input)

data = {
CONF_NAME: user_input[CONF_NAME],
CONF_HOST: user_input[CONF_HOST],
CONF_PORT: DEFAULT_PORT,
CONF_HOSTS: [
{
CONF_NAME: user_input[CONF_NAME],
CONF_HOST: user_input[CONF_HOST],
CONF_PORT: DEFAULT_PORT,
}
]
}

return self.async_create_entry(
Expand Down

0 comments on commit 569456d

Please sign in to comment.