Skip to content

Commit

Permalink
merge bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
llluis committed Feb 21, 2024
1 parent 7b7d37b commit 59c97d8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions wyoming_satellite/satellite.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,14 @@ def _make_event_client(self) -> Optional[AsyncClient]:

return None

async def _send_event_detect(self) -> None:
"""Inform event service of which wake words handled by this satellite instance."""
wake_names: Optional[List[str]] = None
if self.settings.wake.names:
wake_names = [w.name for w in self.settings.wake.names]

await self.forward_event(Detect(names=wake_names).event())

async def _event_task_proc(self) -> None:
"""Event service loop."""
event_client: Optional[AsyncClient] = None
Expand Down Expand Up @@ -910,9 +918,7 @@ async def _disconnect() -> None:
self._event_queue = asyncio.Queue()

# Inform event service of the wake word handled by this satellite instance
await self.forward_event(
Detect(names=self.settings.wake.names).event()
)
await self._send_event_detect()

# Read/write in "parallel"
if to_client_task is None:
Expand Down

0 comments on commit 59c97d8

Please sign in to comment.