Just add Log book to minute refresh

This commit is contained in:
Zack Arnett 2020-09-08 08:55:47 -05:00
parent 7edc9064d9
commit c934ab8d37

View File

@ -89,14 +89,7 @@ export class MoreInfoTabHistoryDialog extends LitElement {
return;
}
const oldHass = changedProps.get("hass") as HomeAssistant;
const newStateObj = this.hass.states[this.entityId];
const oldStateObj = oldHass?.states[this.entityId];
if (
changedProps.has("entityId") ||
(oldHass && newStateObj !== oldStateObj)
) {
if (changedProps.has("entityId")) {
this._stateHistory = undefined;
this._entries = undefined;
@ -106,6 +99,7 @@ export class MoreInfoTabHistoryDialog extends LitElement {
clearInterval(this._historyRefreshInterval);
this._historyRefreshInterval = window.setInterval(() => {
this._getStateHistory();
this._getLogBookData();
}, 60 * 1000);
}
}