Update hui-timer-entity-row.ts

This commit is contained in:
Bram Kragten 2021-04-07 10:07:17 +02:00
parent 8dd3d78f21
commit 8f58eee6af
No known key found for this signature in database
GPG Key ID: FBE2DFDB363EF55B

View File

@ -41,7 +41,7 @@ class HuiTimerEntityRow extends LitElement {
public connectedCallback(): void {
super.connectedCallback();
if (this._config && this._config.entity) {
const stateObj = this.hass!.states[this._config!.entity];
const stateObj = this.hass?.states[this._config!.entity];
if (stateObj) {
this._startInterval(stateObj);
}