UNPKG

@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) 448 B
import { createCollection as i } from "home-assistant-js-websocket"; import { debounce as a } from "lodash"; const t = (e) => e.sendMessagePromise({ type: "config/area_registry/list" }), o = (e, r) => e.subscribeEvents( a(() => t(e).then((s) => r.setState(s, !0)), 500, { leading: !0 }), "area_registry_updated" ), n = (e, r) => i("_areaRegistry", t, o, e, r); export { n as subscribeAreaRegistry }; //# sourceMappingURL=areas.js.map