From 2f9982d1c70f2d9fdd25de2c87a2565961fe027c Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 10 Nov 2022 17:27:14 +0100 Subject: [PATCH] Fix race when deleting a script (#81897) --- homeassistant/components/config/script.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/config/script.py b/homeassistant/components/config/script.py index 45a7a6dc227..73f89aaf509 100644 --- a/homeassistant/components/config/script.py +++ b/homeassistant/components/config/script.py @@ -16,9 +16,8 @@ async def async_setup(hass): async def hook(action, config_key): """post_write_hook for Config View that reloads scripts.""" - await hass.services.async_call(DOMAIN, SERVICE_RELOAD) - if action != ACTION_DELETE: + await hass.services.async_call(DOMAIN, SERVICE_RELOAD) return ent_reg = er.async_get(hass)