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:
Chris Talkington 2020-06-21 14:29:39 -05:00 committed by GitHub
parent 59e43ab6e4
commit a6536bb622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 59 additions and 3 deletions

View File

@ -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",

View File

@ -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

View File

@ -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

View File

@ -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)

View 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>

View File

@ -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>

View File

@ -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>

View 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>

View 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>

View 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>

View 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>