Remove chains of new conditions (#28140)

This commit is contained in:
Wendelin 2025-11-26 15:09:40 +01:00 committed by GitHub
parent ca9b29d82a
commit b5d93e7515
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}
>
</ha-automation-add-search>`