Fix race when deleting an automation (#108772)

This commit is contained in:
Erik Montnemery
2024-01-24 15:27:09 +01:00
committed by GitHub
parent af1ba4b22f
commit fcf72ae0c2

View File

@@ -22,9 +22,8 @@ async def async_setup(hass: HomeAssistant) -> bool:
async def hook(action: str, config_key: str) -> None: async def hook(action: str, config_key: str) -> None:
"""post_write_hook for Config View that reloads automations.""" """post_write_hook for Config View that reloads automations."""
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)