From ce0fb1e716c519c5b27f81b4f697c994cb61ef17 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 26 Feb 2024 18:55:15 -1000 Subject: [PATCH] Fully fix race in removing entities (#111499) Full fix race in removing entities Followup to #110978 now that we can start the task eagerly it completely closes the race window --- homeassistant/helpers/entity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 9a20d050bfa..3517d41314b 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -1457,7 +1457,7 @@ class Entity( self._removed_from_registry = is_remove if action == "update" or is_remove: self.hass.async_create_task( - self._async_process_registry_update_or_remove(event) + self._async_process_registry_update_or_remove(event), eager_start=True ) async def _async_process_registry_update_or_remove(