from music_assistant_models.config_entries import ProviderConfig
from music_assistant_models.provider import ProviderManifest
- from music_assistant import MusicAssistant
+ from music_assistant.mass import MusicAssistant
from music_assistant.models import ProviderInstanceType
DOMAIN = "hass"
values: the (intermediate) raw values for config entries sent with the action.
"""
# config flow auth action/step (authenticate button clicked)
- if action == CONF_ACTION_AUTH:
+ if action == CONF_ACTION_AUTH and values:
hass_url = values[CONF_URL]
- async with AuthenticationHelper(mass, values["session_id"]) as auth_helper:
+ async with AuthenticationHelper(mass, str(values["session_id"])) as auth_helper:
client_id = base_url(auth_helper.callback_url)
auth_url = get_auth_url(
hass_url,
"""Home Assistant Plugin for Music Assistant."""
hass: HomeAssistantClient
- _listen_task: asyncio.Task | None = None
+ _listen_task: asyncio.Task[None] | None = None
async def handle_async_init(self) -> None:
"""Handle async initialization of the plugin."""
'^music_assistant/providers/chromecast/.*$',
'^music_assistant/providers/deezer/.*$',
'^music_assistant/providers/dlna/.*$',
- '^music_assistant/providers/hass/.*$',
'^music_assistant/providers/hass_players/.*$',
'^music_assistant/providers/player_group/.*$',
'^music_assistant/providers/podcastfeed/.*$',