From b5d93e7515fac3f26e4bf4646b015aea820ae038 Mon Sep 17 00:00:00 2001 From: Wendelin <12148533+wendevlin@users.noreply.github.com> Date: Wed, 26 Nov 2025 15:09:40 +0100 Subject: [PATCH] Remove chains of new conditions (#28140) --- .../add-automation-element-dialog.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/panels/config/automation/add-automation-element-dialog.ts b/src/panels/config/automation/add-automation-element-dialog.ts index 8a08f1d064..8c2d2481bf 100644 --- a/src/panels/config/automation/add-automation-element-dialog.ts +++ b/src/panels/config/automation/add-automation-element-dialog.ts @@ -257,10 +257,7 @@ class DialogAddAutomationElement feature.domain === "automation" && feature.preview_feature === "new_triggers_conditions" )?.enabled ?? false; - this._tab = - this._newTriggersAndConditions && this._params?.type !== "condition" - ? "targets" - : "groups"; + this._tab = this._newTriggersAndConditions ? "targets" : "groups"; }), ]; } @@ -268,11 +265,6 @@ class DialogAddAutomationElement public showDialog(params): void { this._params = params; - this._tab = - this._newTriggersAndConditions && this._params?.type !== "condition" - ? "targets" - : "groups"; - this.addKeyboardShortcuts(); this._loadConfigEntries(); @@ -426,10 +418,7 @@ class DialogAddAutomationElement }, ]; - if ( - this._newTriggersAndConditions && - automationElementType !== "condition" - ) { + if (this._newTriggersAndConditions) { tabButtons.unshift({ label: this.hass.localize(`ui.panel.config.automation.editor.targets`), value: "targets", @@ -519,8 +508,7 @@ class DialogAddAutomationElement this._manifests )} .convertToItem=${this._convertToItem} - .newTriggersAndConditions=${this._newTriggersAndConditions && - automationElementType !== "condition"} + .newTriggersAndConditions=${this._newTriggersAndConditions} @search-element-picked=${this._searchItemSelected} > `