Teach call service script action about entity registry ids (#61172)
This commit is contained in:
@@ -218,7 +218,10 @@ def async_prepare_call_from_config(
|
||||
target.update(template.render_complex(conf, variables))
|
||||
|
||||
if CONF_ENTITY_ID in target:
|
||||
target[CONF_ENTITY_ID] = cv.comp_entity_ids(target[CONF_ENTITY_ID])
|
||||
registry = entity_registry.async_get(hass)
|
||||
target[CONF_ENTITY_ID] = entity_registry.async_resolve_entity_ids(
|
||||
registry, cv.comp_entity_ids_or_uuids(target[CONF_ENTITY_ID])
|
||||
)
|
||||
except TemplateError as ex:
|
||||
raise HomeAssistantError(
|
||||
f"Error rendering service target template: {ex}"
|
||||
|
||||
Reference in New Issue
Block a user