mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Log the name of automations with condition errors (#46854)
This commit is contained in:
parent
b6b1e725c7
commit
b1a24c8bbb
@ -568,7 +568,7 @@ async def _async_process_config(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if CONF_CONDITION in config_block:
|
if CONF_CONDITION in config_block:
|
||||||
cond_func = await _async_process_if(hass, config, config_block)
|
cond_func = await _async_process_if(hass, name, config, config_block)
|
||||||
|
|
||||||
if cond_func is None:
|
if cond_func is None:
|
||||||
continue
|
continue
|
||||||
@ -606,7 +606,7 @@ async def _async_process_config(
|
|||||||
return blueprints_used
|
return blueprints_used
|
||||||
|
|
||||||
|
|
||||||
async def _async_process_if(hass, config, p_config):
|
async def _async_process_if(hass, name, config, p_config):
|
||||||
"""Process if checks."""
|
"""Process if checks."""
|
||||||
if_configs = p_config[CONF_CONDITION]
|
if_configs = p_config[CONF_CONDITION]
|
||||||
|
|
||||||
@ -634,7 +634,8 @@ async def _async_process_if(hass, config, p_config):
|
|||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
LOGGER.warning(
|
LOGGER.warning(
|
||||||
"Error evaluating condition:\n%s",
|
"Error evaluating condition in '%s':\n%s",
|
||||||
|
name,
|
||||||
ConditionErrorContainer("condition", errors=errors),
|
ConditionErrorContainer("condition", errors=errors),
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user