From 741d0fd09b410e816de5e7d4c904cfe6c776ac6b Mon Sep 17 00:00:00 2001 From: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com> Date: Thu, 2 May 2019 00:39:59 -0500 Subject: [PATCH] Bump pyheos (#23616) --- homeassistant/components/heos/__init__.py | 2 +- homeassistant/components/heos/manifest.json | 2 +- homeassistant/components/heos/media_player.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/heos/test_init.py | 2 +- tests/components/heos/test_media_player.py | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/heos/__init__.py b/homeassistant/components/heos/__init__.py index 529ee27997e..334c2572e74 100644 --- a/homeassistant/components/heos/__init__.py +++ b/homeassistant/components/heos/__init__.py @@ -195,7 +195,7 @@ class SourceManager: exc_info=isinstance(error, CommandError)) return - async def update_sources(event): + async def update_sources(event, data): if event in (const.EVENT_SOURCES_CHANGED, const.EVENT_USER_CHANGED): sources = await get_sources() diff --git a/homeassistant/components/heos/manifest.json b/homeassistant/components/heos/manifest.json index 5b0a8e67893..3faa346988c 100644 --- a/homeassistant/components/heos/manifest.json +++ b/homeassistant/components/heos/manifest.json @@ -3,7 +3,7 @@ "name": "Heos", "documentation": "https://www.home-assistant.io/components/heos", "requirements": [ - "pyheos==0.4.1" + "pyheos==0.5.1" ], "dependencies": [], "codeowners": [ diff --git a/homeassistant/components/heos/media_player.py b/homeassistant/components/heos/media_player.py index e2a5b3177e0..739667f5834 100644 --- a/homeassistant/components/heos/media_player.py +++ b/homeassistant/components/heos/media_player.py @@ -78,7 +78,7 @@ class HeosMediaPlayer(MediaPlayerDevice): const.CONTROL_PLAY_NEXT: SUPPORT_NEXT_TRACK } - async def _controller_event(self, event): + async def _controller_event(self, event, data): """Handle controller event.""" from pyheos import const if event == const.EVENT_PLAYERS_CHANGED: diff --git a/requirements_all.txt b/requirements_all.txt index 1e0a19778e3..c2a8f6b90d6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1073,7 +1073,7 @@ pygtt==1.1.2 pyhaversion==2.2.1 # homeassistant.components.heos -pyheos==0.4.1 +pyheos==0.5.1 # homeassistant.components.hikvision pyhik==0.2.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 25d1f54105b..dc1e770aa50 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -217,7 +217,7 @@ pydeconz==54 pydispatcher==2.0.5 # homeassistant.components.heos -pyheos==0.4.1 +pyheos==0.5.1 # homeassistant.components.homematic pyhomematic==0.1.58 diff --git a/tests/components/heos/test_init.py b/tests/components/heos/test_init.py index 408b2f7d088..2276f4ce2eb 100644 --- a/tests/components/heos/test_init.py +++ b/tests/components/heos/test_init.py @@ -161,7 +161,7 @@ async def test_update_sources_retry(hass, config_entry, config, controller, source_manager.max_retry_attempts = 1 controller.get_favorites.side_effect = CommandError("Test", "test", 0) controller.dispatcher.send( - const.SIGNAL_CONTROLLER_EVENT, const.EVENT_SOURCES_CHANGED) + const.SIGNAL_CONTROLLER_EVENT, const.EVENT_SOURCES_CHANGED, {}) # Wait until it's finished while "Unable to update sources" not in caplog.text: await asyncio.sleep(0.1) diff --git a/tests/components/heos/test_media_player.py b/tests/components/heos/test_media_player.py index 4888018af04..d2a1abf72f6 100644 --- a/tests/components/heos/test_media_player.py +++ b/tests/components/heos/test_media_player.py @@ -103,7 +103,7 @@ async def test_updates_start_from_signals( # Test controller player change updates player.available = False player.heos.dispatcher.send( - const.SIGNAL_CONTROLLER_EVENT, const.EVENT_PLAYERS_CHANGED) + const.SIGNAL_CONTROLLER_EVENT, const.EVENT_PLAYERS_CHANGED, {}) await hass.async_block_till_done() state = hass.states.get('media_player.test_player') assert state.state == STATE_UNAVAILABLE @@ -158,7 +158,7 @@ async def test_updates_from_sources_updated( input_sources.clear() player.heos.dispatcher.send( - const.SIGNAL_CONTROLLER_EVENT, const.EVENT_SOURCES_CHANGED) + const.SIGNAL_CONTROLLER_EVENT, const.EVENT_SOURCES_CHANGED, {}) await event.wait() source_list = hass.data[DOMAIN][DATA_SOURCE_MANAGER].source_list assert len(source_list) == 2 @@ -181,7 +181,7 @@ async def test_updates_from_user_changed( controller.is_signed_in = False controller.signed_in_username = None player.heos.dispatcher.send( - const.SIGNAL_CONTROLLER_EVENT, const.EVENT_USER_CHANGED) + const.SIGNAL_CONTROLLER_EVENT, const.EVENT_USER_CHANGED, None) await event.wait() source_list = hass.data[DOMAIN][DATA_SOURCE_MANAGER].source_list assert len(source_list) == 1