From 621918e84af35f328fbe3919c22b5f7b013ce2b1 Mon Sep 17 00:00:00 2001 From: karwosts Date: Fri, 22 Dec 2023 13:12:03 -0800 Subject: [PATCH] Fix entities sort for hidden/readonly --- src/panels/config/entities/ha-config-entities.ts | 10 ++++++++-- src/translations/en.json | 3 +-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index 76cb5e43c91f..f2e121e4ce08 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -74,7 +74,7 @@ export interface EntityRow extends StateEntity { entity?: HassEntity; unavailable: boolean; restored: boolean; - status: string; + status: string | undefined; area?: string; localized_platform: string; } @@ -429,7 +429,13 @@ export class HaConfigEntities extends LitElement { ? localize("ui.panel.config.entities.picker.status.unavailable") : entry.disabled_by ? localize("ui.panel.config.entities.picker.status.disabled") - : localize("ui.panel.config.entities.picker.status.ok"), + : entry.hidden_by + ? localize("ui.panel.config.entities.picker.status.hidden") + : entry.readonly + ? localize( + "ui.panel.config.entities.picker.status.readonly" + ) + : undefined, }); } diff --git a/src/translations/en.json b/src/translations/en.json index 1917d1e8f672..49d9def4f0f7 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -3607,8 +3607,7 @@ "unavailable": "Unavailable", "disabled": "Disabled", "readonly": "Read-only", - "hidden": "Hidden", - "ok": "Ok" + "hidden": "Hidden" }, "headers": { "state_icon": "State icon",