Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hass_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ async def subscribe(
def remove_listener():
self._subscriptions.pop(message_id)
# try to unsubscribe
if "subscribe" not in message_base["type"]:
if "subscribe" not in message_base["command"]:
return
unsub_command = message_base["type"].replace("subscribe", "unsubscribe")
unsub_command = message_base["command"].replace("subscribe", "unsubscribe")
asyncio.create_task(self.send_command_no_wait(unsub_command, subscription=message_id))

return remove_listener
Expand Down