diff --git a/custom_components/alexa_media/alexa_entity.py b/custom_components/alexa_media/alexa_entity.py index 2e24f741..0336cdbc 100644 --- a/custom_components/alexa_media/alexa_entity.py +++ b/custom_components/alexa_media/alexa_entity.py @@ -64,6 +64,16 @@ def is_local(appliance: dict[str, Any]) -> bool: There is probably a better way to prevent that, but this works. """ + if appliance.get("manufacturerName") == "t0bst4r": + # Home-Assistant-Matter-Hub is a new add-on (2024-10-27) which exposes selected + # HA entities to Alexa as Matter devices connected locally via Amazon Echo. + # "connectedVia" is not None so they need to be ignored to prevent duplicating them back into HA. + _LOGGER.debug( + 'alexa_entity is_local: Return False for Home-Assistant-Matter-Hub manufacturer: "%s"', + appliance.get("manufacturerName"), + ) + return False + if appliance.get("connectedVia"): # connectedVia is a flag that determines which Echo devices holds the connection. Its blank for # skill derived devices and includes an Echo name for zigbee and local devices.