From 82990d1d7d299e3d8d96872191f8c19ea74a78d0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 26 Feb 2024 07:54:08 -1000 Subject: [PATCH] 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 9a20d050bfaa98..3517d41314bc35 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -1457,7 +1457,7 @@ def _async_registry_updated( 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(