diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts index 2c6429d642..c8ca54c3d7 100644 --- a/src/panels/config/automation/ha-automation-editor.ts +++ b/src/panels/config/automation/ha-automation-editor.ts @@ -486,7 +486,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) { value.valid ? "" : html`${this.hass.localize( - `ui.panel.config.automation.editor.${key}s.header` + `ui.panel.config.automation.editor.${key}s.name` )}: ${value.error}
` ); diff --git a/src/panels/config/automation/manual-automation-editor.ts b/src/panels/config/automation/manual-automation-editor.ts index e0417269b6..291d308540 100644 --- a/src/panels/config/automation/manual-automation-editor.ts +++ b/src/panels/config/automation/manual-automation-editor.ts @@ -1,8 +1,9 @@ import "@material/mwc-button/mwc-button"; import { mdiHelpCircle } from "@mdi/js"; import { HassEntity } from "home-assistant-js-websocket"; -import { css, CSSResultGroup, html, LitElement } from "lit"; +import { css, CSSResultGroup, html, LitElement, nothing } from "lit"; import { customElement, property } from "lit/decorators"; +import { ensureArray } from "../../../common/array/ensure-array"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-card"; import "../../../components/ha-icon-button"; @@ -83,6 +84,14 @@ export class HaManualAutomationEditor extends LitElement { > + ${!this.hass.userData?.showAdvanced && + !ensureArray(this.config.trigger)?.length + ? html`

+ ${this.hass.localize( + "ui.panel.config.automation.editor.triggers.description" + )} +

` + : nothing} (${this.hass.localize("ui.common.optional")}) + ${!this.hass.userData?.showAdvanced && + !ensureArray(this.config.condition)?.length + ? html`

+ ${this.hass.localize( + "ui.panel.config.automation.editor.conditions.description", + { user: this.hass.user?.name } + )} +

` + : nothing} + ${!this.hass.userData?.showAdvanced && + !ensureArray(this.config.action)?.length + ? html`

+ ${this.hass.localize( + "ui.panel.config.automation.editor.actions.description" + )} +

` + : nothing} ` ); diff --git a/src/translations/en.json b/src/translations/en.json index ae036e293f..8606439e43 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -349,7 +349,8 @@ "error_required": "Required", "copied": "Copied", "copied_clipboard": "Copied to clipboard", - "name": "Name" + "name": "Name", + "optional": "optional" }, "components": { "selectors": { @@ -2441,7 +2442,9 @@ "edit_ui": "Edit in visual editor", "copy_to_clipboard": "Copy to clipboard", "triggers": { - "header": "Triggers", + "name": "Triggers", + "header": "When", + "description": "This list of triggers is what starts your automation. A trigger is a specific event happening in or around your home, for example: ''When the sun sets''.", "learn_more": "Learn more about triggers", "triggered": "Triggered", "add": "Add trigger", @@ -2635,7 +2638,9 @@ } }, "conditions": { - "header": "Conditions", + "name": "Conditions", + "header": "And if", + "description": "This list of conditions needs to be satisfied for the automation to run. A condition can be satisfied or not at any given time, for example: ''If {user} is home''. You can use building blocks to create more complex conditions.", "learn_more": "Learn more about conditions", "add": "Add condition", "test": "Test", @@ -2771,7 +2776,9 @@ } }, "actions": { - "header": "Actions", + "name": "Actions", + "header": "Then do", + "description": "This list of actions will be performed in sequence when the automation runs. An action usually controls one of your areas, devices, or entities, for example: 'Turn on the lights'. You can use building blocks to create more complex sequences of actions.", "learn_more": "Learn more about actions", "add": "Add action", "invalid_action": "Invalid action",