mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Apple TV should return all supported features (#12167)
This commit is contained in:
parent
70760b5d3b
commit
7145afe729
@ -25,6 +25,10 @@ DEPENDENCIES = ['apple_tv']
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_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
|
@asyncio.coroutine
|
||||||
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||||
@ -196,14 +200,7 @@ class AppleTvDevice(MediaPlayerDevice):
|
|||||||
@property
|
@property
|
||||||
def supported_features(self):
|
def supported_features(self):
|
||||||
"""Flag media player features that are supported."""
|
"""Flag media player features that are supported."""
|
||||||
features = SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_PLAY_MEDIA
|
return SUPPORT_APPLE_TV
|
||||||
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
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def async_turn_on(self):
|
def async_turn_on(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user