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 class="title">${computeStateName(stateObj)}</div>
<div class="current-temperature">
<span class="current-temperature-text">${
stateObj.attributes.current_temperature
}
<span class="uom">${
this.hass.config.unit_system.temperature
}</span>
<span class="current-temperature-text">
${stateObj.attributes.current_temperature}
${
stateObj.attributes.current_temperature
? html`<span class="uom">${
this.hass.config.unit_system.temperature
}</span>`
: ""
}
</span>
</div>
<div class="climate-info">