mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 10:29:37 +00:00
Move data_entry_flow_progressed event subscriber (#7700)
This commit is contained in:
@@ -8,12 +8,8 @@ import {
|
||||
property,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import "../../components/ha-circular-progress";
|
||||
import {
|
||||
DataEntryFlowProgressedEvent,
|
||||
DataEntryFlowStepProgress,
|
||||
} from "../../data/data_entry_flow";
|
||||
import { DataEntryFlowStepProgress } from "../../data/data_entry_flow";
|
||||
import { HomeAssistant } from "../../types";
|
||||
import { FlowConfig } from "./show-dialog-data-entry-flow";
|
||||
import { configFlowContentStyles } from "./styles";
|
||||
@@ -43,22 +39,6 @@ class StepFlowProgress extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
protected firstUpdated(changedProps) {
|
||||
super.firstUpdated(changedProps);
|
||||
this.hass.connection.subscribeEvents<DataEntryFlowProgressedEvent>(
|
||||
async (ev) => {
|
||||
if (ev.data.flow_id !== this.step.flow_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
fireEvent(this, "flow-update", {
|
||||
stepPromise: this.flowConfig.fetchFlow(this.hass, this.step.flow_id),
|
||||
});
|
||||
},
|
||||
"data_entry_flow_progressed"
|
||||
);
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
return [
|
||||
configFlowContentStyles,
|
||||
|
||||
Reference in New Issue
Block a user