From 5891a6ee7dab4e84522f62906b3b8505bcb17918 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 6 Nov 2018 11:25:25 +0100 Subject: [PATCH] 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 --- src/panels/lovelace/cards/hui-thermostat-card.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index b072ef5561..2619009369 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -93,12 +93,15 @@ export class HuiThermostatCard extends hassLocalizeLitMixin(LitElement)
${computeStateName(stateObj)}
- ${ - stateObj.attributes.current_temperature - } - ${ - this.hass.config.unit_system.temperature - } + + ${stateObj.attributes.current_temperature} + ${ + stateObj.attributes.current_temperature + ? html`${ + this.hass.config.unit_system.temperature + }` + : "" + }