From c96606df6896bd72bdb1611af11289e87386da41 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 20 Dec 2021 14:28:02 +0100 Subject: [PATCH] Don't use the homeassistant media app when casting media (#62385) --- homeassistant/components/cast/media_player.py | 2 +- tests/components/cast/test_media_player.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/cast/media_player.py b/homeassistant/components/cast/media_player.py index 61922a4cd8b..b687f96948b 100644 --- a/homeassistant/components/cast/media_player.py +++ b/homeassistant/components/cast/media_player.py @@ -526,7 +526,7 @@ class CastDevice(MediaPlayerEntity): controller.play_media(media) else: app_data = {"media_id": media_id, "media_type": media_type, **extra} - quick_play(self._chromecast, "homeassistant_media", app_data) + quick_play(self._chromecast, "default_media_receiver", app_data) def _media_status(self): """ diff --git a/tests/components/cast/test_media_player.py b/tests/components/cast/test_media_player.py index 85562f39761..dae9981ae67 100644 --- a/tests/components/cast/test_media_player.py +++ b/tests/components/cast/test_media_player.py @@ -791,7 +791,7 @@ async def test_entity_play_media(hass: HomeAssistant, quick_play_mock): chromecast.media_controller.play_media.assert_not_called() quick_play_mock.assert_called_once_with( chromecast, - "homeassistant_media", + "default_media_receiver", { "media_id": "best.mp3", "media_type": "audio", @@ -907,7 +907,7 @@ async def test_entity_play_media_sign_URL(hass: HomeAssistant, quick_play_mock): # Play_media await common.async_play_media(hass, "audio", "/best.mp3", entity_id) quick_play_mock.assert_called_once_with( - chromecast, "homeassistant_media", {"media_id": ANY, "media_type": "audio"} + chromecast, "default_media_receiver", {"media_id": ANY, "media_type": "audio"} ) assert quick_play_mock.call_args[0][2]["media_id"].startswith( "http://example.com:8123/best.mp3?authSig=" @@ -1311,7 +1311,7 @@ async def test_group_media_control(hass, mz_mock, quick_play_mock): assert not chromecast.media_controller.play_media.called quick_play_mock.assert_called_once_with( chromecast, - "homeassistant_media", + "default_media_receiver", {"media_id": "best.mp3", "media_type": "music"}, )