diff --git a/custom_components/mass/manifest.json b/custom_components/mass/manifest.json index 95f2fc74..cdedf25a 100644 --- a/custom_components/mass/manifest.json +++ b/custom_components/mass/manifest.json @@ -8,7 +8,7 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/music-assistant/hass-music-assistant/issues", "loggers": ["music_assistant"], - "requirements": ["music-assistant-client==1.0.5"], + "requirements": ["music-assistant-client==1.0.6"], "version": "0.0.0", "zeroconf": ["_mass._tcp.local."] } diff --git a/custom_components/mass/media_player.py b/custom_components/mass/media_player.py index 6e49eb32..08758b60 100644 --- a/custom_components/mass/media_player.py +++ b/custom_components/mass/media_player.py @@ -23,12 +23,10 @@ MediaPlayerEntity, MediaPlayerEntityFeature, MediaPlayerState, -) -from homeassistant.components.media_player import MediaType as HAMediaType -from homeassistant.components.media_player import ( RepeatMode, async_process_play_media_url, ) +from homeassistant.components.media_player import MediaType as HAMediaType from homeassistant.config_entries import ConfigEntryState from homeassistant.const import STATE_OFF from homeassistant.core import HomeAssistant, ServiceResponse, SupportsResponse @@ -39,9 +37,13 @@ async_get_current_platform, ) from homeassistant.util.dt import utc_from_timestamp -from music_assistant_models.enums import EventType, MediaType, PlayerFeature +from music_assistant_models.enums import ( + EventType, + MediaType, + PlayerFeature, + QueueOption, +) from music_assistant_models.enums import PlayerState as MassPlayerState -from music_assistant_models.enums import QueueOption from music_assistant_models.enums import RepeatMode as MassRepeatMode from music_assistant_models.errors import MediaNotFoundError, MusicAssistantError from music_assistant_models.event import MassEvent @@ -102,9 +104,9 @@ ATTR_AUTO_PLAY = "auto_play" -def catch_musicassistant_error[_R, **P]( - func: Callable[..., Awaitable[_R]], -) -> Callable[..., Coroutine[Any, Any, _R | None]]: +def catch_musicassistant_error[ + _R, **P +](func: Callable[..., Awaitable[_R]]) -> Callable[..., Coroutine[Any, Any, _R | None]]: """Check and log commands to players.""" @functools.wraps(func) @@ -275,7 +277,7 @@ async def async_on_update(self) -> None: for child_id in player.group_childs if ( entity_id := entity_registry.async_get_entity_id( - self.platform.domain, DOMAIN, child_id + self.platform.domain, DOMAIN, f"mass_{child_id}" ) ) ]