1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 12:49:19 +00:00

Use new logbook streaming websocket api for cases where we need end_time (#12753)

This commit is contained in:
J. Nick Koston
2022-05-23 17:40:05 -05:00
committed by GitHub
parent a02b817d7f
commit 067c2fdfa8
2 changed files with 12 additions and 45 deletions

View File

@@ -165,6 +165,7 @@ export const subscribeLogbook = (
hass: HomeAssistant,
callbackFunction: (message: LogbookEntry[]) => void,
startDate: string,
endDate: string,
entityIds?: string[],
deviceIds?: string[]
): Promise<UnsubscribeFunc> => {
@@ -179,6 +180,7 @@ export const subscribeLogbook = (
const params: any = {
type: "logbook/event_stream",
start_time: startDate,
end_time: endDate,
};
if (entityIds?.length) {
params.entity_ids = entityIds;