fix for thermostat reporting null target temp (#2730)

* fix for thermostat reporting null target temp

* address review comments
This commit is contained in:
Ian Richardson 2019-02-17 22:00:21 -06:00 committed by Paulus Schoutsen
parent b6b224be77
commit 7d8f790708

View File

@ -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];