From e79e0f77b8ab5990c13b14ff411de59465ec617b Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Tue, 27 May 2025 17:19:53 +0300 Subject: [PATCH] Navigate to newly added device (#25608) --- src/dialogs/config-flow/step-flow-create-entry.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dialogs/config-flow/step-flow-create-entry.ts b/src/dialogs/config-flow/step-flow-create-entry.ts index 483c43c326..bfc0527511 100644 --- a/src/dialogs/config-flow/step-flow-create-entry.ts +++ b/src/dialogs/config-flow/step-flow-create-entry.ts @@ -235,9 +235,13 @@ class StepFlowCreateEntry extends LitElement { fireEvent(this, "flow-update", { step: undefined }); if (this.step.result && this.navigateToResult) { - navigate( - `/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}` - ); + if (this.devices.length === 1) { + navigate(`/config/devices/device/${this.devices[0].id}`); + } else { + navigate( + `/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}` + ); + } } }