From 7d8f79070833120e7e081a4bcdcd914e20a3327e Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sun, 17 Feb 2019 22:00:21 -0600 Subject: [PATCH] fix for thermostat reporting null target temp (#2730) * fix for thermostat reporting null target temp * address review comments --- src/panels/lovelace/cards/hui-thermostat-card.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 8ddd77383..704b34b08 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -280,7 +280,10 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard { ); } else { sliderValue = stateObj.attributes.temperature; - uiValue = "" + stateObj.attributes.temperature; + uiValue = + stateObj.attributes.temperature !== null + ? String(stateObj.attributes.temperature) + : ""; } return [sliderValue, uiValue];