Navigate to newly added device (#25608)

This commit is contained in:
Petar Petrov 2025-05-27 17:19:53 +03:00 committed by GitHub
parent b226e5c697
commit e79e0f77b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}`
);
}
}
}