Fix define variables action (#16712)

This commit is contained in:
Paul Bottein 2023-06-01 11:38:59 +02:00 committed by GitHub
parent 40c9292e16
commit 287e6dbb60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 });