Fix automation action row describing template targets (#25002)

This commit is contained in:
karwosts 2025-04-10 21:40:20 -07:00 committed by GitHub
parent 634db1944f
commit c2ce02652b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,7 +94,14 @@ const tryDescribeAction = <T extends ActionType>(
const targets: string[] = [];
const targetOrData = config.target || config.data;
if (targetOrData) {
if (typeof targetOrData === "string" && isTemplate(targetOrData)) {
targets.push(
hass.localize(
`${actionTranslationBaseKey}.service.description.target_template`,
{ name: "target" }
)
);
} else if (targetOrData) {
for (const [key, name] of Object.entries({
area_id: "areas",
device_id: "devices",