diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts index 51a579c2c6..6dc84a01f2 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts @@ -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 }); }