Fix for thermostats without current temperature (#1979)

* fix for thermostats without current temperature

* make linter happy

* always render value, uom only when there is a value

* Update hui-thermostat-card.ts
This commit is contained in:
Michael Scherer 2018-11-06 11:25:25 +01:00 committed by Paulus Schoutsen
parent c10e409634
commit 5891a6ee7d

View File

@ -93,12 +93,15 @@ export class HuiThermostatCard extends hassLocalizeLitMixin(LitElement)
<div id="tooltip"> <div id="tooltip">
<div class="title">${computeStateName(stateObj)}</div> <div class="title">${computeStateName(stateObj)}</div>
<div class="current-temperature"> <div class="current-temperature">
<span class="current-temperature-text">${ <span class="current-temperature-text">
stateObj.attributes.current_temperature ${stateObj.attributes.current_temperature}
} ${
<span class="uom">${ stateObj.attributes.current_temperature
this.hass.config.unit_system.temperature ? html`<span class="uom">${
}</span> this.hass.config.unit_system.temperature
}</span>`
: ""
}
</span> </span>
</div> </div>
<div class="climate-info"> <div class="climate-info">