diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts
index de33a19a5b..2c7aab1dc1 100644
--- a/src/layouts/hass-tabs-subpage-data-table.ts
+++ b/src/layouts/hass-tabs-subpage-data-table.ts
@@ -496,8 +496,9 @@ export class HaTabsSubpageDataTable extends LitElement {
${this.showFilters && !showPane
? html`
${localize("ui.components.subpage-data-table.filters")}${localize("ui.components.subpage-data-table.filters", {
+ number: this.data.length,
+ })}
${this.filters
? html`
-
`
+
+
+
+
+ ${this.hass.localize(
+ "ui.components.subpage-data-table.show_results",
+ { number: this.data.length }
+ )}
+
+
+ `
: nothing}
`;
}
@@ -793,7 +805,7 @@ export class HaTabsSubpageDataTable extends LitElement {
}
.filter-dialog-content {
- height: calc(100vh - 1px - var(--header-height));
+ height: calc(100vh - 1px - 61px - var(--header-height));
display: flex;
flex-direction: column;
}
diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts
index ecb40f5b71..9ec4cb6b01 100644
--- a/src/panels/config/automation/ha-automation-picker.ts
+++ b/src/panels/config/automation/ha-automation-picker.ts
@@ -422,6 +422,14 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
const labelsInOverflow =
(this._sizeController.value && this._sizeController.value < 700) ||
(!this._sizeController.value && this.hass.dockedSidebar === "docked");
+ const automations = this._automations(
+ this.automations,
+ this._entityReg,
+ this.hass.areas,
+ this._categories,
+ this._labels,
+ this._filteredAutomations
+ );
return html`
filter.value?.length)
- .length
+ Object.values(this._filters).filter((filter) =>
+ Array.isArray(filter.value)
+ ? filter.value.length
+ : filter.value &&
+ Object.values(filter.value).some((val) =>
+ Array.isArray(val) ? val.length : val
+ )
+ ).length
}
.columns=${this._columns(
this.narrow,
@@ -446,14 +464,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
this.hass.locale
)}
initialGroupColumn="category"
- .data=${this._automations(
- this.automations,
- this._entityReg,
- this.hass.areas,
- this._categories,
- this._labels,
- this._filteredAutomations
- )}
+ .data=${automations}
.empty=${!this.automations.length}
@row-click=${this._handleRowClicked}
.noDataText=${this.hass.localize(
diff --git a/src/panels/config/devices/ha-config-devices-dashboard.ts b/src/panels/config/devices/ha-config-devices-dashboard.ts
index f9f2fd16e6..68c402ee5c 100644
--- a/src/panels/config/devices/ha-config-devices-dashboard.ts
+++ b/src/panels/config/devices/ha-config-devices-dashboard.ts
@@ -591,7 +591,8 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
.tabs=${configSections.devices}
.route=${this.route}
.searchLabel=${this.hass.localize(
- "ui.panel.config.devices.picker.search"
+ "ui.panel.config.devices.picker.search",
+ { number: devicesOutput.length }
)}
.columns=${this._columns(this.hass.localize, this.narrow)}
.data=${devicesOutput}
@@ -600,8 +601,13 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
@selection-changed=${this._handleSelectionChanged}
.filter=${this._filter}
hasFilters
- .filters=${Object.values(this._filters).filter(
- (filter) => filter.value?.length
+ .filters=${Object.values(this._filters).filter((filter) =>
+ Array.isArray(filter.value)
+ ? filter.value.length
+ : filter.value &&
+ Object.values(filter.value).some((val) =>
+ Array.isArray(val) ? val.length : val
+ )
).length}
@clear-filter=${this._clearFilter}
@search-changed=${this._handleSearchChange}
diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts
index cf7f63d8d2..e98bc7b037 100644
--- a/src/panels/config/entities/ha-config-entities.ts
+++ b/src/panels/config/entities/ha-config-entities.ts
@@ -573,12 +573,19 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
)}
.data=${filteredEntities}
.searchLabel=${this.hass.localize(
- "ui.panel.config.entities.picker.search"
+ "ui.panel.config.entities.picker.search",
+ { number: filteredEntities.length }
)}
hasFilters
.filters=${
- Object.values(this._filters).filter((filter) => filter.value?.length)
- .length
+ Object.values(this._filters).filter((filter) =>
+ Array.isArray(filter.value)
+ ? filter.value.length
+ : filter.value &&
+ Object.values(filter.value).some((val) =>
+ Array.isArray(val) ? val.length : val
+ )
+ ).length
}
.filter=${this._filter}
selectable
diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts
index b32fa20750..e44659e34b 100644
--- a/src/panels/config/helpers/ha-config-helpers.ts
+++ b/src/panels/config/helpers/ha-config-helpers.ts
@@ -486,6 +486,16 @@ export class HaConfigHelpers extends SubscribeMixin(LitElement) {
const labelsInOverflow =
(this._sizeController.value && this._sizeController.value < 700) ||
(!this._sizeController.value && this.hass.dockedSidebar === "docked");
+ const helpers = this._getItems(
+ this.hass.localize,
+ this._stateItems,
+ this._entityEntries,
+ this._configEntries,
+ this._entityReg,
+ this._categories,
+ this._labels,
+ this._filteredStateItems
+ );
return html`
filter.value?.length
+ .filters=${Object.values(this._filters).filter((filter) =>
+ Array.isArray(filter.value)
+ ? filter.value.length
+ : filter.value &&
+ Object.values(filter.value).some((val) =>
+ Array.isArray(val) ? val.length : val
+ )
).length}
.columns=${this._columns(this.narrow, this.hass.localize)}
- .data=${this._getItems(
- this.hass.localize,
- this._stateItems,
- this._entityEntries,
- this._configEntries,
- this._entityReg,
- this._categories,
- this._labels,
- this._filteredStateItems
- )}
+ .data=${helpers}
initialGroupColumn="category"
.activeFilters=${this._activeFilters}
@clear-filter=${this._clearFilter}
diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts
index c07d31f7be..b798c0e3de 100644
--- a/src/panels/config/scene/ha-scene-dashboard.ts
+++ b/src/panels/config/scene/ha-scene-dashboard.ts
@@ -425,6 +425,14 @@ class HaSceneDashboard extends SubscribeMixin(LitElement) {
const labelsInOverflow =
(this._sizeController.value && this._sizeController.value < 700) ||
(!this._sizeController.value && this.hass.dockedSidebar === "docked");
+ const scenes = this._scenes(
+ this.scenes,
+ this._entityReg,
+ this.hass.areas,
+ this._categories,
+ this._labels,
+ this._filteredScenes
+ );
return html`
filter.value?.length
+ .filters=${Object.values(this._filters).filter((filter) =>
+ Array.isArray(filter.value)
+ ? filter.value.length
+ : filter.value &&
+ Object.values(filter.value).some((val) =>
+ Array.isArray(val) ? val.length : val
+ )
).length}
.columns=${this._columns(this.narrow, this.hass.localize)}
id="entity_id"
initialGroupColumn="category"
- .data=${this._scenes(
- this.scenes,
- this._entityReg,
- this.hass.areas,
- this._categories,
- this._labels,
- this._filteredScenes
- )}
+ .data=${scenes}
.empty=${!this.scenes.length}
.activeFilters=${this._activeFilters}
.noDataText=${this.hass.localize(
diff --git a/src/panels/config/script/ha-script-picker.ts b/src/panels/config/script/ha-script-picker.ts
index 2e769e8371..941d78a417 100644
--- a/src/panels/config/script/ha-script-picker.ts
+++ b/src/panels/config/script/ha-script-picker.ts
@@ -437,6 +437,14 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
const labelsInOverflow =
(this._sizeController.value && this._sizeController.value < 700) ||
(!this._sizeController.value && this.hass.dockedSidebar === "docked");
+ const scripts = this._scripts(
+ this.scripts,
+ this._entityReg,
+ this.hass.areas,
+ this._categories,
+ this._labels,
+ this._filteredScripts
+ );
return html`
filter.value?.length
+ .filters=${Object.values(this._filters).filter((filter) =>
+ Array.isArray(filter.value)
+ ? filter.value.length
+ : filter.value &&
+ Object.values(filter.value).some((val) =>
+ Array.isArray(val) ? val.length : val
+ )
).length}
.columns=${this._columns(
this.narrow,
this.hass.localize,
this.hass.locale
)}
- .data=${this._scripts(
- this.scripts,
- this._entityReg,
- this.hass.areas,
- this._categories,
- this._labels,
- this._filteredScripts
- )}
+ .data=${scripts}
.empty=${!this.scripts.length}
.activeFilters=${this._activeFilters}
id="entity_id"
diff --git a/src/translations/en.json b/src/translations/en.json
index facdbb7080..bf3e8b9053 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -501,6 +501,7 @@
},
"subpage-data-table": {
"filters": "Filters",
+ "show_results": "show {number} results",
"clear_filter": "Clear filter",
"close_filter": "Close filters",
"exit_selection_mode": "Exit selection mode",
@@ -2270,7 +2271,8 @@
"category": "Category"
},
"create_helper": "Create helper",
- "no_helpers": "Looks like you don't have any helpers yet!"
+ "no_helpers": "Looks like you don't have any helpers yet!",
+ "search": "Search {number} helpers"
},
"dialog": {
"create": "Create",
@@ -2684,6 +2686,7 @@
"assign_category": "Assign category",
"no_category_support": "You can't assign an category to this automation",
"no_category_entity_reg": "To assign an category to an automation it needs to have a unique ID.",
+ "search": "Search {number} automations",
"headers": {
"toggle": "Enable/disable",
"name": "Name",
@@ -3577,7 +3580,8 @@
"delete": "[%key:ui::common::delete%]",
"duplicate": "[%key:ui::common::duplicate%]",
"empty_header": "Create your first script",
- "empty_text": "A script is a sequence of actions that can be run from a dashboard, an automation, or be triggered by voice. For example, a ''Wake-up routine''' script that gradually turns on the light in the bedroom and opens the blinds after a delay."
+ "empty_text": "A script is a sequence of actions that can be run from a dashboard, an automation, or be triggered by voice. For example, a ''Wake-up routine''' script that gradually turns on the light in the bedroom and opens the blinds after a delay.",
+ "search": "Search {number} scripts"
},
"dialog_new": {
"header": "Create script",
@@ -3685,7 +3689,8 @@
"no_category_support": "You can't assign an category to this scene",
"no_category_entity_reg": "To assign an category to an scene it needs to have a unique ID.",
"empty_header": "Create your first scene",
- "empty_text": "Scenes capture entities' states, so you can re-experience the same scene later on. For example, a ''Watching TV'' scene that dims the living room lights, sets a warm white color and turns on the TV."
+ "empty_text": "Scenes capture entities' states, so you can re-experience the same scene later on. For example, a ''Watching TV'' scene that dims the living room lights, sets a warm white color and turns on the TV.",
+ "search": "Search {number} scenes"
},
"editor": {
"default_name": "New scene",
@@ -4010,7 +4015,7 @@
"confirm_delete": "Are you sure you want to delete this device?",
"confirm_delete_integration": "Are you sure you want to remove this device from {integration}?",
"picker": {
- "search": "Search devices",
+ "search": "Search {number} devices",
"state": "State"
}
},
@@ -4021,7 +4026,7 @@
"header": "Entities",
"introduction": "Home Assistant keeps a registry of every entity it has ever seen that can be uniquely identified. Each of these entities will have an entity ID assigned which will be reserved for just this entity.",
"introduction2": "Use the entity registry to override the name, change the entity ID or remove the entry from Home Assistant.",
- "search": "Search entities",
+ "search": "Search {number} entities",
"unnamed_entity": "Unnamed entity",
"status": {
"restored": "Restored",