@hakit/core
Version:
A collection of React hooks and helpers for Home Assistant to easily communicate with the Home Assistant WebSocket API.
15 lines (14 loc) • 459 B
JavaScript
import { createCollection as r } from "home-assistant-js-websocket";
import { debounce as n } from "lodash";
const s = (t) => t.sendMessagePromise({
type: "config/entity_registry/list"
}), y = (t, e) => t.subscribeEvents(
n(() => s(t).then((i) => e.setState(i, !0)), 500, {
leading: !0
}),
"entity_registry_updated"
), g = (t, e) => r("_entityRegistry", s, y, t, e);
export {
g as subscribeEntityRegistry
};
//# sourceMappingURL=entities.js.map