mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 19:06:36 +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 = (
|
private _computeLabelCallback = (
|
||||||
schema: SchemaUnion<ReturnType<typeof this._schema>>
|
schema: SchemaUnion<ReturnType<typeof this._schema>>
|
||||||
): string => {
|
): string => {
|
||||||
const entity = this.condition.entity
|
|
||||||
? this.hass.states[this.condition.entity]
|
|
||||||
: undefined;
|
|
||||||
switch (schema.name) {
|
switch (schema.name) {
|
||||||
case "entity":
|
case "entity":
|
||||||
return this.hass.localize("ui.components.entity.entity-picker.entity");
|
return this.hass.localize("ui.components.entity.entity-picker.entity");
|
||||||
case "state":
|
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"
|
"ui.components.entity.entity-state-picker.state"
|
||||||
)}`;
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -6026,8 +6026,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"label": "Entity state",
|
"label": "Entity state",
|
||||||
"state_equal": "State is equal to",
|
"state_equal": "State is equal to",
|
||||||
"state_not_equal": "State is not equal to",
|
"state_not_equal": "State is not equal to"
|
||||||
"current_state": "current"
|
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"label": "User"
|
"label": "User"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user