diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 41cccdf9969..3ab16f69676 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -752,7 +752,7 @@ class ConfigEntry: target: Coroutine[Any, Any, _R], name: str | None = None, ) -> asyncio.Task[_R]: - """Create a task from within the eventloop. + """Create a task from within the event loop. This method must be run in the event loop. diff --git a/homeassistant/core.py b/homeassistant/core.py index bfccb721d8d..900355d4a5d 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -516,7 +516,7 @@ class HomeAssistant: def async_create_task( self, target: Coroutine[Any, Any, _R], name: str | None = None ) -> asyncio.Task[_R]: - """Create a task from within the eventloop. + """Create a task from within the event loop. This method must be run in the event loop. If you are using this in your integration, use the create task methods on the config entry instead. @@ -534,7 +534,7 @@ class HomeAssistant: target: Coroutine[Any, Any, _R], name: str, ) -> asyncio.Task[_R]: - """Create a task from within the eventloop. + """Create a task from within the event loop. This is a background task which will not block startup and will be automatically cancelled on shutdown. If you are using this in your