From fbe4550c78696212ee4fe93e2b352a36fc8bd5f1 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 17 Jan 2020 16:08:18 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20display=20of=20current/set?= =?UTF-8?q?=20temperature=20when=200=20(#4498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix display of current/set temperature when 0 * 👌 nullish coalescing --- src/panels/lovelace/cards/hui-thermostat-card.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 60874e7c65..6d67095465 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -129,7 +129,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard { > `; - const currentTemperature = stateObj.attributes.current_temperature + const currentTemperature = !isNaN(stateObj.attributes.current_temperature) ? svg` ${ - !this._setTemp + this._setTemp === undefined || this._setTemp === null ? "" : Array.isArray(this._setTemp) ? this._stepSize === 1