From fef6f0ac940edbc0150eaa0574a833a203cdf8cb Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 27 Sep 2024 17:13:05 +0200 Subject: [PATCH] migrate nested triggers too (#22135) --- src/data/automation.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data/automation.ts b/src/data/automation.ts index f08170c2cc86..15f08ea958ab 100644 --- a/src/data/automation.ts +++ b/src/data/automation.ts @@ -427,6 +427,10 @@ export const migrateAutomationTrigger = ( return trigger.map(migrateAutomationTrigger) as Trigger[]; } + if ("triggers" in trigger && trigger.triggers) { + trigger.triggers = migrateAutomationTrigger(trigger.triggers); + } + if ("platform" in trigger) { if (!("trigger" in trigger)) { // @ts-ignore