1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Fix cleanup of logbook when switching entities (#17575)

This commit is contained in:
Bram Kragten
2023-08-14 18:10:22 +02:00
committed by GitHub
parent 255137992b
commit c98cdb91e2
3 changed files with 32 additions and 47 deletions

View File

@@ -62,12 +62,6 @@ const triggerPhrases = {
"Home Assistant starting": "triggered_by_homeassistant_starting", // start event
};
const DATA_CACHE: {
[cacheKey: string]: {
[entityId: string]: Promise<LogbookEntry[]> | undefined;
};
} = {};
export const getLogbookDataForContext = async (
hass: HomeAssistant,
startDate: string,
@@ -144,10 +138,6 @@ export const subscribeLogbook = (
);
};
export const clearLogbookCache = (startDate: string, endDate: string) => {
DATA_CACHE[`${startDate}${endDate}`] = {};
};
export const createHistoricState = (
currentStateObj: HassEntity,
state?: string