mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Fix timer stops updating when changing views in LL (#3248)
* Fix timer stops updating when changing views in LL * Test if _config exists in connectedCallback() * Update hui-timer-entity-row.ts
This commit is contained in:
parent
4fdbec93b3
commit
a9d221147f
@ -40,6 +40,16 @@ class HuiTimerEntityRow extends LitElement {
|
||||
this._clearInterval();
|
||||
}
|
||||
|
||||
public connectedCallback(): void {
|
||||
super.connectedCallback();
|
||||
if (this._config && this._config.entity) {
|
||||
const stateObj = this.hass!.states[this._config!.entity];
|
||||
if (stateObj) {
|
||||
this._startInterval(stateObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
|
Loading…
x
Reference in New Issue
Block a user