From 3fa330acfb8ce7c02daad3a52dd1304621a45ad3 Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Wed, 3 Dec 2025 13:40:29 +0300 Subject: [PATCH] computeLovelaceEntityName(): allow "number" names to be processed (#28231) * allow "number" names to be processed * Apply suggestion from @MindFreeze --------- Co-authored-by: Petar Petrov --- .../lovelace/common/entity/compute-lovelace-entity-name.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/common/entity/compute-lovelace-entity-name.ts b/src/panels/lovelace/common/entity/compute-lovelace-entity-name.ts index 1eaae90d01..e529f338ce 100644 --- a/src/panels/lovelace/common/entity/compute-lovelace-entity-name.ts +++ b/src/panels/lovelace/common/entity/compute-lovelace-entity-name.ts @@ -21,8 +21,8 @@ export const computeLovelaceEntityName = ( if (!config) { return stateObj ? computeStateName(stateObj) : ""; } - if (typeof config === "string") { - return config; + if (typeof config !== "object") { + return String(config); } if (stateObj) { return hass.formatEntityName(stateObj, config);