UNPKG

@hakit/core

Version:

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

3 lines (2 loc) 443 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("home-assistant-js-websocket"),c=require("lodash"),t=e=>e.sendMessagePromise({type:"config/device_registry/list"}),o=(e,s)=>e.subscribeEvents(c.debounce(()=>t(e).then(i=>s.setState(i,!0)),500,{leading:!0}),"device_registry_updated"),n=(e,s)=>r.createCollection("_dr",t,o,e,s);exports.subscribeDeviceRegistry=n; //# sourceMappingURL=devices.js.map