diff --git a/custom_components/hass_agent/media_player.py b/custom_components/hass_agent/media_player.py index b4f4bb9..598dd33 100644 --- a/custom_components/hass_agent/media_player.py +++ b/custom_components/hass_agent/media_player.py @@ -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, @@ -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 @@ -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