Remove entity_matches_only

This commit is contained in:
Zack 2022-05-11 10:20:28 -05:00
parent c9c3be71cc
commit 44a52075ec
1 changed files with 4 additions and 18 deletions

View File

@ -46,7 +46,6 @@ export const getLogbookDataForContext = async (
startDate,
undefined,
undefined,
undefined,
contextId
)
);
@ -56,20 +55,13 @@ export const getLogbookData = async (
hass: HomeAssistant,
startDate: string,
endDate: string,
entityId?: string,
entity_matches_only?: boolean
entityId?: string
): Promise<LogbookEntry[]> => {
const localize = await hass.loadBackendTranslation("device_class");
return addLogbookMessage(
hass,
localize,
await getLogbookDataCache(
hass,
startDate,
endDate,
entityId,
entity_matches_only
)
await getLogbookDataCache(hass, startDate, endDate, entityId)
);
};
@ -97,8 +89,7 @@ export const getLogbookDataCache = async (
hass: HomeAssistant,
startDate: string,
endDate: string,
entityId?: string,
entity_matches_only?: boolean
entityId?: string
) => {
const ALL_ENTITIES = "*";
@ -125,8 +116,7 @@ export const getLogbookDataCache = async (
hass,
startDate,
endDate,
entityId !== ALL_ENTITIES ? entityId : undefined,
entity_matches_only
entityId !== ALL_ENTITIES ? entityId : undefined
).then((entries) => entries.reverse());
return DATA_CACHE[cacheKey][entityId];
};
@ -136,7 +126,6 @@ const getLogbookDataFromServer = async (
startDate: string,
endDate?: string,
entityId?: string,
entitymatchesOnly?: boolean,
contextId?: string
) => {
const params = new URLSearchParams();
@ -147,9 +136,6 @@ const getLogbookDataFromServer = async (
if (entityId) {
params.append("entity", entityId);
}
if (entitymatchesOnly) {
params.append("entity_matches_only", "");
}
if (contextId) {
params.append("context_id", contextId);
}