From c5aa000a97db71d731d3adca8342b4bd35db7c0c Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 12 Feb 2020 13:48:27 +0100 Subject: [PATCH] Check for null target_temp (#4842) Fixes #4359 --- src/dialogs/more-info/controls/more-info-climate.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dialogs/more-info/controls/more-info-climate.ts b/src/dialogs/more-info/controls/more-info-climate.ts index 7837536d14..bb1a4b2275 100644 --- a/src/dialogs/more-info/controls/more-info-climate.ts +++ b/src/dialogs/more-info/controls/more-info-climate.ts @@ -100,7 +100,8 @@ class MoreInfoClimate extends LitElement { ` : ""} - ${stateObj.attributes.temperature !== undefined + ${stateObj.attributes.temperature !== undefined && + stateObj.attributes.temperature !== null ? html` ` : ""} - ${stateObj.attributes.target_temp_low !== undefined || - stateObj.attributes.target_temp_high !== undefined + ${(stateObj.attributes.target_temp_low !== undefined && + stateObj.attributes.target_temp_low !== null) || + (stateObj.attributes.target_temp_high !== undefined && + stateObj.attributes.target_temp_high !== null) ? html`