From 06c36e511d937c6c8f2dbd22f4e383813da228f6 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Thu, 2 Jul 2026 13:23:50 +0000 Subject: [PATCH] CancelledError --- homeassistant/config_entries.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 0f022c29ed8a..e309d8fb7219 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -922,7 +922,8 @@ class ConfigEntry[_DataT = Any]: hass, integration, exc ) if isinstance(exc, asyncio.CancelledError): - raise + if (task := asyncio.current_task()) and task.cancelling() > 0: + raise if isinstance(exc, ConfigEntryNotReady): return @@ -962,7 +963,8 @@ class ConfigEntry[_DataT = Any]: hass, integration, exc ) if isinstance(exc, asyncio.CancelledError): - raise + if (task := asyncio.current_task()) and task.cancelling() > 0: + raise if isinstance(exc, ConfigEntryNotReady): return