From 287e6dbb6024cd4b54533341ee63168948cab998 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 1 Jun 2023 11:38:59 +0200 Subject: [PATCH] Fix define variables action (#16712) --- src/panels/config/automation/action/ha-automation-action.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/config/automation/action/ha-automation-action.ts b/src/panels/config/automation/action/ha-automation-action.ts index dcd2f3971d..af2cfe50c8 100644 --- a/src/panels/config/automation/action/ha-automation-action.ts +++ b/src/panels/config/automation/action/ha-automation-action.ts @@ -262,9 +262,9 @@ export default class HaAutomationAction extends LitElement { `ha-automation-action-${action}` ) as CustomElementConstructor & { defaultConfig: Action }; - actions = this.actions.concat({ - ...elClass.defaultConfig, - }); + actions = this.actions.concat( + elClass ? { ...elClass.defaultConfig } : { [action]: {} } + ); } this._focusLastActionOnChange = true; fireEvent(this, "value-changed", { value: actions });