From 44aa15809ae1763dacb6445517684e01da5f8225 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 26 Nov 2025 13:41:59 +0100 Subject: [PATCH] Add helper and other category for triggers and conditons (#28139) --- src/data/condition.ts | 8 ++++++++ src/data/trigger.ts | 7 +++++++ .../config/automation/add-automation-element-dialog.ts | 3 +-- src/translations/en.json | 6 ++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/data/condition.ts b/src/data/condition.ts index b642b691e5..062765dee3 100644 --- a/src/data/condition.ts +++ b/src/data/condition.ts @@ -17,11 +17,19 @@ export const CONDITION_COLLECTIONS: AutomationElementGroupCollection[] = [ }, }, }, + { + titleKey: + "ui.panel.config.automation.editor.conditions.groups.helpers.label", + groups: { + helpers: {}, + }, + }, { titleKey: "ui.panel.config.automation.editor.conditions.groups.other.label", groups: { template: {}, trigger: {}, + other: {}, }, }, ] as const; diff --git a/src/data/trigger.ts b/src/data/trigger.ts index b3ac232be9..c8204d68fe 100644 --- a/src/data/trigger.ts +++ b/src/data/trigger.ts @@ -28,6 +28,12 @@ export const TRIGGER_COLLECTIONS: AutomationElementGroupCollection[] = [ }, }, }, + { + titleKey: "ui.panel.config.automation.editor.triggers.groups.helpers.label", + groups: { + helpers: {}, + }, + }, { titleKey: "ui.panel.config.automation.editor.triggers.groups.other.label", groups: { @@ -40,6 +46,7 @@ export const TRIGGER_COLLECTIONS: AutomationElementGroupCollection[] = [ template: {}, webhook: {}, persistent_notification: {}, + other: {}, }, }, ] as const; diff --git a/src/panels/config/automation/add-automation-element-dialog.ts b/src/panels/config/automation/add-automation-element-dialog.ts index 85e37674dc..54bec69bd6 100644 --- a/src/panels/config/automation/add-automation-element-dialog.ts +++ b/src/panels/config/automation/add-automation-element-dialog.ts @@ -241,7 +241,6 @@ class DialogAddAutomationElement protected willUpdate(changedProps: PropertyValues) { if ( - this._params?.type === "action" && changedProps.has("hass") && changedProps.get("hass")?.states !== this.hass.states ) { @@ -280,10 +279,10 @@ class DialogAddAutomationElement this._unsubscribe(); this._fetchManifests(); + this._calculateUsedDomains(); if (this._params?.type === "action") { this.hass.loadBackendTranslation("services"); - this._calculateUsedDomains(); getServiceIcons(this.hass); } else if (this._params?.type === "trigger") { this.hass.loadBackendTranslation("triggers"); diff --git a/src/translations/en.json b/src/translations/en.json index be2079851d..42dacbd65c 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -4084,6 +4084,9 @@ "entity": { "label": "Entity" }, + "helpers": { + "label": "Helpers" + }, "time_location": { "label": "Time and location" }, @@ -4355,6 +4358,9 @@ "time_location": { "label": "Time and location" }, + "helpers": { + "label": "Helpers" + }, "other": { "label": "Other conditions" },