@digital-alchemy/hass 25.8.12-beta.0 → 25.10.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/dev/services.d.mts +1 -1
  2. package/dist/helpers/device.d.mts +1 -1
  3. package/dist/helpers/entity-state.d.mts +6 -6
  4. package/dist/helpers/fetch/calendar.d.mts +2 -2
  5. package/dist/helpers/fetch/configuration.d.mts +1 -1
  6. package/dist/helpers/fetch/service-list.d.mts +3 -3
  7. package/dist/helpers/fetch.d.mts +2 -2
  8. package/dist/helpers/fetch.mjs.map +1 -1
  9. package/dist/helpers/id-by.d.mts +1 -1
  10. package/dist/helpers/interfaces.d.mts +13 -12
  11. package/dist/helpers/interfaces.mjs.map +1 -1
  12. package/dist/helpers/registry.d.mts +1 -1
  13. package/dist/helpers/utility.d.mts +5 -5
  14. package/dist/helpers/utility.mjs.map +1 -1
  15. package/dist/helpers/websocket.d.mts +9 -8
  16. package/dist/merge.d.mts +1 -1
  17. package/dist/mock_assistant/helpers/fixtures.d.mts +2 -2
  18. package/dist/mock_assistant/main.mjs.map +1 -1
  19. package/dist/mock_assistant/services/area.service.d.mts +2 -2
  20. package/dist/mock_assistant/services/config.service.d.mts +2 -2
  21. package/dist/mock_assistant/services/config.service.mjs.map +1 -1
  22. package/dist/mock_assistant/services/device.service.d.mts +2 -2
  23. package/dist/mock_assistant/services/device.service.mjs.map +1 -1
  24. package/dist/mock_assistant/services/entity-registry.service.d.mts +3 -3
  25. package/dist/mock_assistant/services/entity.service.d.mts +3 -3
  26. package/dist/mock_assistant/services/entity.service.mjs.map +1 -1
  27. package/dist/mock_assistant/services/events.service.d.mts +3 -3
  28. package/dist/mock_assistant/services/events.service.mjs.map +1 -1
  29. package/dist/mock_assistant/services/fixtures.service.d.mts +4 -4
  30. package/dist/mock_assistant/services/fixtures.service.mjs.map +1 -1
  31. package/dist/mock_assistant/services/floor.service.d.mts +2 -2
  32. package/dist/mock_assistant/services/label.service.d.mts +2 -2
  33. package/dist/mock_assistant/services/services.service.d.mts +2 -2
  34. package/dist/mock_assistant/services/websocket-api.service.d.mts +4 -4
  35. package/dist/mock_assistant/services/websocket-api.service.mjs.map +1 -1
  36. package/dist/mock_assistant/services/zone.service.d.mts +2 -2
  37. package/dist/quickboot.module.d.mts +1 -1
  38. package/dist/quickboot.module.mjs.map +1 -1
  39. package/dist/services/area.service.d.mts +2 -2
  40. package/dist/services/area.service.mjs +1 -1
  41. package/dist/services/area.service.mjs.map +1 -1
  42. package/dist/services/backup.service.d.mts +2 -2
  43. package/dist/services/backup.service.mjs.map +1 -1
  44. package/dist/services/call-proxy.service.d.mts +2 -2
  45. package/dist/services/call-proxy.service.mjs +1 -1
  46. package/dist/services/call-proxy.service.mjs.map +1 -1
  47. package/dist/services/config.service.d.mts +2 -2
  48. package/dist/services/config.service.mjs +1 -2
  49. package/dist/services/config.service.mjs.map +1 -1
  50. package/dist/services/conversation.service.d.mts +2 -2
  51. package/dist/services/conversation.service.mjs +1 -1
  52. package/dist/services/conversation.service.mjs.map +1 -1
  53. package/dist/services/device.service.d.mts +2 -2
  54. package/dist/services/device.service.mjs +1 -1
  55. package/dist/services/device.service.mjs.map +1 -1
  56. package/dist/services/diagnostics.service.d.mts +1 -1
  57. package/dist/services/entity.service.d.mts +2 -2
  58. package/dist/services/entity.service.mjs +2 -2
  59. package/dist/services/entity.service.mjs.map +1 -1
  60. package/dist/services/events.service.d.mts +2 -2
  61. package/dist/services/events.service.mjs.map +1 -1
  62. package/dist/services/fetch-api.service.d.mts +5 -5
  63. package/dist/services/fetch-api.service.mjs +1 -1
  64. package/dist/services/fetch-api.service.mjs.map +1 -1
  65. package/dist/services/floor.service.d.mts +2 -2
  66. package/dist/services/floor.service.mjs +1 -1
  67. package/dist/services/floor.service.mjs.map +1 -1
  68. package/dist/services/id-by.service.d.mts +2 -2
  69. package/dist/services/id-by.service.mjs.map +1 -1
  70. package/dist/services/internal.service.d.mts +2 -2
  71. package/dist/services/internal.service.mjs +1 -1
  72. package/dist/services/internal.service.mjs.map +1 -1
  73. package/dist/services/label.service.d.mts +2 -2
  74. package/dist/services/label.service.mjs +1 -1
  75. package/dist/services/label.service.mjs.map +1 -1
  76. package/dist/services/reference.service.d.mts +2 -2
  77. package/dist/services/reference.service.mjs +1 -1
  78. package/dist/services/reference.service.mjs.map +1 -1
  79. package/dist/services/registry.service.d.mts +2 -2
  80. package/dist/services/websocket-api.service.d.mts +2 -2
  81. package/dist/services/websocket-api.service.mjs +2 -2
  82. package/dist/services/websocket-api.service.mjs.map +1 -1
  83. package/dist/services/zone.service.d.mts +2 -2
  84. package/dist/services/zone.service.mjs +1 -1
  85. package/dist/services/zone.service.mjs.map +1 -1
  86. package/dist/testing/area.spec.mjs.map +1 -1
  87. package/dist/testing/floor.spec.mjs.map +1 -1
  88. package/dist/testing/label.spec.mjs.map +1 -1
  89. package/dist/testing/zone.spec.mjs.map +1 -1
  90. package/package.json +29 -29
  91. package/src/dev/services.mts +1 -1
  92. package/src/helpers/device.mts +1 -1
  93. package/src/helpers/entity-state.mts +6 -6
  94. package/src/helpers/fetch/calendar.mts +2 -2
  95. package/src/helpers/fetch/configuration.mts +1 -1
  96. package/src/helpers/fetch/service-list.mts +3 -3
  97. package/src/helpers/fetch.mts +3 -2
  98. package/src/helpers/id-by.mts +1 -1
  99. package/src/helpers/interfaces.mts +14 -13
  100. package/src/helpers/registry.mts +1 -1
  101. package/src/helpers/utility.mts +6 -5
  102. package/src/helpers/websocket.mts +12 -8
  103. package/src/merge.mts +1 -1
  104. package/src/mock_assistant/helpers/fixtures.mts +2 -2
  105. package/src/mock_assistant/main.mts +3 -2
  106. package/src/mock_assistant/services/area.service.mts +3 -3
  107. package/src/mock_assistant/services/config.service.mts +3 -2
  108. package/src/mock_assistant/services/device.service.mts +4 -3
  109. package/src/mock_assistant/services/entity-registry.service.mts +3 -3
  110. package/src/mock_assistant/services/entity.service.mts +4 -3
  111. package/src/mock_assistant/services/events.service.mts +4 -3
  112. package/src/mock_assistant/services/fixtures.service.mts +5 -4
  113. package/src/mock_assistant/services/floor.service.mts +3 -3
  114. package/src/mock_assistant/services/label.service.mts +3 -3
  115. package/src/mock_assistant/services/services.service.mts +2 -2
  116. package/src/mock_assistant/services/websocket-api.service.mts +5 -4
  117. package/src/mock_assistant/services/zone.service.mts +3 -3
  118. package/src/quickboot.module.mts +2 -1
  119. package/src/services/area.service.mts +5 -11
  120. package/src/services/backup.service.mts +3 -2
  121. package/src/services/call-proxy.service.mts +4 -4
  122. package/src/services/config.service.mts +5 -8
  123. package/src/services/conversation.service.mts +3 -7
  124. package/src/services/device.service.mts +4 -8
  125. package/src/services/diagnostics.service.mts +1 -1
  126. package/src/services/entity.service.mts +7 -15
  127. package/src/services/events.service.mts +2 -3
  128. package/src/services/fetch-api.service.mts +8 -7
  129. package/src/services/floor.service.mts +5 -10
  130. package/src/services/id-by.service.mts +5 -3
  131. package/src/services/internal.service.mts +4 -4
  132. package/src/services/label.service.mts +5 -10
  133. package/src/services/reference.service.mts +8 -7
  134. package/src/services/registry.service.mts +2 -2
  135. package/src/services/websocket-api.service.mts +10 -15
  136. package/src/services/zone.service.mts +4 -10
  137. package/src/testing/area.spec.mts +3 -2
  138. package/src/testing/backup.spec.mts +1 -1
  139. package/src/testing/config.spec.mts +1 -1
  140. package/src/testing/device.spec.mts +1 -1
  141. package/src/testing/entity.spec.mts +2 -2
  142. package/src/testing/fetch-api.spec.mts +2 -2
  143. package/src/testing/floor.spec.mts +3 -2
  144. package/src/testing/id-by.spec.mts +1 -1
  145. package/src/testing/label.spec.mts +3 -2
  146. package/src/testing/ref-by.spec.mts +2 -2
  147. package/src/testing/zone.spec.mts +2 -1
