diff --git a/src/panels/lovelace/entity-rows/hui-timer-entity-row.ts b/src/panels/lovelace/entity-rows/hui-timer-entity-row.ts index a8fc0f0b2a..448ccc4574 100644 --- a/src/panels/lovelace/entity-rows/hui-timer-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-timer-entity-row.ts @@ -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); }