From 0b38535f6a6ce1fed91bf035a71566c153e8586e Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 19 Jun 2025 10:53:06 +0200 Subject: [PATCH] Address review comment --- homeassistant/helpers/trigger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/trigger.py b/homeassistant/helpers/trigger.py index 3559d81d7aa..b89ec78aaa8 100644 --- a/homeassistant/helpers/trigger.py +++ b/homeassistant/helpers/trigger.py @@ -564,7 +564,7 @@ async def async_get_all_descriptions( return descriptions_cache # Files we loaded for missing descriptions - loaded: dict[str, JSON_TYPE] = {} + new_triggers_descriptions: dict[str, JSON_TYPE] = {} # We try to avoid making a copy in the event the cache is good, # but now we must make a copy in case new triggers get added # while we are loading the missing ones so we do not @@ -590,7 +590,7 @@ async def async_get_all_descriptions( ) if integrations: - loaded = await hass.async_add_executor_job( + new_triggers_descriptions = await hass.async_add_executor_job( _load_triggers_files, hass, integrations ) @@ -599,7 +599,7 @@ async def async_get_all_descriptions( domain = triggers[missing_trigger] # Cache missing descriptions - domain_yaml = loaded.get(domain) or {} + domain_yaml = new_triggers_descriptions.get(domain) or {} yaml_description = ( domain_yaml.get(missing_trigger) or {} # type: ignore[union-attr]