From 7145afe7294bd8fbc5dfc996f574ebdd8a3a8456 Mon Sep 17 00:00:00 2001 From: Richard Lucas Date: Sun, 4 Mar 2018 15:04:11 -0800 Subject: [PATCH] Apple TV should return all supported features (#12167) --- homeassistant/components/media_player/apple_tv.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/media_player/apple_tv.py b/homeassistant/components/media_player/apple_tv.py index 4c5145ce1a4..37a50b39e95 100644 --- a/homeassistant/components/media_player/apple_tv.py +++ b/homeassistant/components/media_player/apple_tv.py @@ -25,6 +25,10 @@ DEPENDENCIES = ['apple_tv'] _LOGGER = logging.getLogger(__name__) +SUPPORT_APPLE_TV = SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_PLAY_MEDIA | \ + SUPPORT_PAUSE | SUPPORT_PLAY | SUPPORT_SEEK | \ + SUPPORT_STOP | SUPPORT_NEXT_TRACK | SUPPORT_PREVIOUS_TRACK + @asyncio.coroutine def async_setup_platform(hass, config, async_add_devices, discovery_info=None): @@ -196,14 +200,7 @@ class AppleTvDevice(MediaPlayerDevice): @property def supported_features(self): """Flag media player features that are supported.""" - features = SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_PLAY_MEDIA - if self._playing is None or self.state == STATE_IDLE: - return features - - features |= SUPPORT_PAUSE | SUPPORT_PLAY | SUPPORT_SEEK | \ - SUPPORT_STOP | SUPPORT_NEXT_TRACK | SUPPORT_PREVIOUS_TRACK - - return features + return SUPPORT_APPLE_TV @asyncio.coroutine def async_turn_on(self):