Yield PowerController only is supported.
This commit is contained in:
parent
0287ffc202
commit
c0dbf7e4f4
1 changed files with 6 additions and 2 deletions
|
@ -503,9 +503,13 @@ class MediaPlayerCapabilities(AlexaEntity):
|
|||
|
||||
def interfaces(self):
|
||||
"""Yield the supported interfaces."""
|
||||
yield AlexaPowerController(self.entity)
|
||||
|
||||
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
|
||||
|
||||
if supported & (
|
||||
media_player.const.SUPPORT_TURN_OFF | media_player.const.SUPPORT_TURN_ON
|
||||
):
|
||||
yield AlexaPowerController(self.entity)
|
||||
|
||||
if supported & media_player.const.SUPPORT_VOLUME_SET:
|
||||
yield AlexaSpeaker(self.entity)
|
||||
elif supported & media_player.const.SUPPORT_VOLUME_STEP:
|
||||
|
|
Loading…
Add table
Reference in a new issue