Skip to content

Commit

Permalink
Maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Feb 5, 2024
1 parent 8933e10 commit 50e31ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 10 additions & 1 deletion custom_components/bluesound_alt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
"""The Bluesound component."""
"""The Bluesound component."""
from .media_player import (async_setup_platform)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.config_entries import ConfigEntry

async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up a config entry for Bluesound."""
await async_setup_platform(hass, entry, AddEntitiesCallback, None)
return True
5 changes: 2 additions & 3 deletions custom_components/bluesound_alt/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ async def validate_input(hass: HomeAssistant, data: dict) -> dict[str, Any]:

_LOGGER.debug("Adding new device.")

await async_setup_platform(hass, hosts, True, None)

await async_setup_platform(hass, hosts, False, None)

class ExampleConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Hello World."""
Expand All @@ -84,7 +83,7 @@ async def async_step_user(self, user_input=None):
errors = {}
if user_input is not None:
try:
info = await validate_input(self.hass, user_input)
await validate_input(self.hass, user_input)

data = {
CONF_NAME: user_input[CONF_NAME],
Expand Down

0 comments on commit 50e31ad

Please sign in to comment.