From 0f99fcd58c3273083fa2e52a2e5bdc20ef7db25b Mon Sep 17 00:00:00 2001 From: Wendelin <12148533+wendevlin@users.noreply.github.com> Date: Wed, 26 Nov 2025 13:33:27 +0100 Subject: [PATCH] Add automation action by target (#28136) --- .../automation/add-automation-element-dialog.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/panels/config/automation/add-automation-element-dialog.ts b/src/panels/config/automation/add-automation-element-dialog.ts index c530f86ea4..85e37674dc 100644 --- a/src/panels/config/automation/add-automation-element-dialog.ts +++ b/src/panels/config/automation/add-automation-element-dialog.ts @@ -259,7 +259,7 @@ class DialogAddAutomationElement feature.preview_feature === "new_triggers_conditions" )?.enabled ?? false; this._tab = - this._newTriggersAndConditions && this._params?.type === "trigger" + this._newTriggersAndConditions && this._params?.type !== "condition" ? "targets" : "groups"; }), @@ -270,7 +270,7 @@ class DialogAddAutomationElement this._params = params; this._tab = - this._newTriggersAndConditions && this._params?.type === "trigger" + this._newTriggersAndConditions && this._params?.type !== "condition" ? "targets" : "groups"; @@ -427,7 +427,10 @@ class DialogAddAutomationElement }, ]; - if (this._newTriggersAndConditions && automationElementType === "trigger") { + if ( + this._newTriggersAndConditions && + automationElementType !== "condition" + ) { tabButtons.unshift({ label: this.hass.localize(`ui.panel.config.automation.editor.targets`), value: "targets", @@ -518,7 +521,7 @@ class DialogAddAutomationElement )} .convertToItem=${this._convertToItem} .newTriggersAndConditions=${this._newTriggersAndConditions && - automationElementType === "trigger"} + automationElementType !== "condition"} @search-element-picked=${this._searchItemSelected} > `