Skip to content

Commit e79e0f7

Browse files
authored
Navigate to newly added device (#25608)
1 parent b226e5c commit e79e0f7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/dialogs/config-flow/step-flow-create-entry.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,13 @@ class StepFlowCreateEntry extends LitElement {
235235

236236
fireEvent(this, "flow-update", { step: undefined });
237237
if (this.step.result && this.navigateToResult) {
238-
navigate(
239-
`/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}`
240-
);
238+
if (this.devices.length === 1) {
239+
navigate(`/config/devices/device/${this.devices[0].id}`);
240+
} else {
241+
navigate(
242+
`/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}`
243+
);
244+
}
241245
}
242246
}
243247

0 commit comments

Comments
 (0)