mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 10:56:34 +00:00
Remove display of 'Current state' in ha-card-condition-state (#22887)
This commit is contained in:
parent
b7f3e40340
commit
ac6e61b9b8
@ -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(
|
||||
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(
|
||||
"ui.components.entity.entity-state-picker.state"
|
||||
)}`;
|
||||
|
||||
);
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user