UNPKG

@hakit/core

Version:

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

18 lines (17 loc) 433 B
import { timeCachePromiseFunc as c } from "./timeCacheFunctionPromise.js"; const o = (e) => e.sendMessagePromise({ type: "entity/source" }), n = (e, t) => c( "_entitySources", // cache key 3e4, // 30s TTL o, // underlying fetcher (s) => Object.keys(s.states).length, // invalidation heuristic based on entity count t, e ); export { n as fetchEntitySourcesWithCache }; //# sourceMappingURL=entity_sources.js.map