From 8e150ff1f53e14f60dc93ed9ba3d7e1a15dc53af Mon Sep 17 00:00:00 2001 From: Erik Montnemery <erik@montnemery.com> Date: Tue, 21 Apr 2020 07:57:39 +0200 Subject: [PATCH] Bump pychromecast (#34466) * Bump pychromecast * Fix tests --- homeassistant/components/cast/manifest.json | 2 +- homeassistant/components/cast/media_player.py | 3 +-- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/cast/test_media_player.py | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/cast/manifest.json b/homeassistant/components/cast/manifest.json index 0a7ce383118..b8ad1fe67cc 100644 --- a/homeassistant/components/cast/manifest.json +++ b/homeassistant/components/cast/manifest.json @@ -3,7 +3,7 @@ "name": "Google Cast", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/cast", - "requirements": ["pychromecast==4.2.3"], + "requirements": ["pychromecast==5.0.0"], "after_dependencies": ["cloud"], "zeroconf": ["_googlecast._tcp.local."], "codeowners": ["@emontnemery"] diff --git a/homeassistant/components/cast/media_player.py b/homeassistant/components/cast/media_player.py index dadd528c649..c1729850189 100644 --- a/homeassistant/components/cast/media_player.py +++ b/homeassistant/components/cast/media_player.py @@ -260,7 +260,6 @@ class CastDevice(MediaPlayerDevice): # will automatically be picked up. return - # pylint: disable=protected-access _LOGGER.debug( "[%s %s (%s:%s)] Connecting to cast device by service %s", self.entity_id, @@ -270,7 +269,7 @@ class CastDevice(MediaPlayerDevice): self.services, ) chromecast = await self.hass.async_add_executor_job( - pychromecast._get_chromecast_from_service, + pychromecast.get_chromecast_from_service, ( self.services, ChromeCastZeroconf.get_zeroconf(), diff --git a/requirements_all.txt b/requirements_all.txt index 302ef871253..7ee219b8699 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1211,7 +1211,7 @@ pycfdns==0.0.1 pychannels==1.0.0 # homeassistant.components.cast -pychromecast==4.2.3 +pychromecast==5.0.0 # homeassistant.components.cmus pycmus==0.1.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 170b56b936b..b0a3673430d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -484,7 +484,7 @@ pyblackbird==0.5 pybotvac==0.0.17 # homeassistant.components.cast -pychromecast==4.2.3 +pychromecast==5.0.0 # homeassistant.components.coolmaster pycoolmasternet==0.0.4 diff --git a/tests/components/cast/test_media_player.py b/tests/components/cast/test_media_player.py index f241b79f26e..41cc50f33ae 100644 --- a/tests/components/cast/test_media_player.py +++ b/tests/components/cast/test_media_player.py @@ -114,7 +114,7 @@ async def async_setup_media_player_cast(hass: HomeAssistantType, info: Chromecas cast.CastStatusListener = MagicMock() with patch( - "homeassistant.components.cast.discovery.pychromecast._get_chromecast_from_service", + "homeassistant.components.cast.discovery.pychromecast.get_chromecast_from_service", return_value=chromecast, ) as get_chromecast, patch( "homeassistant.components.cast.discovery.pychromecast.start_discovery", -- GitLab