mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 13:27:09 +00:00
Update rokuecp to 0.5.0 (#36975)
* update rokuecp to 0.5.0 * Update requirements_all.txt * Update requirements_test_all.txt * add aiohttp mock for media-player * Create media-player-close.xml * Update media-player-close.xml * Create media-player-play.xml * Create active-app-pluto.xml * Update apps.xml * Update apps-tv.xml * Create media-player-pause.xml * Create media-player-live.xml * Update __init__.py
This commit is contained in:
parent
59e43ab6e4
commit
a6536bb622
@ -2,7 +2,7 @@
|
||||
"domain": "roku",
|
||||
"name": "Roku",
|
||||
"documentation": "https://www.home-assistant.io/integrations/roku",
|
||||
"requirements": ["rokuecp==0.4.2"],
|
||||
"requirements": ["rokuecp==0.5.0"],
|
||||
"ssdp": [
|
||||
{
|
||||
"st": "roku:ecp",
|
||||
|
@ -1890,7 +1890,7 @@ rjpl==0.3.5
|
||||
rocketchat-API==0.6.1
|
||||
|
||||
# homeassistant.components.roku
|
||||
rokuecp==0.4.2
|
||||
rokuecp==0.5.0
|
||||
|
||||
# homeassistant.components.roomba
|
||||
roombapy==1.6.1
|
||||
|
@ -802,7 +802,7 @@ rflink==0.0.52
|
||||
ring_doorbell==0.6.0
|
||||
|
||||
# homeassistant.components.roku
|
||||
rokuecp==0.4.2
|
||||
rokuecp==0.5.0
|
||||
|
||||
# homeassistant.components.roomba
|
||||
roombapy==1.6.1
|
||||
|
@ -33,6 +33,7 @@ def mock_connection(
|
||||
app: str = "roku",
|
||||
host: str = HOST,
|
||||
power: bool = True,
|
||||
media_state: str = "close",
|
||||
error: bool = False,
|
||||
server_error: bool = False,
|
||||
) -> None:
|
||||
@ -89,6 +90,12 @@ def mock_connection(
|
||||
headers={"Content-Type": "text/xml"},
|
||||
)
|
||||
|
||||
aioclient_mock.get(
|
||||
f"{roku_url}/query/media-player",
|
||||
text=load_fixture(f"roku/media-player-{media_state}.xml"),
|
||||
headers={"Content-Type": "text/xml"},
|
||||
)
|
||||
|
||||
aioclient_mock.post(
|
||||
re.compile(f"{roku_url}/keypress/.*"), text="OK",
|
||||
)
|
||||
@ -145,6 +152,7 @@ async def setup_integration(
|
||||
unique_id: str = UPNP_SERIAL,
|
||||
error: bool = False,
|
||||
power: bool = True,
|
||||
media_state: str = "close",
|
||||
server_error: bool = False,
|
||||
skip_entry_setup: bool = False,
|
||||
) -> MockConfigEntry:
|
||||
@ -161,6 +169,7 @@ async def setup_integration(
|
||||
host=host,
|
||||
error=error,
|
||||
power=power,
|
||||
media_state=media_state,
|
||||
server_error=server_error,
|
||||
)
|
||||
await hass.config_entries.async_setup(entry.entry_id)
|
||||
|
4
tests/fixtures/roku/active-app-pluto.xml
vendored
Normal file
4
tests/fixtures/roku/active-app-pluto.xml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<active-app>
|
||||
<app id="74519" subtype="rsga" type="appl" version="5.2.0">Pluto TV - It's Free TV</app>
|
||||
</active-app>
|
1
tests/fixtures/roku/apps-tv.xml
vendored
1
tests/fixtures/roku/apps-tv.xml
vendored
@ -10,4 +10,5 @@
|
||||
<app id="26">Free FrameChannel Service</app>
|
||||
<app id="27">Mediafly</app>
|
||||
<app id="28">Pandora</app>
|
||||
<app id="74519" subtype="rsga" type="appl" version="5.2.0">Pluto TV - It's Free TV</app>
|
||||
</apps>
|
||||
|
1
tests/fixtures/roku/apps.xml
vendored
1
tests/fixtures/roku/apps.xml
vendored
@ -7,4 +7,5 @@
|
||||
<app id="26">Free FrameChannel Service</app>
|
||||
<app id="27">Mediafly</app>
|
||||
<app id="28">Pandora</app>
|
||||
<app id="74519" subtype="rsga" type="appl" version="5.2.0">Pluto TV - It's Free TV</app>
|
||||
</apps>
|
||||
|
5
tests/fixtures/roku/media-player-close.xml
vendored
Normal file
5
tests/fixtures/roku/media-player-close.xml
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<player error="false" state="close">
|
||||
<format audio="eac3" captions="none" drm="none" video="hevc_b"/>
|
||||
<is_live>false</is_live>
|
||||
</player>
|
12
tests/fixtures/roku/media-player-live.xml
vendored
Normal file
12
tests/fixtures/roku/media-player-live.xml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<player error="false" state="play">
|
||||
<plugin bandwidth="10000000 bps" id="74519" name="Pluto TV - It's Free TV"/>
|
||||
<format audio="aac_adts" captions="webvtt" container="hls" drm="none" video="mpeg4_10b"/>
|
||||
<buffering current="1000" max="1000" target="0"/>
|
||||
<new_stream speed="128000 bps"/>
|
||||
<position>73313 ms</position>
|
||||
<duration>95000 ms</duration>
|
||||
<is_live>true</is_live>
|
||||
<runtime>25106 ms</runtime>
|
||||
<stream_segment bitrate="3063648" media_sequence="49" segment_type="mux" time="70013"/>
|
||||
</player>
|
12
tests/fixtures/roku/media-player-pause.xml
vendored
Normal file
12
tests/fixtures/roku/media-player-pause.xml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<player error="false" state="pause">
|
||||
<plugin bandwidth="10000000 bps" id="74519" name="Pluto TV - It's Free TV"/>
|
||||
<format audio="aac_adts" captions="webvtt" container="hls" drm="none" video="mpeg4_10b"/>
|
||||
<buffering current="1000" max="1000" target="0"/>
|
||||
<new_stream speed="128000 bps"/>
|
||||
<position>313813 ms</position>
|
||||
<duration>6496762 ms</duration>
|
||||
<is_live>false</is_live>
|
||||
<runtime>15000 ms</runtime>
|
||||
<stream_segment bitrate="3063648" media_sequence="61" segment_type="mux" time="310013"/>
|
||||
</player>
|
12
tests/fixtures/roku/media-player-play.xml
vendored
Normal file
12
tests/fixtures/roku/media-player-play.xml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<player error="false" state="play">
|
||||
<plugin bandwidth="10000000 bps" id="74519" name="Pluto TV - It's Free TV"/>
|
||||
<format audio="aac_adts" captions="webvtt" container="hls" drm="none" video="mpeg4_10b"/>
|
||||
<buffering current="1000" max="1000" target="0"/>
|
||||
<new_stream speed="128000 bps"/>
|
||||
<position>38813 ms</position>
|
||||
<duration>6496762 ms</duration>
|
||||
<is_live>false</is_live>
|
||||
<runtime>15000 ms</runtime>
|
||||
<stream_segment bitrate="2000" media_sequence="68" segment_type="captions" time="39013"/>
|
||||
</player>
|
Loading…
x
Reference in New Issue
Block a user