/
/
/
1"""
2Sonos Player provider for Music Assistant for speakers running the S2 firmware.
3
4Based on the aiosonos library, which leverages the new websockets API of the Sonos S2 firmware.
5https://github.com/music-assistant/aiosonos
6"""
7
8from __future__ import annotations
9
10from typing import TYPE_CHECKING
11
12from music_assistant_models.enums import ProviderFeature
13
14from .provider import SonosPlayerProvider
15
16if TYPE_CHECKING:
17 from music_assistant_models.config_entries import ProviderConfig
18 from music_assistant_models.provider import ProviderManifest
19
20 from music_assistant import MusicAssistant
21 from music_assistant.models import ProviderInstanceType
22
23SUPPORTED_FEATURES = {
24 ProviderFeature.SYNC_PLAYERS,
25}
26
27
28async def setup(
29 mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig
30) -> ProviderInstanceType:
31 """Initialize provider(instance) with given configuration."""
32 return SonosPlayerProvider(mass, manifest, config, SUPPORTED_FEATURES)
33