Fix logbook spinner never disappearing when all entities are filtered (#72816)

This commit is contained in:
J. Nick Koston 2022-06-01 00:33:46 -10:00 committed by GitHub
parent 023990577c
commit 5d2326386d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 1 deletions

View file

@ -356,7 +356,7 @@ async def ws_event_stream(
)
await _async_wait_for_recorder_sync(hass)
if not subscriptions:
if msg_id not in connection.subscriptions:
# Unsubscribe happened while waiting for recorder
return
@ -388,6 +388,8 @@ async def ws_event_stream(
if not subscriptions:
# Unsubscribe happened while waiting for formatted events
# or there are no supported entities (all UOM or state class)
# or devices
return
live_stream.task = asyncio.create_task(