mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Update StepSpeaker and Speaker interfaces in Alexa (#31444)
* Yield only one Speaker interface.
* Yield PowerController only is supported.
* Revert "Yield PowerController only is supported."
This reverts commit c0dbf7e4
* Add Alexa.Speaker interface properties.
* Refactor tests for Alexa.Speaker and Alexa.StepSpeaker.
* Code Smell Change.
* Fix R1705: Unnecessary "elif" after "return".
This commit is contained in:
@@ -508,12 +508,7 @@ class MediaPlayerCapabilities(AlexaEntity):
|
||||
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
|
||||
if supported & media_player.const.SUPPORT_VOLUME_SET:
|
||||
yield AlexaSpeaker(self.entity)
|
||||
|
||||
step_volume_features = (
|
||||
media_player.const.SUPPORT_VOLUME_MUTE
|
||||
| media_player.const.SUPPORT_VOLUME_STEP
|
||||
)
|
||||
if supported & step_volume_features:
|
||||
elif supported & media_player.const.SUPPORT_VOLUME_STEP:
|
||||
yield AlexaStepSpeaker(self.entity)
|
||||
|
||||
playback_features = (
|
||||
|
||||
Reference in New Issue
Block a user