Fix race when deleting a script (#81897)

pull/81923/head
Erik Montnemery 2022-11-10 17:27:14 +01:00 committed by GitHub
parent ae2b2acab5
commit 2f9982d1c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -16,9 +16,8 @@ async def async_setup(hass):
async def hook(action, config_key): async def hook(action, config_key):
"""post_write_hook for Config View that reloads scripts.""" """post_write_hook for Config View that reloads scripts."""
await hass.services.async_call(DOMAIN, SERVICE_RELOAD)
if action != ACTION_DELETE: if action != ACTION_DELETE:
await hass.services.async_call(DOMAIN, SERVICE_RELOAD)
return return
ent_reg = er.async_get(hass) ent_reg = er.async_get(hass)