mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 23:55:07 +02:00
Yield PowerController only is supported.
This commit is contained in:
@@ -503,9 +503,13 @@ class MediaPlayerCapabilities(AlexaEntity):
|
|||||||
|
|
||||||
def interfaces(self):
|
def interfaces(self):
|
||||||
"""Yield the supported interfaces."""
|
"""Yield the supported interfaces."""
|
||||||
yield AlexaPowerController(self.entity)
|
|
||||||
|
|
||||||
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
|
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:
|
if supported & media_player.const.SUPPORT_VOLUME_SET:
|
||||||
yield AlexaSpeaker(self.entity)
|
yield AlexaSpeaker(self.entity)
|
||||||
elif supported & media_player.const.SUPPORT_VOLUME_STEP:
|
elif supported & media_player.const.SUPPORT_VOLUME_STEP:
|
||||||
|
Reference in New Issue
Block a user