Fix automation trigger condition and triggers description (#22122)

* Fix config.triggers in automation-contition-trigger

* Fix config.triggers for automation triggers description
This commit is contained in:
Wendelin 2024-09-27 11:10:33 +02:00 committed by GitHub
parent e778a9aa1d
commit 570ad38bac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -94,8 +94,8 @@ export class HaTriggerCondition extends LitElement {
private _automationUpdated(config?: AutomationConfig) { private _automationUpdated(config?: AutomationConfig) {
const seenIds = new Set(); const seenIds = new Set();
this._triggers = config?.trigger this._triggers = config?.triggers
? ensureArray(config.trigger).filter( ? ensureArray(config.triggers).filter(
(t) => t.id && (seenIds.has(t.id) ? false : seenIds.add(t.id)) (t) => t.id && (seenIds.has(t.id) ? false : seenIds.add(t.id))
) )
: []; : [];

View File

@ -78,7 +78,7 @@ export class HaManualAutomationEditor extends LitElement {
></ha-icon-button> ></ha-icon-button>
</a> </a>
</div> </div>
${!ensureArray(this.config.trigger)?.length ${!ensureArray(this.config.triggers)?.length
? html`<p> ? html`<p>
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.automation.editor.triggers.description" "ui.panel.config.automation.editor.triggers.description"