From 29266213a0ea0c9b21a167f40b9f1f7e31f0ef8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Tue, 18 Jul 2017 20:19:36 +0200 Subject: [PATCH] Fix support for multiple Apple TVs (#8539) --- homeassistant/components/apple_tv.py | 2 +- homeassistant/components/remote/apple_tv.py | 5 +++++ requirements_all.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/apple_tv.py b/homeassistant/components/apple_tv.py index 948caa27538..c5f40ca5db8 100644 --- a/homeassistant/components/apple_tv.py +++ b/homeassistant/components/apple_tv.py @@ -17,7 +17,7 @@ from homeassistant.helpers import discovery from homeassistant.components.discovery import SERVICE_APPLE_TV import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pyatv==0.3.2'] +REQUIREMENTS = ['pyatv==0.3.4'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/remote/apple_tv.py b/homeassistant/components/remote/apple_tv.py index a7ea113c2db..e89234c60ac 100644 --- a/homeassistant/components/remote/apple_tv.py +++ b/homeassistant/components/remote/apple_tv.py @@ -44,6 +44,11 @@ class AppleTVRemote(remote.RemoteDevice): """Return the name of the device.""" return self._name + @property + def unique_id(self): + """Return an unique ID.""" + return self._atv.metadata.device_id + @property def is_on(self): """Return true if device is on.""" diff --git a/requirements_all.txt b/requirements_all.txt index 5cb1e676b27..0eccc3c0aa2 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -519,7 +519,7 @@ pyasn1-modules==0.0.9 pyasn1==0.2.3 # homeassistant.components.apple_tv -pyatv==0.3.2 +pyatv==0.3.4 # homeassistant.components.device_tracker.bbox # homeassistant.components.sensor.bbox