From f7cb83482aec1412be84105adcb125c37626554c Mon Sep 17 00:00:00 2001 From: ildar170975 <71872483+ildar170975@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:54:22 +0300 Subject: [PATCH] computeAttributeValueDisplay: process "undefined" like "null" (#24712) treat "undefined" as "null" --- src/common/entity/compute_attribute_display.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/entity/compute_attribute_display.ts b/src/common/entity/compute_attribute_display.ts index b3da42c10b..bee5735f01 100644 --- a/src/common/entity/compute_attribute_display.ts +++ b/src/common/entity/compute_attribute_display.ts @@ -34,7 +34,7 @@ export const computeAttributeValueDisplay = ( value !== undefined ? value : stateObj.attributes[attribute]; // Null value, the state is unknown - if (attributeValue === null) { + if (attributeValue === null || attributeValue === undefined) { return localize("state.default.unknown"); }