mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Fix second visit to history panel (#1835)
This commit is contained in:
parent
c190f1986e
commit
4f8c8762c7
@ -155,7 +155,7 @@ class HaStateHistoryData extends LocalizeMixin(PolymerElement) {
|
|||||||
|
|
||||||
static get observers() {
|
static get observers() {
|
||||||
return [
|
return [
|
||||||
"filterChangedDebouncer(filterType, entityId, startTime, endTime, cacheConfig, localize, language)",
|
"filterChangedDebouncer(filterType, entityId, startTime, endTime, cacheConfig, localize)",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,8 +167,7 @@ class HaStateHistoryData extends LocalizeMixin(PolymerElement) {
|
|||||||
this.startTime,
|
this.startTime,
|
||||||
this.endTime,
|
this.endTime,
|
||||||
this.cacheConfig,
|
this.cacheConfig,
|
||||||
this.localize,
|
this.localize
|
||||||
this.hass.language
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,8 +187,7 @@ class HaStateHistoryData extends LocalizeMixin(PolymerElement) {
|
|||||||
this.startTime,
|
this.startTime,
|
||||||
this.endTime,
|
this.endTime,
|
||||||
this.cacheConfig,
|
this.cacheConfig,
|
||||||
this.localize,
|
this.localize
|
||||||
this.hass.language
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -210,13 +208,18 @@ class HaStateHistoryData extends LocalizeMixin(PolymerElement) {
|
|||||||
startTime,
|
startTime,
|
||||||
endTime,
|
endTime,
|
||||||
cacheConfig,
|
cacheConfig,
|
||||||
localize,
|
localize
|
||||||
language
|
|
||||||
) {
|
) {
|
||||||
if (!this.hass) return;
|
if (!this.hass) {
|
||||||
if (cacheConfig && !cacheConfig.cacheKey) return;
|
return;
|
||||||
if (!localize || !language) return;
|
}
|
||||||
this._madeFirstCall = true;
|
if (cacheConfig && !cacheConfig.cacheKey) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!localize) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const language = this.hass.language;
|
||||||
let data;
|
let data;
|
||||||
|
|
||||||
if (filterType === "date") {
|
if (filterType === "date") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user