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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user