🐛 fix display of current/set temperature when 0 (#4498)

* 🐛 fix display of current/set temperature when 0

* 👌 nullish coalescing
This commit is contained in:
Ian Richardson 2020-01-17 16:08:18 -06:00 committed by Bram Kragten
parent 8c49e3c4ef
commit fbe4550c78

View File

@ -129,7 +129,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
></round-slider>
`;
const currentTemperature = stateObj.attributes.current_temperature
const currentTemperature = !isNaN(stateObj.attributes.current_temperature)
? svg`
<svg viewBox="0 0 40 20">
<text
@ -153,7 +153,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
<g>
<text text-anchor="middle" class="set-value">
${
!this._setTemp
this._setTemp === undefined || this._setTemp === null
? ""
: Array.isArray(this._setTemp)
? this._stepSize === 1