From ac6e61b9b8c3e21339d687b14b6dc999ef0b7cb8 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 20 Nov 2024 06:43:21 -0800 Subject: [PATCH] Remove display of 'Current state' in ha-card-condition-state (#22887) --- .../conditions/types/ha-card-condition-state.ts | 15 ++------------- src/translations/en.json | 3 +-- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/panels/lovelace/editor/conditions/types/ha-card-condition-state.ts b/src/panels/lovelace/editor/conditions/types/ha-card-condition-state.ts index 6a1b52ccdc..e6012b983f 100644 --- a/src/panels/lovelace/editor/conditions/types/ha-card-condition-state.ts +++ b/src/panels/lovelace/editor/conditions/types/ha-card-condition-state.ts @@ -140,24 +140,13 @@ export class HaCardConditionState extends LitElement { private _computeLabelCallback = ( schema: SchemaUnion> ): string => { - const entity = this.condition.entity - ? this.hass.states[this.condition.entity] - : undefined; switch (schema.name) { case "entity": return this.hass.localize("ui.components.entity.entity-picker.entity"); case "state": - if (entity) { - return `${this.hass.localize( - "ui.components.entity.entity-state-picker.state" - )} (${this.hass.localize( - "ui.panel.lovelace.editor.condition-editor.condition.state.current_state" - )}: ${this.hass.formatEntityState(entity)})`; - } - return `${this.hass.localize( + return this.hass.localize( "ui.components.entity.entity-state-picker.state" - )}`; - + ); default: return ""; } diff --git a/src/translations/en.json b/src/translations/en.json index 1dc1d8a1f5..024616efe1 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6026,8 +6026,7 @@ "state": { "label": "Entity state", "state_equal": "State is equal to", - "state_not_equal": "State is not equal to", - "current_state": "current" + "state_not_equal": "State is not equal to" }, "user": { "label": "User"