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>pull/49628/merge
parent
f4dc72c0bd
commit
e9ff4b1342
|
@ -40,6 +40,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import HomeAssistant, State, callback
|
||||
from homeassistant.helpers import network
|
||||
from homeassistant.helpers.entity import entity_sources
|
||||
from homeassistant.util.decorator import Registry
|
||||
|
||||
from .capabilities import (
|
||||
|
@ -615,7 +616,13 @@ class MediaPlayerCapabilities(AlexaEntity):
|
|||
if supported & media_player.const.SUPPORT_PLAY_MEDIA:
|
||||
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(
|
||||
self.entity.attributes.get(media_player.const.ATTR_SOUND_MODE_LIST, [])
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue