diff --git a/src/data/data_entry_flow.ts b/src/data/data_entry_flow.ts index f0ec11fc5f..d1447b1c74 100644 --- a/src/data/data_entry_flow.ts +++ b/src/data/data_entry_flow.ts @@ -45,7 +45,7 @@ export interface DataEntryFlowStepCreateEntry { flow_id: string; handler: string; title: string; - result: ConfigEntry; + result?: ConfigEntry; description: string; description_placeholders: Record; } diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index 1fdbe9b715..c4cb084fab 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -314,7 +314,7 @@ class DataEntryFlowDialog extends LitElement { this._step && this._step.type === "create_entry" ) { - if (this._params!.flowConfig.loadDevicesAndAreas) { + if (this._step.result && this._params!.flowConfig.loadDevicesAndAreas) { this._fetchDevices(this._step.result.entry_id); this._fetchAreas(); } else { diff --git a/src/dialogs/config-flow/step-flow-create-entry.ts b/src/dialogs/config-flow/step-flow-create-entry.ts index f6f2d96b2a..46b67ab1a6 100644 --- a/src/dialogs/config-flow/step-flow-create-entry.ts +++ b/src/dialogs/config-flow/step-flow-create-entry.ts @@ -43,7 +43,7 @@ class StepFlowCreateEntry extends LitElement {

Success!

${this.flowConfig.renderCreateEntryDescription(this.hass, this.step)} - ${this.step.result.state === "not_loaded" + ${this.step.result?.state === "not_loaded" ? html`${localize( "ui.panel.config.integrations.config_flow.not_loaded"