diff --git a/homeassistant/components/media_player/reproduce_state.py b/homeassistant/components/media_player/reproduce_state.py index 47d365ff75a..131366ed95b 100644 --- a/homeassistant/components/media_player/reproduce_state.py +++ b/homeassistant/components/media_player/reproduce_state.py @@ -83,18 +83,7 @@ async def _async_reproduce_states( cur_state = hass.states.get(state.entity_id) features = cur_state.attributes[ATTR_SUPPORTED_FEATURES] if cur_state else 0 - if ( - ATTR_MEDIA_VOLUME_LEVEL in state.attributes - and features & MediaPlayerEntityFeature.VOLUME_SET - ): - await call_service(SERVICE_VOLUME_SET, [ATTR_MEDIA_VOLUME_LEVEL]) - - if ( - ATTR_MEDIA_VOLUME_MUTED in state.attributes - and features & MediaPlayerEntityFeature.VOLUME_MUTE - ): - await call_service(SERVICE_VOLUME_MUTE, [ATTR_MEDIA_VOLUME_MUTED]) - + # First set source & sound mode to match the saved supported features if ( ATTR_INPUT_SOURCE in state.attributes and features & MediaPlayerEntityFeature.SELECT_SOURCE @@ -107,6 +96,18 @@ async def _async_reproduce_states( ): await call_service(SERVICE_SELECT_SOUND_MODE, [ATTR_SOUND_MODE]) + if ( + ATTR_MEDIA_VOLUME_LEVEL in state.attributes + and features & MediaPlayerEntityFeature.VOLUME_SET + ): + await call_service(SERVICE_VOLUME_SET, [ATTR_MEDIA_VOLUME_LEVEL]) + + if ( + ATTR_MEDIA_VOLUME_MUTED in state.attributes + and features & MediaPlayerEntityFeature.VOLUME_MUTE + ): + await call_service(SERVICE_VOLUME_MUTE, [ATTR_MEDIA_VOLUME_MUTED]) + already_playing = False if (ATTR_MEDIA_CONTENT_TYPE in state.attributes) and (