Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus committed Jan 17, 2024
2 parents 72460e3 + c23fa88 commit 69b765d
Show file tree
Hide file tree
Showing 8 changed files with 398 additions and 368 deletions.
7 changes: 3 additions & 4 deletions deebot_client/mqtt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ async def _get_client(self) -> Client:
username=credentials.user_id,
password=credentials.token,
logger=_CLIENT_LOGGER,
client_id=client_id,
identifier=client_id,
tls_context=self._config.ssl_context,
)

Expand All @@ -166,9 +166,8 @@ async def mqtt() -> None:
await client.subscribe(topic)

async def listen() -> None:
async with client.messages() as messages:
async for message in messages:
self._handle_message(message)
async for message in client.messages:
self._handle_message(message)

tasks = [
asyncio.create_task(listen()),
Expand Down
Loading

0 comments on commit 69b765d

Please sign in to comment.