from . import SQUEEZEBOX_HASS_DATA as SQUEEZEBOX_HASS_DATA, SqueezeboxConfigEntry as SqueezeboxConfigEntry
from .browse_media import BrowseData as BrowseData, build_item_response as build_item_response, generate_playlist as generate_playlist, library_payload as library_payload, media_source_content_filter as media_source_content_filter
from .const import ATTR_ANNOUNCE_TIMEOUT as ATTR_ANNOUNCE_TIMEOUT, ATTR_ANNOUNCE_VOLUME as ATTR_ANNOUNCE_VOLUME, CONF_BROWSE_LIMIT as CONF_BROWSE_LIMIT, CONF_VOLUME_STEP as CONF_VOLUME_STEP, DEFAULT_BROWSE_LIMIT as DEFAULT_BROWSE_LIMIT, DEFAULT_VOLUME_STEP as DEFAULT_VOLUME_STEP, DOMAIN as DOMAIN, SERVER_MANUFACTURER as SERVER_MANUFACTURER, SERVER_MODEL as SERVER_MODEL, SERVER_MODEL_ID as SERVER_MODEL_ID, SIGNAL_PLAYER_DISCOVERED as SIGNAL_PLAYER_DISCOVERED, SQUEEZEBOX_SOURCE_STRINGS as SQUEEZEBOX_SOURCE_STRINGS
from .coordinator import SqueezeBoxPlayerUpdateCoordinator as SqueezeBoxPlayerUpdateCoordinator
from .entity import SqueezeboxEntity as SqueezeboxEntity
from .util import safe_library_call as safe_library_call
from _typeshed import Incomplete
from collections.abc import Callable as Callable
from datetime import datetime
from homeassistant.components import media_source as media_source
from homeassistant.components.media_player import ATTR_MEDIA_ENQUEUE as ATTR_MEDIA_ENQUEUE, ATTR_MEDIA_EXTRA as ATTR_MEDIA_EXTRA, BrowseError as BrowseError, BrowseMedia as BrowseMedia, MediaPlayerEnqueue as MediaPlayerEnqueue, MediaPlayerEntity as MediaPlayerEntity, MediaPlayerEntityFeature as MediaPlayerEntityFeature, MediaPlayerState as MediaPlayerState, MediaType as MediaType, RepeatMode as RepeatMode, SearchMedia as SearchMedia, SearchMediaQuery as SearchMediaQuery, async_process_play_media_url as async_process_play_media_url
from homeassistant.config_entries import SOURCE_INTEGRATION_DISCOVERY as SOURCE_INTEGRATION_DISCOVERY
from homeassistant.const import CONF_HOST as CONF_HOST, CONF_PORT as CONF_PORT, Platform as Platform
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.exceptions import ServiceValidationError as ServiceValidationError
from homeassistant.helpers import discovery_flow as discovery_flow
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC as CONNECTION_NETWORK_MAC, format_mac as format_mac
from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback as AddConfigEntryEntitiesCallback
from homeassistant.helpers.start import async_at_start as async_at_start
from homeassistant.util.dt import utcnow as utcnow
from homeassistant.util.ulid import ulid_now as ulid_now
from lru import LRU
from pysqueezebox import Server as Server
from typing import Any

ATTR_QUERY_RESULT: str
_LOGGER: Incomplete
PARALLEL_UPDATES: int
ATTR_OTHER_PLAYER: str
ATTR_TO_PROPERTY: Incomplete
SQUEEZEBOX_MODE: Incomplete

async def start_server_discovery(hass: HomeAssistant) -> None: ...
async def async_setup_entry(hass: HomeAssistant, entry: SqueezeboxConfigEntry, async_add_entities: AddConfigEntryEntitiesCallback) -> None: ...
def get_announce_volume(extra: dict) -> float | None: ...
def get_announce_timeout(extra: dict) -> int | None: ...

class SqueezeBoxMediaPlayerEntity(SqueezeboxEntity, MediaPlayerEntity):
    _attr_supported_features: Incomplete
    _attr_has_entity_name: bool
    _attr_name: Incomplete
    _last_update: datetime | None
    _query_result: bool | dict
    _remove_dispatcher: Callable | None
    _previous_media_position: int
    _attr_unique_id: Incomplete
    _browse_data: Incomplete
    _synthetic_media_browser_thumbnail_items: LRU[str, str]
    def __init__(self, coordinator: SqueezeBoxPlayerUpdateCoordinator) -> None: ...
    @callback
    def _handle_coordinator_update(self) -> None: ...
    @property
    def volume_step(self) -> float: ...
    @property
    def browse_limit(self) -> int: ...
    @property
    def extra_state_attributes(self) -> dict[str, Any]: ...
    @property
    def state(self) -> MediaPlayerState | None: ...
    async def async_added_to_hass(self) -> None: ...
    async def async_will_remove_from_hass(self) -> None: ...
    @property
    def volume_level(self) -> float | None: ...
    @property
    def is_volume_muted(self) -> bool: ...
    @property
    def media_content_id(self) -> str | None: ...
    @property
    def media_content_type(self) -> MediaType | None: ...
    @property
    def media_duration(self) -> int: ...
    @property
    def media_position(self) -> int: ...
    @property
    def media_position_updated_at(self) -> datetime | None: ...
    @property
    def media_image_url(self) -> str | None: ...
    @property
    def media_title(self) -> str | None: ...
    @property
    def media_channel(self) -> str | None: ...
    @property
    def media_artist(self) -> str | None: ...
    @property
    def media_album_name(self) -> str | None: ...
    @property
    def repeat(self) -> RepeatMode: ...
    @property
    def shuffle(self) -> bool: ...
    @property
    def group_members(self) -> list[str]: ...
    @property
    def query_result(self) -> dict | bool: ...
    async def async_turn_off(self) -> None: ...
    async def async_set_volume_level(self, volume: float) -> None: ...
    async def async_mute_volume(self, mute: bool) -> None: ...
    async def async_media_stop(self) -> None: ...
    async def async_media_play_pause(self) -> None: ...
    async def async_media_play(self) -> None: ...
    async def async_media_pause(self) -> None: ...
    async def async_media_next_track(self) -> None: ...
    async def async_media_previous_track(self) -> None: ...
    async def async_media_seek(self, position: float) -> None: ...
    async def async_turn_on(self) -> None: ...
    async def async_play_media(self, media_type: MediaType | str, media_id: str, announce: bool | None = None, **kwargs: Any) -> None: ...
    async def async_search_media(self, query: SearchMediaQuery) -> SearchMedia: ...
    async def async_set_repeat(self, repeat: RepeatMode) -> None: ...
    async def async_set_shuffle(self, shuffle: bool) -> None: ...
    async def async_clear_playlist(self) -> None: ...
    async def async_call_method(self, command: str, parameters: list[str] | None = None) -> None: ...
    async def async_call_query(self, command: str, parameters: list[str] | None = None) -> None: ...
    async def async_join_players(self, group_members: list[str]) -> None: ...
    async def async_unjoin_player(self) -> None: ...
    def get_synthetic_id_and_cache_url(self, url: str) -> str: ...
    async def async_browse_media(self, media_content_type: MediaType | str | None = None, media_content_id: str | None = None) -> BrowseMedia: ...
    async def async_get_browse_image(self, media_content_type: MediaType | str, media_content_id: str, media_image_id: str | None = None) -> tuple[bytes | None, str | None]: ...
