Skip to content

Commit

Permalink
fix: ignore home-assistant-matter-hub entities (#2730)
Browse files Browse the repository at this point in the history
closes #2709
  • Loading branch information
danielbrunt57 authored Dec 8, 2024
1 parent a39db58 commit d63113e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_components/alexa_media/alexa_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d63113e

Please sign in to comment.