1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-17 23:54:28 +01:00

Only display entity name instead of friendly name in state info (#30365)

This commit is contained in:
Paul Bottein
2026-03-27 08:41:11 +01:00
committed by GitHub
parent 994193465f
commit 9bd5e25ee3

View File

@@ -1,11 +1,10 @@
import type { HassEntity } from "home-assistant-js-websocket";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { computeStateName } from "../../common/entity/compute_state_name";
import type { HomeAssistant } from "../../types";
import "../ha-relative-time";
import "./state-badge";
import "../ha-tooltip";
import "./state-badge";
@customElement("state-info")
class StateInfo extends LitElement {
@@ -22,7 +21,7 @@ class StateInfo extends LitElement {
return nothing;
}
const name = computeStateName(this.stateObj);
const name = this.hass.formatEntityName(this.stateObj, { type: "entity" });
return html`<state-badge
.hass=${this.hass}