Skip to content

Commit

Permalink
Navigate to newly created config entry (#24109)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Feb 7, 2025
1 parent d919e8d commit 6ec4041
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dialogs/config-flow/step-flow-create-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { showAlertDialog } from "../generic/show-dialog-box";
import { showVoiceAssistantSetupDialog } from "../voice-assistant-setup/show-voice-assistant-setup-dialog";
import type { FlowConfig } from "./show-dialog-data-entry-flow";
import { configFlowContentStyles } from "./styles";
import { navigate } from "../../common/navigate";

@customElement("step-flow-create-entry")
class StepFlowCreateEntry extends LitElement {
Expand Down Expand Up @@ -152,6 +153,11 @@ class StepFlowCreateEntry extends LitElement {

private _flowDone(): void {
fireEvent(this, "flow-update", { step: undefined });
if (this.step.result) {
navigate(
`/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}`
);
}
}

private async _areaPicked(ev: CustomEvent) {
Expand Down

0 comments on commit 6ec4041

Please sign in to comment.