mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Fix dangling task for crownstone (#88292)
This commit is contained in:
parent
26f0de0d80
commit
5a31bb2ff3
@ -1,7 +1,6 @@
|
|||||||
"""Manager to set up IO with Crownstone devices for a config entry."""
|
"""Manager to set up IO with Crownstone devices for a config entry."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -87,7 +86,9 @@ class CrownstoneEntryManager:
|
|||||||
project_name=PROJECT_NAME,
|
project_name=PROJECT_NAME,
|
||||||
)
|
)
|
||||||
# Listen for events in the background, without task tracking
|
# Listen for events in the background, without task tracking
|
||||||
asyncio.create_task(self.async_process_events(self.sse))
|
self.config_entry.async_create_background_task(
|
||||||
|
self.hass, self.async_process_events(self.sse), "crownstone-sse"
|
||||||
|
)
|
||||||
setup_sse_listeners(self)
|
setup_sse_listeners(self)
|
||||||
|
|
||||||
# Set up a Crownstone USB only if path exists
|
# Set up a Crownstone USB only if path exists
|
||||||
|
Loading…
x
Reference in New Issue
Block a user