1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

computeLovelaceEntityName(): allow "number" names to be processed (#28231)

* allow "number" names to be processed

* Apply suggestion from @MindFreeze

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
ildar170975
2025-12-03 13:40:29 +03:00
committed by GitHub
parent e0a6b671ce
commit 3fa330acfb

View File

@@ -21,8 +21,8 @@ export const computeLovelaceEntityName = (
if (!config) { if (!config) {
return stateObj ? computeStateName(stateObj) : ""; return stateObj ? computeStateName(stateObj) : "";
} }
if (typeof config === "string") { if (typeof config !== "object") {
return config; return String(config);
} }
if (stateObj) { if (stateObj) {
return hass.formatEntityName(stateObj, config); return hass.formatEntityName(stateObj, config);