From 55031e6ea497b3219d90dc3a602b97172651c977 Mon Sep 17 00:00:00 2001
From: Jeff Irion <JeffLIrion@users.noreply.github.com>
Date: Fri, 23 Aug 2019 06:58:24 -0700
Subject: [PATCH] Bump androidtv to 0.0.24 (#26158)

* Bump androidtv to 0.0.24

* Add unique ID for Fire TV (not just Android TV)
---
 homeassistant/components/androidtv/manifest.json  |  2 +-
 .../components/androidtv/media_player.py          | 15 ++++++++-------
 requirements_all.txt                              |  2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/homeassistant/components/androidtv/manifest.json b/homeassistant/components/androidtv/manifest.json
index 24eb61d52b0..047eaaaf5db 100644
--- a/homeassistant/components/androidtv/manifest.json
+++ b/homeassistant/components/androidtv/manifest.json
@@ -3,7 +3,7 @@
   "name": "Androidtv",
   "documentation": "https://www.home-assistant.io/components/androidtv",
   "requirements": [
-    "androidtv==0.0.23"
+    "androidtv==0.0.24"
   ],
   "dependencies": [],
   "codeowners": ["@JeffLIrion"]
diff --git a/homeassistant/components/androidtv/media_player.py b/homeassistant/components/androidtv/media_player.py
index ef9293381fd..db4ff9e851e 100644
--- a/homeassistant/components/androidtv/media_player.py
+++ b/homeassistant/components/androidtv/media_player.py
@@ -270,6 +270,9 @@ class ADBDevice(MediaPlayerDevice):
         self._apps.update(apps)
         self._keys = KEYS
 
+        self._device_properties = self.aftv.device_properties
+        self._unique_id = self._device_properties.get("serialno")
+
         self.turn_on_command = turn_on_command
         self.turn_off_command = turn_off_command
 
@@ -338,6 +341,11 @@ class ADBDevice(MediaPlayerDevice):
         """Return the state of the player."""
         return self._state
 
+    @property
+    def unique_id(self):
+        """Return the device unique id."""
+        return self._unique_id
+
     @adb_decorator()
     def media_play(self):
         """Send play command."""
@@ -412,9 +420,7 @@ class AndroidTVDevice(ADBDevice):
         super().__init__(aftv, name, apps, turn_on_command, turn_off_command)
 
         self._device = None
-        self._device_properties = self.aftv.device_properties
         self._is_volume_muted = None
-        self._unique_id = self._device_properties.get("serialno")
         self._volume_level = None
 
     @adb_decorator(override_available=True)
@@ -454,11 +460,6 @@ class AndroidTVDevice(ADBDevice):
         """Flag media player features that are supported."""
         return SUPPORT_ANDROIDTV
 
-    @property
-    def unique_id(self):
-        """Return the device unique id."""
-        return self._unique_id
-
     @property
     def volume_level(self):
         """Return the volume level."""
diff --git a/requirements_all.txt b/requirements_all.txt
index c8e79616e17..f10b74b9594 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -194,7 +194,7 @@ ambiclimate==0.2.0
 amcrest==1.5.3
 
 # homeassistant.components.androidtv
-androidtv==0.0.23
+androidtv==0.0.24
 
 # homeassistant.components.anel_pwrctrl
 anel_pwrctrl-homeassistant==0.0.1.dev2
-- 
GitLab