Use quickplay when casting splash for mediaplayer.turn_on (#69866)
This commit is contained in:
parent
80ff1ecb2a
commit
1645ab25a6
2 changed files with 10 additions and 4 deletions
|
@ -1157,7 +1157,7 @@ async def test_entity_media_content_type(hass: HomeAssistant):
|
|||
assert state.attributes.get("media_content_type") == "movie"
|
||||
|
||||
|
||||
async def test_entity_control(hass: HomeAssistant):
|
||||
async def test_entity_control(hass: HomeAssistant, quick_play_mock):
|
||||
"""Test various device and media controls."""
|
||||
entity_id = "media_player.speaker"
|
||||
reg = er.async_get(hass)
|
||||
|
@ -1200,8 +1200,13 @@ async def test_entity_control(hass: HomeAssistant):
|
|||
|
||||
# Turn on
|
||||
await common.async_turn_on(hass, entity_id)
|
||||
chromecast.play_media.assert_called_once_with(
|
||||
"https://www.home-assistant.io/images/cast/splash.png", "image/png"
|
||||
quick_play_mock.assert_called_once_with(
|
||||
chromecast,
|
||||
"default_media_receiver",
|
||||
{
|
||||
"media_id": "https://www.home-assistant.io/images/cast/splash.png",
|
||||
"media_type": "image/png",
|
||||
},
|
||||
)
|
||||
chromecast.quit_app.reset_mock()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue