From 9a8b945118ea49b2816ffd34f9d9b13756524e7f Mon Sep 17 00:00:00 2001 From: ktnrg45 <38207570+ktnrg45@users.noreply.github.com> Date: Fri, 14 Jun 2019 13:47:50 -0700 Subject: [PATCH] PS4 bump to 0.8.3 (#24527) * 0.8.3 * 0.8.3 * 0.8.3 * add unsubscribe method --- homeassistant/components/ps4/manifest.json | 2 +- homeassistant/components/ps4/media_player.py | 8 +++++++- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/ps4/manifest.json b/homeassistant/components/ps4/manifest.json index a94fcd44082..aab01d0eda2 100644 --- a/homeassistant/components/ps4/manifest.json +++ b/homeassistant/components/ps4/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/components/ps4", "requirements": [ - "pyps4-homeassistant==0.8.2" + "pyps4-homeassistant==0.8.3" ], "dependencies": [], "codeowners": [ diff --git a/homeassistant/components/ps4/media_player.py b/homeassistant/components/ps4/media_player.py index 7d51dd4463e..f1d78564674 100644 --- a/homeassistant/components/ps4/media_player.py +++ b/homeassistant/components/ps4/media_player.py @@ -129,6 +129,12 @@ class PS4Device(MediaPlayerDevice): self.hass.data[PS4_DATA].protocol.add_callback( self._ps4, self.status_callback) + @callback + def unsubscribe_to_protocol(self): + """Notify protocol to remove callback.""" + self.hass.data[PS4_DATA].protocol.remove_callback( + self._ps4, self.status_callback) + def check_region(self): """Display logger msg if region is deprecated.""" # Non-Breaking although data returned may be inaccurate. @@ -246,7 +252,7 @@ class PS4Device(MediaPlayerDevice): if title is not None: app_name = title.name art = title.cover_art - # Also assume media type is game if search fails. + # Assume media type is game if not app. if title.game_type != 'App': media_type = MEDIA_TYPE_GAME else: diff --git a/requirements_all.txt b/requirements_all.txt index b26186f4299..f2b314d8a78 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1294,7 +1294,7 @@ pypjlink2==1.2.0 pypoint==1.1.1 # homeassistant.components.ps4 -pyps4-homeassistant==0.8.2 +pyps4-homeassistant==0.8.3 # homeassistant.components.qwikswitch pyqwikswitch==0.93 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index d8478353580..20f8d666033 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -274,7 +274,7 @@ pyopenuv==1.0.9 pyotp==2.2.7 # homeassistant.components.ps4 -pyps4-homeassistant==0.8.2 +pyps4-homeassistant==0.8.3 # homeassistant.components.qwikswitch pyqwikswitch==0.93