mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Yield PowerController only is supported.
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user