Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions custom_components/hass_agent/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
MediaPlayerEntityFeature,
)

from homeassistant.components.media_player.const import MEDIA_TYPE_MUSIC
from homeassistant.components.media_player import MediaType

from homeassistant.components.media_player.browse_media import (
BrowseMedia,
Expand Down Expand Up @@ -232,7 +232,7 @@ def device_class(self):
@property
def media_content_type(self):
"""Content type of current playing media"""
return MEDIA_TYPE_MUSIC
return MediaType.MUSIC

async def async_media_seek(self, position: float) -> None:
self._attr_media_position = position
Expand Down Expand Up @@ -293,7 +293,7 @@ async def async_play_media(self, media_type: str, media_id: str, **kwargs: Any):
_logger.error(
"Invalid media type %r. Only %s is supported!",
media_type,
MEDIA_TYPE_MUSIC,
MediaType.MUSIC,
)
return

Expand Down