@@ -1,15 +1,9 @@
1
- import { debounce, eachSeries, InternalError, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { debounce, eachSeries, InternalError } from "@digital-alchemy/core";
2
3
 
3
- import {
4
- AREA_REGISTRY_UPDATED,
5
- AreaCreate,
6
- AreaDetails,
7
- EARLY_ON_READY,
8
- ENTITY_REGISTRY_UPDATED,
9
- HassAreaService,
10
- perf,
11
- } from "../index.mts";
12
- import { ANY_ENTITY, TAreaId } from "../user.mts";
4
+ import type { AreaCreate, AreaDetails, HassAreaService } from "../index.mts";
5
+ import { AREA_REGISTRY_UPDATED, EARLY_ON_READY, ENTITY_REGISTRY_UPDATED, perf } from "../index.mts";
6
+ import type { ANY_ENTITY, TAreaId } from "../user.mts";
13
7
 
14
8
  export function Area({
15
9
  hass,
@@ -1,6 +1,7 @@
1
- import { SECOND, sleep, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { SECOND, sleep } from "@digital-alchemy/core";
2
3
 
3
- import {
4
+ import type {
4
5
  BackupResponse,
5
6
  HassBackupService,
6
7
  HomeAssistantBackup,
@@ -1,12 +1,12 @@
1
- import { TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
2
 
3
- import {
3
+ import type {
4
4
  ALL_SERVICE_DOMAINS,
5
- perf,
6
5
  PICK_SERVICE,
7
6
  PICK_SERVICE_PARAMETERS,
8
7
  } from "../helpers/index.mts";
9
- import { iCallService } from "../user.mts";
8
+ import { perf } from "../helpers/index.mts";
9
+ import type { iCallService } from "../user.mts";
10
10
 
11
11
  export function CallProxy({
12
12
  logger,
@@ -1,14 +1,11 @@
1
1
  /* eslint-disable @typescript-eslint/no-magic-numbers */
2
- import { asyncNoop, INCREMENT, SECOND, sleep, START, TServiceParams } from "@digital-alchemy/core";
2
+ import type { TServiceParams } from "@digital-alchemy/core";
3
+ import { asyncNoop, INCREMENT, SECOND, sleep, START } from "@digital-alchemy/core";
3
4
  import { env } from "process";
4
5
 
5
- import {
6
- ALL_SERVICE_DOMAINS,
7
- HassConfigService,
8
- HassServiceDTO,
9
- PostConfigPriorities,
10
- } from "../helpers/index.mts";
11
- import { iCallService } from "../user.mts";
6
+ import type { ALL_SERVICE_DOMAINS, HassConfigService, HassServiceDTO } from "../helpers/index.mts";
7
+ import { PostConfigPriorities } from "../helpers/index.mts";
8
+ import type { iCallService } from "../user.mts";
12
9
 
13
10
  const MAX_ATTEMPTS = 50;
14
11
  const FAILED = 1;
@@ -1,11 +1,7 @@
1
- import { TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
2
 
3
- import {
4
- EditAliasOptions,
5
- HassConversationService,
6
- ToggleExpose,
7
- UPDATE_REGISTRY,
8
- } from "../helpers/index.mts";
3
+ import type { EditAliasOptions, HassConversationService, ToggleExpose } from "../helpers/index.mts";
4
+ import { UPDATE_REGISTRY } from "../helpers/index.mts";
9
5
 
10
6
  export function Conversation({ hass, logger }: TServiceParams): HassConversationService {
11
7
  async function addAlias({ entity, alias }: EditAliasOptions) {
@@ -1,12 +1,8 @@
1
- import { debounce, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { debounce } from "@digital-alchemy/core";
2
3
 
3
- import {
4
- DEVICE_REGISTRY_UPDATED,
5
- DeviceDetails,
6
- EARLY_ON_READY,
7
- HassDeviceService,
8
- perf,
9
- } from "../helpers/index.mts";
4
+ import type { DeviceDetails, HassDeviceService } from "../helpers/index.mts";
5
+ import { DEVICE_REGISTRY_UPDATED, EARLY_ON_READY, perf } from "../helpers/index.mts";
10
6
 
11
7
  export function Device({
12
8
  hass,
@@ -1,4 +1,4 @@
1
- import { TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
2
  import { channel } from "diagnostics_channel";
3
3
 
4
4
  function createDiagnostics<CHANNEL extends string>(context: string, channels: CHANNEL[]) {
@@ -1,28 +1,20 @@
1
- import {
2
- debounce,
3
- each,
4
- eachSeries,
5
- INCREMENT,
6
- SECOND,
7
- sleep,
8
- START,
9
- TServiceParams,
10
- } from "@digital-alchemy/core";
11
- import dayjs, { Dayjs } from "dayjs";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { debounce, each, eachSeries, INCREMENT, SECOND, sleep, START } from "@digital-alchemy/core";
3
+ import type { Dayjs } from "dayjs";
4
+ import dayjs from "dayjs";
12
5
 
13
- import {
6
+ import type {
14
7
  EditLabelOptions,
15
- ENTITY_REGISTRY_UPDATED,
16
8
  ENTITY_STATE,
17
9
  EntityHistoryDTO,
18
10
  EntityHistoryItem,
19
11
  EntityHistoryResult,
20
12
  EntityRegistryItem,
21
13
  HassEntityManager,
22
- perf,
23
14
  TMasterState,
24
15
  } from "../index.mts";
25
- import { ALL_DOMAINS, ANY_ENTITY, PICK_ENTITY } from "../user.mts";
16
+ import { ENTITY_REGISTRY_UPDATED, perf } from "../index.mts";
17
+ import type { ALL_DOMAINS, ANY_ENTITY, PICK_ENTITY } from "../user.mts";
26
18
 
27
19
  const MAX_ATTEMPTS = 10;
28
20
  const RECENT = 5;
@@ -1,13 +1,12 @@
1
- import { TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
2
 
3
+ import type { HassEventsService, SimpleCallback } from "../helpers/index.mts";
3
4
  import {
4
5
  AREA_REGISTRY_UPDATED,
5
6
  DEVICE_REGISTRY_UPDATED,
6
7
  ENTITY_REGISTRY_UPDATED,
7
8
  FLOOR_REGISTRY_UPDATED,
8
- HassEventsService,
9
9
  LABEL_REGISTRY_UPDATED,
10
- SimpleCallback,
11
10
  ZONE_REGISTRY_UPDATED,
12
11
  } from "../helpers/index.mts";
13
12
 
@@ -1,8 +1,10 @@
1
- import { DOWN, NO_CHANGE, SECOND, TServiceParams, UP } from "@digital-alchemy/core";
2
- import dayjs, { Dayjs } from "dayjs";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { DOWN, NO_CHANGE, SECOND, UP } from "@digital-alchemy/core";
3
+ import type { Dayjs } from "dayjs";
4
+ import dayjs from "dayjs";
3
5
 
4
- import { FetchArguments, FilteredFetchArguments, TFetchBody } from "../helpers/fetch.mts";
5
- import {
6
+ import type { FetchArguments, FilteredFetchArguments, TFetchBody } from "../helpers/fetch.mts";
7
+ import type {
6
8
  ALL_SERVICE_DOMAINS,
7
9
  CalendarEvent,
8
10
  CalendarFetchOptions,
@@ -11,13 +13,12 @@ import {
11
13
  HassConfig,
12
14
  HassServiceDTO,
13
15
  HomeAssistantServerLogItem,
14
- perf,
15
16
  PICK_SERVICE,
16
17
  PICK_SERVICE_PARAMETERS,
17
- PostConfigPriorities,
18
18
  RawCalendarEvent,
19
19
  } from "../helpers/index.mts";
20
- import { ANY_ENTITY } from "../user.mts";
20
+ import { perf, PostConfigPriorities } from "../helpers/index.mts";
21
+ import type { ANY_ENTITY } from "../user.mts";
21
22
 
22
23
  type SendBody<STATE extends string | number = string, ATTRIBUTES extends object = object> = {
23
24
  attributes?: ATTRIBUTES;
@@ -1,14 +1,9 @@
1
- import { debounce, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { debounce } from "@digital-alchemy/core";
2
3
 
3
- import {
4
- EARLY_ON_READY,
5
- FLOOR_REGISTRY_UPDATED,
6
- FloorCreate,
7
- FloorDetails,
8
- HassFloorService,
9
- perf,
10
- } from "../helpers/index.mts";
11
- import { TFloorId } from "../user.mts";
4
+ import type { FloorCreate, FloorDetails, HassFloorService } from "../helpers/index.mts";
5
+ import { EARLY_ON_READY, FLOOR_REGISTRY_UPDATED, perf } from "../helpers/index.mts";
6
+ import type { TFloorId } from "../user.mts";
12
7
 
13
8
  export function Floor({
14
9
  hass,
@@ -1,7 +1,9 @@
1
- import { FIRST, SINGLE, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { FIRST, SINGLE } from "@digital-alchemy/core";
2
3
 
3
- import { domain, EntityRegistryItem, IDByInterface } from "../index.mts";
4
- import {
4
+ import type { EntityRegistryItem, IDByInterface } from "../index.mts";
5
+ import { domain } from "../index.mts";
6
+ import type {
5
7
  ALL_DOMAINS,
6
8
  ANY_ENTITY,
7
9
  HassUniqueIdMapping,
@@ -1,19 +1,19 @@
1
- import { FIRST, InternalError, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { FIRST, InternalError } from "@digital-alchemy/core";
2
3
  import { createWriteStream } from "fs";
3
4
  import { pipeline } from "stream";
4
5
  import { promisify } from "util";
5
6
 
6
- import {
7
- buildFilterString,
7
+ import type {
8
8
  DownloadOptions,
9
9
  FetchArguments,
10
10
  FetcherOptions,
11
11
  FetchProcessTypes,
12
12
  FetchWith,
13
- isDomain,
14
13
  MaybeHttpError,
15
14
  TFetchBody,
16
15
  } from "../helpers/index.mts";
16
+ import { buildFilterString, isDomain } from "../helpers/index.mts";
17
17
 
18
18
  const streamPipeline = promisify(pipeline);
19
19
 
@@ -1,14 +1,9 @@
1
- import { debounce, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { debounce } from "@digital-alchemy/core";
2
3
 
3
- import {
4
- EARLY_ON_READY,
5
- HassLabelService,
6
- LABEL_REGISTRY_UPDATED,
7
- LabelDefinition,
8
- LabelOptions,
9
- perf,
10
- } from "../helpers/index.mts";
11
- import { TLabelId } from "../user.mts";
4
+ import type { HassLabelService, LabelDefinition, LabelOptions } from "../helpers/index.mts";
5
+ import { EARLY_ON_READY, LABEL_REGISTRY_UPDATED, perf } from "../helpers/index.mts";
6
+ import type { TLabelId } from "../user.mts";
12
7
 
13
8
  export function Label({
14
9
  hass,
@@ -1,17 +1,18 @@
1
- import { DOWN, NONE, sleep, TAnyFunction, TServiceParams, UP } from "@digital-alchemy/core";
2
- import dayjs, { Dayjs } from "dayjs";
3
- import { Get } from "type-fest";
1
+ import type { TAnyFunction, TServiceParams } from "@digital-alchemy/core";
2
+ import { DOWN, NONE, sleep, UP } from "@digital-alchemy/core";
3
+ import type { Dayjs } from "dayjs";
4
+ import dayjs from "dayjs";
5
+ import type { Get } from "type-fest";
4
6
 
5
- import {
7
+ import type {
6
8
  ALL_SERVICE_DOMAINS,
7
9
  ByIdProxy,
8
- domain,
9
10
  ENTITY_STATE,
10
11
  HassReferenceService,
11
- perf,
12
12
  RemoveCallback,
13
13
  } from "../helpers/index.mts";
14
- import {
14
+ import { domain, perf } from "../helpers/index.mts";
15
+ import type {
15
16
  ANY_ENTITY,
16
17
  HassUniqueIdMapping,
17
18
  PICK_ENTITY,
@@ -1,6 +1,6 @@
1
- import { TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
2
 
3
- import {
3
+ import type {
4
4
  ConfigEntry,
5
5
  HassConfig,
6
6
  HassRegistryService,
@@ -1,16 +1,12 @@
1
- import {
2
- InternalError,
3
- SECOND,
4
- sleep,
5
- START,
6
- TBlackHole,
7
- TServiceParams,
8
- } from "@digital-alchemy/core";
9
- import dayjs, { Dayjs } from "dayjs";
1
+ import type { TBlackHole, TServiceParams } from "@digital-alchemy/core";
2
+ import { InternalError, SECOND, sleep, START } from "@digital-alchemy/core";
3
+ import type { Dayjs } from "dayjs";
4
+ import dayjs from "dayjs";
10
5
  import EventEmitter from "events";
6
+ import type { EmptyObject } from "type-fest";
11
7
  import WS from "ws";
12
8
 
13
- import {
9
+ import type {
14
10
  ConnectionState,
15
11
  EntityUpdateEvent,
16
12
  HassWebsocketAPI,
@@ -523,11 +519,10 @@ export function WebsocketAPI({
523
519
  }
524
520
 
525
521
  // #MARK: subscribe
526
- async function subscribe<EVENT extends string>({
527
- event_type,
528
- context,
529
- exec,
530
- }: SocketSubscribeOptions<EVENT>) {
522
+ async function subscribe<
523
+ EVENT extends string,
524
+ PAYLOAD extends Record<string, unknown> = EmptyObject,
525
+ >({ event_type, context, exec }: SocketSubscribeOptions<EVENT, PAYLOAD>) {
531
526
  await hass.socket.sendMessage({ event_type, type: "subscribe_events" });
532
527
  return hass.socket.onEvent({
533
528
  context,
@@ -1,14 +1,8 @@
1
- import { debounce, TServiceParams } from "@digital-alchemy/core";
1
+ import type { TServiceParams } from "@digital-alchemy/core";
2
+ import { debounce } from "@digital-alchemy/core";
2
3
 
3
- import {
4
- EARLY_ON_READY,
5
- HassZoneService,
6
- ManifestItem,
7
- perf,
8
- ZONE_REGISTRY_UPDATED,
9
- ZoneDetails,
10
- ZoneOptions,
11
- } from "../helpers/index.mts";
4
+ import type { HassZoneService, ManifestItem, ZoneDetails, ZoneOptions } from "../helpers/index.mts";
5
+ import { EARLY_ON_READY, perf, ZONE_REGISTRY_UPDATED } from "../helpers/index.mts";
12
6
 
13
7
  export function Zone({
14
8
  config,
@@ -1,9 +1,10 @@
1
1
  import { sleep } from "@digital-alchemy/core";
2
2
  import { subscribe } from "diagnostics_channel";
3
3
 
4
- import { AREA_REGISTRY_UPDATED, AreaDetails } from "../helpers/index.mts";
4
+ import type { AreaDetails } from "../helpers/index.mts";
5
+ import { AREA_REGISTRY_UPDATED } from "../helpers/index.mts";
5
6
  import { hassTestRunner, INTERNAL_MESSAGE } from "../mock_assistant/index.mts";
6
- import { TAreaId } from "../user.mts";
7
+ import type { TAreaId } from "../user.mts";
7
8
 
8
9
  const EXAMPLE_AREA = {
9
10
  area_id: "empty_area" as TAreaId,
@@ -1,6 +1,6 @@
1
1
  import { SINGLE } from "@digital-alchemy/core";
2
2
 
3
- import { BackupResponse } from "../helpers/index.mts";
3
+ import type { BackupResponse } from "../helpers/index.mts";
4
4
  import { hassTestRunner } from "../mock_assistant/index.mts";
5
5
 
6
6
  describe("Backup", () => {
@@ -1,5 +1,5 @@
1
1
  import { env } from "process";
2
- import { MockInstance } from "vitest";
2
+ import type { MockInstance } from "vitest";
3
3
 
4
4
  import { hassTestRunner } from "../mock_assistant/index.mts";
5
5
 
@@ -2,7 +2,7 @@ import { subscribe } from "node:diagnostics_channel";
2
2
 
3
3
  import { sleep } from "@digital-alchemy/core";
4
4
 
5
- import { DeviceDetails } from "../helpers/index.mts";
5
+ import type { DeviceDetails } from "../helpers/index.mts";
6
6
  import { hassTestRunner } from "../mock_assistant/index.mts";
7
7
 
8
8
  describe("Device", () => {
@@ -3,9 +3,9 @@ import { subscribe } from "node:diagnostics_channel";
3
3
  import { sleep } from "@digital-alchemy/core";
4
4
  import dayjs from "dayjs";
5
5
 
6
- import { ENTITY_STATE } from "../index.mts";
6
+ import type { ENTITY_STATE } from "../index.mts";
7
7
  import { hassTestRunner } from "../mock_assistant/index.mts";
8
- import { ANY_ENTITY } from "../user.mts";
8
+ import type { ANY_ENTITY } from "../user.mts";
9
9
 
10
10
  describe("Entity", () => {
11
11
  afterEach(async () => {
@@ -1,7 +1,7 @@
1
1
  import dayjs from "dayjs";
2
- import { MockInstance } from "vitest";
2
+ import type { MockInstance } from "vitest";
3
3
 
4
- import { HassConfig } from "../helpers/index.mts";
4
+ import type { HassConfig } from "../helpers/index.mts";
5
5
  import { hassTestRunner } from "../mock_assistant/index.mts";
6
6
 
7
7
  describe("FetchAPI", () => {
@@ -2,9 +2,10 @@ import { subscribe } from "node:diagnostics_channel";
2
2
 
3
3
  import { sleep } from "@digital-alchemy/core";
4
4
 
5
- import { FLOOR_REGISTRY_UPDATED, FloorDetails } from "../helpers/index.mts";
5
+ import type { FloorDetails } from "../helpers/index.mts";
6
+ import { FLOOR_REGISTRY_UPDATED } from "../helpers/index.mts";
6
7
  import { hassTestRunner } from "../mock_assistant/index.mts";
7
- import { TFloorId } from "../user.mts";
8
+ import type { TFloorId } from "../user.mts";
8
9
 
9
10
  describe("Floor", () => {
10
11
  const EXAMPLE_FLOOR = {
@@ -1,5 +1,5 @@
1
1
  import { hassTestRunner } from "../mock_assistant/index.mts";
2
- import { PICK_ENTITY } from "../user.mts";
2
+ import type { PICK_ENTITY } from "../user.mts";
3
3
 
4
4
  afterEach(async () => {
5
5
  await hassTestRunner.teardown();
@@ -2,9 +2,10 @@ import { subscribe } from "node:diagnostics_channel";
2
2
 
3
3
  import { sleep } from "@digital-alchemy/core";
4
4
 
5
- import { LABEL_REGISTRY_UPDATED, LabelDefinition } from "../helpers/index.mts";
5
+ import type { LabelDefinition } from "../helpers/index.mts";
6
+ import { LABEL_REGISTRY_UPDATED } from "../helpers/index.mts";
6
7
  import { hassTestRunner } from "../mock_assistant/index.mts";
7
- import { TLabelId } from "../user.mts";
8
+ import type { TLabelId } from "../user.mts";
8
9
 
9
10
  describe("Label", () => {
10
11
  const EXAMPLE_LABEL = {
@@ -1,8 +1,8 @@
1
1
  import dayjs from "dayjs";
2
2
 
3
- import { ENTITY_STATE } from "../helpers/index.mts";
3
+ import type { ENTITY_STATE } from "../helpers/index.mts";
4
4
  import { hassTestRunner } from "../mock_assistant/index.mts";
5
- import { ANY_ENTITY } from "../user.mts";
5
+ import type { ANY_ENTITY } from "../user.mts";
6
6
 
7
7
  describe("References", () => {
8
8
  afterEach(async () => {
@@ -2,7 +2,8 @@ import { subscribe } from "node:diagnostics_channel";
2
2
 
3
3
  import { sleep } from "@digital-alchemy/core";
4
4
 
5
- import { ZONE_REGISTRY_UPDATED, ZoneDetails } from "../helpers/index.mts";
5
+ import type { ZoneDetails } from "../helpers/index.mts";
6
+ import { ZONE_REGISTRY_UPDATED } from "../helpers/index.mts";
6
7
  import { hassTestRunner } from "../mock_assistant/index.mts";
7
8
 
8
9
  describe("Zone", () => {