UNPKG

@hakit/core

Version:

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

181 lines (180 loc) 7.99 kB
import { rgbw2rgb as o, rgbww2rgb as t, temperature2rgb as s } from "./utils/colors/convert-light-color.js"; import { hex2rgb as m, hs2rgb as p, hsv2rgb as i, lab2hex as u, lab2rgb as f, rgb2hex as x, rgb2hs as T, rgb2hsv as l, rgb2lab as g } from "./utils/colors/convert-color.js"; import { COLORS as S, getColorByIndex as c } from "./utils/colors/colors.js"; import { THEME_COLORS as b, computeCssColor as E } from "./utils/colors/compute-color.js"; import { expandHex as I, hexBlend as C } from "./utils/colors/hex.js"; import { getRGBContrastRatio as R, luminosity as D, rgbContrast as N } from "./utils/colors/rgb.js"; import { stateColorBrightness as h } from "./utils/colors/index.js"; import { labBrighten as U, labDarken as y } from "./utils/colors/lab.js"; import { getLightCurrentModeRgbColor as F, lightIsInColorMode as d, lightSupportsBrightness as H, lightSupportsColor as v, lightSupportsColorMode as P } from "./utils/light/index.js"; import { getCssColorValue as W } from "./utils/colors.js"; import { computeDomain as w } from "./utils/computeDomain.js"; import { computeDomainTitle as G } from "./utils/computeDomainTitle.js"; import { supportsFeatureFromAttributes as K } from "./utils/supports-feature.js"; import { timeAgo as j } from "./utils/time/time-ago.js"; import { stateActive as J } from "./utils/entity.js"; import { toReadableString as Z } from "./utils/string.js"; import { formatNumber as ee, getDefaultFormatOptions as re, getNumberFormatOptions as oe, isNumericFromAttributes as te, isNumericState as se, round as ae } from "./utils/number.js"; import { UNIT_TO_MILLISECOND_CONVERT as pe, checkValidDate as ie, formatDate as ue, formatDateTime as fe, formatDuration as xe, formatTime as Te, isDate as le, isTimestamp as ge, millisecondsToDuration as ne } from "./utils/date.js"; import { DOMAIN_ATTRIBUTES_FORMATERS as ce, DOMAIN_ATTRIBUTES_UNITS as Ae, TEMPERATURE_ATTRIBUTES as be, computeAttributeValueDisplay as Ee, getWeatherUnit as _e } from "./utils/computeAttributeDisplay.js"; import { computeStateDisplay as Ce, computeStateDisplayFromEntityAttributes as Oe } from "./utils/computeStateDisplay.js"; import { DEFAULT_STATES as De, DOMAINS_WITH_DYNAMIC_PICTURE as Ne, OFF as Le, OFF_STATES as he, ON as Me, UNAVAILABLE as Ue, UNAVAILABLE_STATES as ye, UNIT_C as Be, UNIT_F as Fe, UNKNOWN as de, isOffState as He, isUnavailableState as ve } from "./data/entity.js"; import { H as Ve, l as We, d as ke, a as we, u as ze, b as Ge, c as Ye } from "../index-BfdcdUoC.js"; import { HassContext as Xe } from "./HassConnect/HassContext.js"; import { loadTokens as qe, saveTokens as Je } from "./HassConnect/token-storage.js"; import { g as Ze, u as $e, b as er, a as rr, c as or } from "../index-CG1EQGWs.js"; import { useEntities as sr } from "./hooks/useEntities/index.js"; import { createService as mr, useService as pr } from "./hooks/useService/index.js"; import { useLightBrightness as ur } from "./hooks/useLightBrightness/index.js"; import { useLightTemperature as xr } from "./hooks/useLightTemperature/index.js"; import { useLightColor as lr } from "./hooks/useLightColor/index.js"; import { useLowDevices as nr } from "./hooks/useLowDevices/index.js"; import { useDevice as cr } from "./hooks/useDevice/index.js"; import { useHistory as br } from "./hooks/useHistory/index.js"; import { coordinates as _r } from "./hooks/useHistory/coordinates.js"; import { useSubscribeEntity as Cr } from "./hooks/useSubscribeEntity/index.js"; import { useLogs as Rr } from "./hooks/useLogs/index.js"; import { useHaStatus as Nr } from "./hooks/useHaStatus/index.js"; import { useUser as hr } from "./hooks/useUser/index.js"; import { useStore as Ur } from "./hooks/useStore/index.js"; import { useUsers as Br } from "./hooks/useUsers/index.js"; import { useWeather as dr } from "./hooks/useWeather/index.js"; import { getSupportedForecastTypes as vr } from "./hooks/useWeather/helpers.js"; import { CONTINUOUS_DOMAINS as Vr, createHistoricState as Wr, localizeStateMessage as kr, localizeTriggerSource as wr, subscribeLogbook as zr } from "./hooks/useLogs/logbook.js"; import { useAreas as Yr } from "./hooks/useAreas/index.js"; import { default as Xr } from "./hooks/useLocale/locales/index.js"; import { subscribeAreaRegistry as qr } from "./hooks/useAreas/subscribe/areas.js"; import { subscribeEntityRegistry as Qr } from "./hooks/useAreas/subscribe/entities.js"; import { subscribeDeviceRegistry as $r } from "./hooks/useAreas/subscribe/devices.js"; import { useTemplate as ro } from "./hooks/useTemplate/index.js"; import { useCamera as to } from "./hooks/useCamera/index.js"; import { ASPECT_RATIO_DEFAULT as ao, CAMERA_ORIENTATIONS as mo, CAMERA_SUPPORT_ON_OFF as po, CAMERA_SUPPORT_STREAM as io, MAX_IMAGE_WIDTH as uo, STREAM_TYPE_HLS as fo, STREAM_TYPE_WEB_RTC as xo } from "./hooks/useCamera/constants.js"; import { LIGHT_COLOR_MODES as lo } from "./types/autogenerated-types-by-domain.js"; import { batteryIconByLevel as no } from "./hooks/useIcon/domains/battery.js"; export { ao as ASPECT_RATIO_DEFAULT, mo as CAMERA_ORIENTATIONS, po as CAMERA_SUPPORT_ON_OFF, io as CAMERA_SUPPORT_STREAM, S as COLORS, Vr as CONTINUOUS_DOMAINS, De as DEFAULT_STATES, Ne as DOMAINS_WITH_DYNAMIC_PICTURE, ce as DOMAIN_ATTRIBUTES_FORMATERS, Ae as DOMAIN_ATTRIBUTES_UNITS, Ve as HassConnect, Xe as HassContext, lo as LIGHT_COLOR_MODES, uo as MAX_IMAGE_WIDTH, Le as OFF, he as OFF_STATES, Me as ON, fo as STREAM_TYPE_HLS, xo as STREAM_TYPE_WEB_RTC, be as TEMPERATURE_ATTRIBUTES, b as THEME_COLORS, Ue as UNAVAILABLE, ye as UNAVAILABLE_STATES, Be as UNIT_C, Fe as UNIT_F, pe as UNIT_TO_MILLISECOND_CONVERT, de as UNKNOWN, no as batteryIconByLevel, ie as checkValidDate, Ee as computeAttributeValueDisplay, E as computeCssColor, w as computeDomain, G as computeDomainTitle, Ce as computeStateDisplay, Oe as computeStateDisplayFromEntityAttributes, _r as coordinates, Wr as createHistoricState, mr as createService, I as expandHex, ue as formatDate, fe as formatDateTime, xe as formatDuration, ee as formatNumber, Te as formatTime, c as getColorByIndex, W as getCssColorValue, re as getDefaultFormatOptions, Ze as getIconByEntity, F as getLightCurrentModeRgbColor, oe as getNumberFormatOptions, R as getRGBContrastRatio, vr as getSupportedForecastTypes, _e as getWeatherUnit, m as hex2rgb, C as hexBlend, p as hs2rgb, i as hsv2rgb, le as isDate, te as isNumericFromAttributes, se as isNumericState, He as isOffState, ge as isTimestamp, ve as isUnavailableState, u as lab2hex, f as lab2rgb, U as labBrighten, y as labDarken, d as lightIsInColorMode, H as lightSupportsBrightness, v as lightSupportsColor, P as lightSupportsColorMode, qe as loadTokens, Xr as locales, We as localize, kr as localizeStateMessage, wr as localizeTriggerSource, D as luminosity, ne as millisecondsToDuration, x as rgb2hex, T as rgb2hs, l as rgb2hsv, g as rgb2lab, N as rgbContrast, o as rgbw2rgb, t as rgbww2rgb, ae as round, Je as saveTokens, J as stateActive, h as stateColorBrightness, qr as subscribeAreaRegistry, $r as subscribeDeviceRegistry, Qr as subscribeEntityRegistry, zr as subscribeLogbook, K as supportsFeatureFromAttributes, s as temperature2rgb, j as timeAgo, Z as toReadableString, ke as updateLocales, Yr as useAreas, to as useCamera, we as useConfig, cr as useDevice, sr as useEntities, $e as useEntity, Nr as useHaStatus, ze as useHass, br as useHistory, er as useIcon, rr as useIconByDomain, or as useIconByEntity, ur as useLightBrightness, lr as useLightColor, xr as useLightTemperature, Ge as useLocale, Ye as useLocales, Rr as useLogs, nr as useLowDevices, pr as useService, Ur as useStore, Cr as useSubscribeEntity, ro as useTemplate, hr as useUser, Br as useUsers, dr as useWeather }; //# sourceMappingURL=index.js.map