diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index a6e92d6576d4..6b42795ecce3 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -1026,8 +1026,7 @@ class ConfigEntry: ) -> asyncio.Task[_R]: """Create a background task tied to the config entry lifecycle. - This type of task is for background tasks that usually run for - the lifetime of Home Assistant or an integration's setup. + Background tasks are automatically canceled when config entry is unloaded. This is a background task which is different from a normal task: @@ -1054,6 +1053,8 @@ class ConfigEntry: ) -> asyncio.Task[_R]: """Create a periodic task tied to the config entry lifecycle. + Periodic tasks are automatically canceled when config entry is unloaded. + This type of task is typically used for polling. This is a periodic task which is different from a normal task: