1
mirror of https://github.com/home-assistant/frontend synced 2024-09-28 00:43:28 +02:00
ha-frontend/src/data/bootstrap_integrations.ts

19 lines
475 B
TypeScript
Raw Permalink Normal View History

import { HomeAssistant } from "../types";
export type BootstrapIntegrationsTimings = { [key: string]: number };
export const subscribeBootstrapIntegrations = (
hass: HomeAssistant,
callback: (message: BootstrapIntegrationsTimings) => void
) => {
const unsubProm =
hass.connection.subscribeMessage<BootstrapIntegrationsTimings>(
(message) => callback(message),
{
type: "subscribe_bootstrap_integrations",
}
);
return unsubProm;
};