mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fix duplicate trigger IDs showing in the Triggered By condition (#14122)
This commit is contained in:
parent
0a2eb05062
commit
a46e72ffbd
@ -70,8 +70,11 @@ export class HaTriggerCondition extends LitElement {
|
||||
}
|
||||
|
||||
private _automationUpdated(config?: AutomationConfig) {
|
||||
const seenIds = new Set();
|
||||
this._triggers = config?.trigger
|
||||
? ensureArray(config.trigger).filter((t) => t.id)
|
||||
? ensureArray(config.trigger).filter(
|
||||
(t) => t.id && (seenIds.has(t.id) ? false : seenIds.add(t.id))
|
||||
)
|
||||
: [];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user