Skip to content

Commit

Permalink
Add bridge utility method to LinkPlayController
Browse files Browse the repository at this point in the history
  • Loading branch information
silamon authored Sep 11, 2024
1 parent 674d25b commit 52734cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/linkplay/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ async def discover_bridges(self) -> None:
]
self.bridges.extend(new_bridges)

async def add_bridge(self, bridge_to_add: LinkPlayBridge) -> None:
"""Add given LinkPlay device if not already added."""

# Add bridge
current_bridges = [bridge.device.uuid for bridge in self.bridges]
if bridge_to_add.device.uuid not in current_bridges:
self.bridges.extend(bridge_to_add)

async def discover_multirooms(self) -> None:
"""Attempts to discover multirooms on the local network."""

Expand Down

0 comments on commit 52734cb

Please sign in to comment.