UNPKG

@hakit/core

Version:

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

20 lines (19 loc) 721 B
import { useMemo as o } from "react"; import "lodash"; import "../../utils/light/index.js"; import "../useLocale/locales/index.js"; import { ON as t } from "../../data/entity.js"; import "../../../index-BfdcdUoC.js"; import "../../HassConnect/HassContext.js"; import "@iconify/react"; import "use-debounce"; import "home-assistant-js-websocket"; import { LIGHT_COLOR_MODES as e } from "../../types/autogenerated-types-by-domain.js"; const c = (r) => o(() => { if (r.state === t) return r.attributes.color_mode === e.COLOR_TEMP ? r.attributes.color_temp_kelvin : void 0; }, [r.state, r.attributes.color_mode, r.attributes.color_temp_kelvin]); export { c as useLightTemperature }; //# sourceMappingURL=index.js.map