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 4, 2024
1 parent c91d139 commit 570e37e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions custom_components/bluesound_alt/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
CONF_PORT,
EVENT_HOMEASSISTANT_STOP,
)
from homeassistant.helpers.typing import ConfigType
import homeassistant.helpers.config_validation as cv

from .media_player import (DEFAULT_PORT, async_setup_platform, PLATFORM_SCHEMA)
Expand Down Expand Up @@ -47,13 +48,15 @@ async def validate_input(hass: HomeAssistant, data: dict) -> dict[str, Any]:
Data has the keys from DATA_SCHEMA with values provided by the user.
"""

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

result = await async_setup_platform(hass, hosts, True, None)
if result is not True:
Expand Down

0 comments on commit 570e37e

Please sign in to comment.