Remove display of 'Current state' in ha-card-condition-state (#22887)

This commit is contained in:
karwosts 2024-11-20 06:43:21 -08:00 committed by GitHub
parent b7f3e40340
commit ac6e61b9b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 15 deletions

View File

@ -140,24 +140,13 @@ export class HaCardConditionState extends LitElement {
private _computeLabelCallback = (
schema: SchemaUnion<ReturnType<typeof this._schema>>
): 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 "";
}

View File

@ -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"