diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index eb9c618c24..70cb56c77d 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -67,6 +67,15 @@ newInputData = cloneDeep(blockInputs) } inputData = newInputData + setDefaultEnumValues() + } + + const setDefaultEnumValues = () => { + for (const [key, value] of schemaProperties) { + if (value.type === "string" && value.enum && inputData[key] == null) { + inputData[key] = value.enum[0] + } + } } const onChange = Utils.sequential(async (e, key) => { @@ -243,6 +252,7 @@