1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Update hui-thermostat-card.ts (#4863)

This commit is contained in:
Bram Kragten
2020-02-13 17:41:51 +01:00
committed by GitHub
parent 6feaf64c90
commit 485e2fde25

View File

@@ -269,7 +269,11 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
applyThemesOnElement(this, this.hass.themes, this._config.theme);
}
this._setTemp = this._getSetTemp(this.hass!.states[this._config!.entity]);
const stateObj = this.hass!.states[this._config!.entity];
if (!stateObj) {
return;
}
this._setTemp = this._getSetTemp(stateObj);
this.rescale_svg();
}