1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Add helper and other category for triggers and conditons (#28139)

This commit is contained in:
Bram Kragten
2025-11-26 13:41:59 +01:00
committed by GitHub
parent 0f99fcd58c
commit 44aa15809a
4 changed files with 22 additions and 2 deletions

View File

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

View File

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

View File

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

View File

@@ -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"
},