From 094ab8141026d728d396620b9e36eaa1c35b0627 Mon Sep 17 00:00:00 2001 From: karwosts Date: Thu, 28 Dec 2023 07:07:38 -0800 Subject: [PATCH] disable instead of hide button. reduce buttons in narrow mode. enable disabled_by integration --- .../config/entities/ha-config-entities.ts | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index bf3fb0b8c7e1..fded2adda95f 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -535,45 +535,43 @@ export class HaConfigEntities extends LitElement {

${!this.narrow - ? html` - ${this._selectedCanEnable - ? html`${this.hass.localize( - "ui.panel.config.entities.picker.enable_selected.button" - )}` - : nothing} - ${this._selectedCanDisable - ? html`${this.hass.localize( - "ui.panel.config.entities.picker.disable_selected.button" - )}` - : nothing} - ${this._selectedCanHide - ? html`${this.hass.localize( - "ui.panel.config.entities.picker.hide_selected.button" - )}` - : nothing} - ${this._selectedCanUnhide - ? html`${this.hass.localize( - "ui.panel.config.entities.picker.unhide_selected.button" - )}` - : nothing} + ? html`${this.hass.localize( + "ui.panel.config.entities.picker.enable_selected.button" + )} + ${this.hass.localize( + "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.unhide_selected.button" + )} ${this.hass.localize( "ui.panel.config.entities.picker.remove_selected.button" )} - ` + > ` : html` - ${this._selectedCanEnable + ${this._selectedCanEnable && !this._selectedCanDisable ? html`` : nothing} - ${this._selectedCanHide + ${this._selectedCanHide && !this._selectedCanUnhide ? html` h); this._selectedCanHide = hidden.some((h) => h === null); - this._selectedCanEnable = disabled.some((d) => d === "user"); + this._selectedCanEnable = disabled.some( + (d) => d === "user" || d === "integration" + ); this._selectedCanDisable = disabled.some((d) => d === null); } }