UNPKG

@hakit/core

Version:

A collection of React hooks and helpers for Home Assistant to easily communicate with the Home Assistant WebSocket API.

16 lines (15 loc) 477 B
import { createCollection as r } from "home-assistant-js-websocket"; import { debounce as n } from "lodash"; const i = (t) => t.sendMessagePromise({ type: "config/entity_registry/list" }), y = (t, e) => t.subscribeEvents( n(() => i(t).then((s) => e.setState(s, !0)), 500, { leading: !0, trailing: !0 }), "entity_registry_updated" ), g = (t, e) => r("_entityRegistry", i, y, t, e); export { g as subscribeEntityRegistry }; //# sourceMappingURL=entities.js.map