diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index e7fcb1572b..c8273d7825 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -252,6 +252,7 @@ class DataEntryFlowDialog extends LitElement { ` diff --git a/src/dialogs/config-flow/show-dialog-data-entry-flow.ts b/src/dialogs/config-flow/show-dialog-data-entry-flow.ts index c1141d729a..b0217ec057 100644 --- a/src/dialogs/config-flow/show-dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/show-dialog-data-entry-flow.ts @@ -96,6 +96,7 @@ export type LoadingReason = export interface DataEntryFlowDialogParams { startFlowHandler?: string; + searchQuery?: string; continueFlowId?: string; dialogClosedCallback?: (params: { flowFinished: boolean; diff --git a/src/dialogs/config-flow/step-flow-pick-handler.ts b/src/dialogs/config-flow/step-flow-pick-handler.ts index d3b0028b3e..dff8088491 100644 --- a/src/dialogs/config-flow/step-flow-pick-handler.ts +++ b/src/dialogs/config-flow/step-flow-pick-handler.ts @@ -1,7 +1,14 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; import Fuse from "fuse.js"; -import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { + css, + CSSResultGroup, + html, + LitElement, + TemplateResult, + PropertyValues, +} from "lit"; import { customElement, property, state } from "lit/decorators"; import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; @@ -36,6 +43,8 @@ class StepFlowPickHandler extends LitElement { @property({ attribute: false }) public handlers!: string[]; + @property() public initialFilter?: string; + @state() private _filter?: string; private _width?: number; @@ -138,6 +147,13 @@ class StepFlowPickHandler extends LitElement { `; } + public willUpdate(changedProps: PropertyValues): void { + if (this._filter === undefined && this.initialFilter !== undefined) { + this._filter = this.initialFilter; + } + super.willUpdate(changedProps); + } + protected firstUpdated(changedProps) { super.firstUpdated(changedProps); setTimeout( diff --git a/src/panels/config/integrations/ha-config-integrations.ts b/src/panels/config/integrations/ha-config-integrations.ts index a4d43cd7f4..34a1d9e68a 100644 --- a/src/panels/config/integrations/ha-config-integrations.ts +++ b/src/panels/config/integrations/ha-config-integrations.ts @@ -425,6 +425,34 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) { .deviceRegistryEntries=${this._deviceRegistryEntries} >` ) + : this._filter && + !configEntriesInProgress.length && + !groupedConfigEntries.size && + this._configEntries.length + ? html` +
+

+ ${this.hass.localize( + "ui.panel.config.integrations.none_found" + )} +

+

+ ${this.hass.localize( + "ui.panel.config.integrations.none_found_detail" + )} +

+ +
+ ` + : // If we have a filter, never show a card + this._filter + ? "" : // If we're showing 0 cards, show empty state text (!this._showIgnored || ignoredConfigEntries.length === 0) && (!this._showDisabled || disabledConfigEntries.size === 0) && @@ -449,25 +477,6 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) { ` : ""} - ${this._filter && - !configEntriesInProgress.length && - !groupedConfigEntries.size && - this._configEntries.length - ? html` -
-

- ${this.hass.localize( - "ui.panel.config.integrations.none_found" - )} -

-

- ${this.hass.localize( - "ui.panel.config.integrations.none_found_detail" - )} -

-
- ` - : ""} { this._handleFlowUpdated(); },