mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix alexa not discovering devices when sound mode device present (#49628)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io> Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
f4dc72c0bd
commit
e9ff4b1342
@ -40,6 +40,7 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant, State, callback
|
from homeassistant.core import HomeAssistant, State, callback
|
||||||
from homeassistant.helpers import network
|
from homeassistant.helpers import network
|
||||||
|
from homeassistant.helpers.entity import entity_sources
|
||||||
from homeassistant.util.decorator import Registry
|
from homeassistant.util.decorator import Registry
|
||||||
|
|
||||||
from .capabilities import (
|
from .capabilities import (
|
||||||
@ -615,7 +616,13 @@ class MediaPlayerCapabilities(AlexaEntity):
|
|||||||
if supported & media_player.const.SUPPORT_PLAY_MEDIA:
|
if supported & media_player.const.SUPPORT_PLAY_MEDIA:
|
||||||
yield AlexaChannelController(self.entity)
|
yield AlexaChannelController(self.entity)
|
||||||
|
|
||||||
if supported & media_player.const.SUPPORT_SELECT_SOUND_MODE:
|
# AlexaEqualizerController is disabled for denonavr
|
||||||
|
# since it blocks alexa from discovering any devices.
|
||||||
|
domain = entity_sources(self.hass).get(self.entity_id, {}).get("domain")
|
||||||
|
if (
|
||||||
|
supported & media_player.const.SUPPORT_SELECT_SOUND_MODE
|
||||||
|
and domain != "denonavr"
|
||||||
|
):
|
||||||
inputs = AlexaEqualizerController.get_valid_inputs(
|
inputs = AlexaEqualizerController.get_valid_inputs(
|
||||||
self.entity.attributes.get(media_player.const.ATTR_SOUND_MODE_LIST, [])
|
self.entity.attributes.get(media_player.const.ATTR_SOUND_MODE_LIST, [])
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user