From 225476a0f8f45675c6c713d50510638f2b6bbf0c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 7 Mar 2024 10:54:35 -1000 Subject: [PATCH] merge --- homeassistant/config_entries.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: