mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 21:17:47 +00:00
Remove entity_matches_only
This commit is contained in:
parent
c9c3be71cc
commit
44a52075ec
@ -46,7 +46,6 @@ export const getLogbookDataForContext = async (
|
|||||||
startDate,
|
startDate,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
|
||||||
contextId
|
contextId
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -56,20 +55,13 @@ export const getLogbookData = async (
|
|||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
startDate: string,
|
startDate: string,
|
||||||
endDate: string,
|
endDate: string,
|
||||||
entityId?: string,
|
entityId?: string
|
||||||
entity_matches_only?: boolean
|
|
||||||
): Promise<LogbookEntry[]> => {
|
): Promise<LogbookEntry[]> => {
|
||||||
const localize = await hass.loadBackendTranslation("device_class");
|
const localize = await hass.loadBackendTranslation("device_class");
|
||||||
return addLogbookMessage(
|
return addLogbookMessage(
|
||||||
hass,
|
hass,
|
||||||
localize,
|
localize,
|
||||||
await getLogbookDataCache(
|
await getLogbookDataCache(hass, startDate, endDate, entityId)
|
||||||
hass,
|
|
||||||
startDate,
|
|
||||||
endDate,
|
|
||||||
entityId,
|
|
||||||
entity_matches_only
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -97,8 +89,7 @@ export const getLogbookDataCache = async (
|
|||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
startDate: string,
|
startDate: string,
|
||||||
endDate: string,
|
endDate: string,
|
||||||
entityId?: string,
|
entityId?: string
|
||||||
entity_matches_only?: boolean
|
|
||||||
) => {
|
) => {
|
||||||
const ALL_ENTITIES = "*";
|
const ALL_ENTITIES = "*";
|
||||||
|
|
||||||
@ -125,8 +116,7 @@ export const getLogbookDataCache = async (
|
|||||||
hass,
|
hass,
|
||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
entityId !== ALL_ENTITIES ? entityId : undefined,
|
entityId !== ALL_ENTITIES ? entityId : undefined
|
||||||
entity_matches_only
|
|
||||||
).then((entries) => entries.reverse());
|
).then((entries) => entries.reverse());
|
||||||
return DATA_CACHE[cacheKey][entityId];
|
return DATA_CACHE[cacheKey][entityId];
|
||||||
};
|
};
|
||||||
@ -136,7 +126,6 @@ const getLogbookDataFromServer = async (
|
|||||||
startDate: string,
|
startDate: string,
|
||||||
endDate?: string,
|
endDate?: string,
|
||||||
entityId?: string,
|
entityId?: string,
|
||||||
entitymatchesOnly?: boolean,
|
|
||||||
contextId?: string
|
contextId?: string
|
||||||
) => {
|
) => {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
@ -147,9 +136,6 @@ const getLogbookDataFromServer = async (
|
|||||||
if (entityId) {
|
if (entityId) {
|
||||||
params.append("entity", entityId);
|
params.append("entity", entityId);
|
||||||
}
|
}
|
||||||
if (entitymatchesOnly) {
|
|
||||||
params.append("entity_matches_only", "");
|
|
||||||
}
|
|
||||||
if (contextId) {
|
if (contextId) {
|
||||||
params.append("context_id", contextId);
|
params.append("context_id", contextId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user