mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Fix logbook stream subscription (#25927)
This commit is contained in:
@@ -114,9 +114,13 @@ const getLogbookDataFromServer = (
|
||||
|
||||
export const subscribeLogbook = (
|
||||
hass: HomeAssistant,
|
||||
callbackFunction: (message: LogbookStreamMessage) => void,
|
||||
callbackFunction: (
|
||||
message: LogbookStreamMessage,
|
||||
subscriptionId: number
|
||||
) => void,
|
||||
startDate: string,
|
||||
endDate: string,
|
||||
subscriptionId: number,
|
||||
entityIds?: string[],
|
||||
deviceIds?: string[]
|
||||
): Promise<UnsubscribeFunc> => {
|
||||
@@ -140,7 +144,7 @@ export const subscribeLogbook = (
|
||||
params.device_ids = deviceIds;
|
||||
}
|
||||
return hass.connection.subscribeMessage<LogbookStreamMessage>(
|
||||
(message) => callbackFunction(message),
|
||||
(message) => callbackFunction(message, subscriptionId),
|
||||
params
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user