mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 21:37:21 +00:00
Fix device trigger clearing trigger id (#9511)
This commit is contained in:
parent
b1b5ab6949
commit
b4bbe63f0f
@ -91,6 +91,9 @@ export class HaDeviceTrigger extends LitElement {
|
||||
}
|
||||
|
||||
protected updated(changedPros) {
|
||||
if (!changedPros.has("trigger")) {
|
||||
return;
|
||||
}
|
||||
const prevTrigger = changedPros.get("trigger");
|
||||
if (prevTrigger && !deviceAutomationsEqual(prevTrigger, this.trigger)) {
|
||||
this._getCapabilities();
|
||||
@ -119,6 +122,9 @@ export class HaDeviceTrigger extends LitElement {
|
||||
) {
|
||||
trigger = this._origTrigger;
|
||||
}
|
||||
if (this.trigger.id) {
|
||||
trigger.id = this.trigger.id;
|
||||
}
|
||||
fireEvent(this, "value-changed", { value: trigger });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user