diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts
index 87c9fb2336..4fe64de1a8 100644
--- a/src/panels/config/entities/ha-config-entities.ts
+++ b/src/panels/config/entities/ha-config-entities.ts
@@ -3,6 +3,7 @@ import {
mdiAlertCircle,
mdiCancel,
mdiDelete,
+ mdiEyeOff,
mdiFilterVariant,
mdiPencilOff,
mdiPlus,
@@ -251,7 +252,10 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
filterable: true,
width: "68px",
template: (_status, entity: EntityRow) =>
- entity.unavailable || entity.disabled_by || entity.readonly
+ entity.unavailable ||
+ entity.disabled_by ||
+ entity.hidden_by ||
+ entity.readonly
? html`
@@ -282,6 +288,10 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
? this.hass.localize(
"ui.panel.config.entities.picker.status.disabled"
)
+ : entity.hidden_by
+ ? this.hass.localize(
+ "ui.panel.config.entities.picker.status.hidden"
+ )
: this.hass.localize(
"ui.panel.config.entities.picker.status.readonly"
)}
@@ -543,6 +553,11 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
"ui.panel.config.entities.picker.disable_selected.button"
)}
+ ${this.hass.localize(
+ "ui.panel.config.entities.picker.hide_selected.button"
+ )}
${this.hass.localize(
"ui.panel.config.entities.picker.remove_selected.button"
@@ -572,6 +587,17 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
"ui.panel.config.entities.picker.disable_selected.button"
)}
+
+
+ ${this.hass.localize(
+ "ui.panel.config.entities.picker.hide_selected.button"
+ )}
+
{
+ this._selectedEntities.forEach((entity) =>
+ updateEntityRegistryEntry(this.hass, entity, {
+ hidden_by: "user",
+ })
+ );
+ this._clearSelection();
+ },
+ });
+ }
+
private _removeSelected() {
const removeableEntities = this._selectedEntities.filter((entity) => {
const stateObj = this.hass.states[entity];
diff --git a/src/translations/en.json b/src/translations/en.json
index fe235befe7..c87066ee6c 100755
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -297,6 +297,7 @@
"remove": "Remove",
"enable": "Enable",
"disable": "Disable",
+ "hide": "Hide",
"close": "Close",
"clear": "Clear",
"leave": "Leave",
@@ -2455,6 +2456,11 @@
"confirm_partly_title": "Only {number} {number, plural,\n one {selected entity}\n other {selected entities}\n} can be removed.",
"confirm_text": "You should remove them from your Lovelace config and automations if they contain these entities.",
"confirm_partly_text": "You can only remove {removable} of the selected {selected} entities. Entities can only be removed when the integration is no longer providing the entities. Sometimes you have to restart Home Assistant before you can remove the entities of a removed integration. Are you sure you want to remove the removable entities?"
+ },
+ "hide_selected": {
+ "button": "Hide selected",
+ "confirm_title": "Do you want to hide {number} {number, plural,\n one {entity}\n other {entities}\n}?",
+ "confirm_text": "Hidden entities will not be shown on your dashboard. Their history is still tracked and you can still interact with them with services."
}
}
},