Skip to content

Commit

Permalink
fix group_members attribute + bump lib
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Nov 12, 2024
1 parent 9aa4677 commit f623683
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion custom_components/mass/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."]
}
20 changes: 11 additions & 9 deletions custom_components/mass/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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}"
)
)
]
Expand Down

0 comments on commit f623683

Please sign in to comment.