@digital-alchemy/hass 25.2.2 → 25.3.2

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 (115) hide show
  1. package/dist/dev/index.d.mts +3 -0
  2. package/dist/dev/index.mjs +4 -0
  3. package/dist/dev/index.mjs.map +1 -0
  4. package/dist/dev/mappings.d.mts +70 -0
  5. package/dist/dev/mappings.mjs +2 -0
  6. package/dist/dev/mappings.mjs.map +1 -0
  7. package/dist/dev/registry.d.mts +328 -0
  8. package/dist/dev/registry.mjs +2 -0
  9. package/dist/dev/registry.mjs.map +1 -0
  10. package/dist/dev/services.d.mts +2431 -0
  11. package/dist/dev/services.mjs +5 -0
  12. package/dist/dev/services.mjs.map +1 -0
  13. package/dist/helpers/device.d.mts +1 -1
  14. package/dist/helpers/entity-state.d.mts +2 -2
  15. package/dist/helpers/fetch/calendar.d.mts +1 -1
  16. package/dist/helpers/fetch/configuration.d.mts +1 -1
  17. package/dist/helpers/fetch/service-list.d.mts +28 -3
  18. package/dist/helpers/id-by.d.mts +2 -3
  19. package/dist/helpers/interfaces.d.mts +4 -5
  20. package/dist/helpers/interfaces.mjs.map +1 -1
  21. package/dist/helpers/registry.d.mts +1 -2
  22. package/dist/helpers/registry.mjs.map +1 -1
  23. package/dist/helpers/utility.d.mts +5 -21
  24. package/dist/helpers/utility.mjs +0 -5
  25. package/dist/helpers/utility.mjs.map +1 -1
  26. package/dist/helpers/websocket.d.mts +2 -1
  27. package/dist/index.d.mts +2 -1
  28. package/dist/index.mjs +2 -1
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/mock_assistant/helpers/fixtures.d.mts +2 -1
  31. package/dist/mock_assistant/services/device.service.mjs.map +1 -1
  32. package/dist/mock_assistant/services/entity-registry.service.d.mts +1 -1
  33. package/dist/mock_assistant/services/entity.service.d.mts +2 -2
  34. package/dist/mock_assistant/services/events.service.d.mts +2 -1
  35. package/dist/mock_assistant/services/events.service.mjs.map +1 -1
  36. package/dist/mock_assistant/services/fixtures.service.d.mts +3 -2
  37. package/dist/mock_assistant/services/fixtures.service.mjs.map +1 -1
  38. package/dist/mock_assistant/services/zone.service.mjs +1 -1
  39. package/dist/mock_assistant/services/zone.service.mjs.map +1 -1
  40. package/dist/services/area.service.d.mts +1 -1
  41. package/dist/services/area.service.mjs +1 -1
  42. package/dist/services/area.service.mjs.map +1 -1
  43. package/dist/services/call-proxy.service.d.mts +1 -1
  44. package/dist/services/call-proxy.service.mjs.map +1 -1
  45. package/dist/services/config.service.mjs.map +1 -1
  46. package/dist/services/entity.service.d.mts +1 -1
  47. package/dist/services/entity.service.mjs +1 -1
  48. package/dist/services/entity.service.mjs.map +1 -1
  49. package/dist/services/fetch-api.service.d.mts +3 -2
  50. package/dist/services/fetch-api.service.mjs.map +1 -1
  51. package/dist/services/floor.service.mjs.map +1 -1
  52. package/dist/services/id-by.service.d.mts +1 -1
  53. package/dist/services/id-by.service.mjs +28 -3
  54. package/dist/services/id-by.service.mjs.map +1 -1
  55. package/dist/services/label.service.mjs.map +1 -1
  56. package/dist/services/reference.service.mjs +4 -3
  57. package/dist/services/reference.service.mjs.map +1 -1
  58. package/dist/services/websocket-api.service.mjs +2 -2
  59. package/dist/services/websocket-api.service.mjs.map +1 -1
  60. package/dist/testing/area.spec.mjs.map +1 -1
  61. package/dist/testing/entity.spec.mjs.map +1 -1
  62. package/dist/testing/floor.spec.mjs.map +1 -1
  63. package/dist/testing/id-by.spec.mjs.map +1 -1
  64. package/dist/testing/label.spec.mjs.map +1 -1
  65. package/dist/testing/ref-by.spec.mjs.map +1 -1
  66. package/dist/user.d.mts +43 -0
  67. package/dist/user.mjs +4 -0
  68. package/dist/user.mjs.map +1 -0
  69. package/package.json +18 -17
  70. package/src/dev/index.mts +3 -0
  71. package/src/dev/mappings.mts +121 -0
  72. package/src/dev/registry.mts +330 -0
  73. package/src/dev/services.mts +2759 -0
  74. package/src/helpers/device.mts +1 -1
  75. package/src/helpers/entity-state.mts +6 -9
  76. package/src/helpers/fetch/calendar.mts +1 -1
  77. package/src/helpers/fetch/configuration.mts +1 -1
  78. package/src/helpers/fetch/service-list.mts +23 -3
  79. package/src/helpers/id-by.mts +11 -13
  80. package/src/helpers/interfaces.mts +14 -18
  81. package/src/helpers/registry.mts +9 -2
  82. package/src/helpers/utility.mts +13 -67
  83. package/src/helpers/websocket.mts +2 -1
  84. package/src/index.mts +2 -1
  85. package/src/mock_assistant/helpers/fixtures.mts +1 -1
  86. package/src/mock_assistant/services/area.service.mts +1 -1
  87. package/src/mock_assistant/services/device.service.mts +1 -1
  88. package/src/mock_assistant/services/entity-registry.service.mts +1 -1
  89. package/src/mock_assistant/services/entity.service.mts +2 -2
  90. package/src/mock_assistant/services/events.service.mts +2 -1
  91. package/src/mock_assistant/services/fixtures.service.mts +2 -1
  92. package/src/mock_assistant/services/floor.service.mts +1 -1
  93. package/src/mock_assistant/services/label.service.mts +1 -1
  94. package/src/mock_assistant/services/zone.service.mts +13 -10
  95. package/src/services/area.service.mts +2 -3
  96. package/src/services/call-proxy.service.mts +2 -2
  97. package/src/services/config.service.mts +1 -1
  98. package/src/services/entity.service.mts +2 -4
  99. package/src/services/fetch-api.service.mts +1 -1
  100. package/src/services/floor.service.mts +1 -1
  101. package/src/services/id-by.service.mts +47 -19
  102. package/src/services/label.service.mts +1 -1
  103. package/src/services/reference.service.mts +19 -18
  104. package/src/services/websocket-api.service.mts +2 -2
  105. package/src/testing/area.spec.mts +1 -1
  106. package/src/testing/entity.spec.mts +2 -1
  107. package/src/testing/floor.spec.mts +1 -1
  108. package/src/testing/id-by.spec.mts +1 -1
  109. package/src/testing/label.spec.mts +1 -1
  110. package/src/testing/ref-by.spec.mts +2 -1
  111. package/src/user.mts +97 -0
  112. package/dist/dynamic.d.mts +0 -3764
  113. package/dist/dynamic.mjs +0 -7
  114. package/dist/dynamic.mjs.map +0 -1
  115. package/src/dynamic.mts +0 -4302
@@ -1,3764 +0,0 @@
1
- import { RequireAtLeastOne } from "type-fest";
2
- import { AndroidNotificationData, AppleNotificationData, NotificationData, PICK_ENTITY } from "./helpers/index.mts";
3
- import { DynamicMergeAttributes } from "./merge.mts";
4
- type PICK_FROM_PLATFORM<ID extends TPlatformId, DOMAIN extends TRawDomains = TRawDomains> = Extract<REGISTRY_SETUP["platform"][`_${ID}`], PICK_ENTITY<DOMAIN>>;
5
- export type ENTITY_SETUP = {
6
- "button.example": {
7
- state: string;
8
- entity_id: "button.example";
9
- attributes: DynamicMergeAttributes<"button.example", {
10
- friendly_name: "Example button";
11
- }>;
12
- };
13
- "binary_sensor.hass_e2e_online": {
14
- attributes: DynamicMergeAttributes<"binary_sensor.hass_e2e_online", {
15
- friendly_name: "hass_e2e online";
16
- restored: true;
17
- supported_features: 0;
18
- }>;
19
- context: {
20
- id: "01HWXTSCSBGW129NV7WY8MMG1E";
21
- parent_id: null;
22
- user_id: null;
23
- };
24
- entity_id: "binary_sensor.hass_e2e_online";
25
- state: "unavailable";
26
- };
27
- "binary_sensor.toggles": {
28
- attributes: DynamicMergeAttributes<"binary_sensor.toggles", {
29
- friendly_name: "toggles";
30
- icon: "mdi:toggle-switch-variant-off";
31
- restored: true;
32
- supported_features: 0;
33
- }>;
34
- context: {
35
- id: "01HWXTSCSB43FF1R6FX0QEE4Z6";
36
- parent_id: null;
37
- user_id: null;
38
- };
39
- entity_id: "binary_sensor.toggles";
40
- state: "unavailable";
41
- };
42
- "calendar.united_states_tx": {
43
- attributes: DynamicMergeAttributes<"calendar.united_states_tx", {
44
- all_day: true;
45
- description: "";
46
- end_time: "2024-05-28 00:00:00";
47
- friendly_name: "United States, TX";
48
- location: "United States, TX";
49
- message: "Memorial Day";
50
- start_time: "2024-05-27 00:00:00";
51
- }>;
52
- context: {
53
- id: "01HWXTYEEFBB7QQC1CSM6PAR36";
54
- parent_id: null;
55
- user_id: null;
56
- };
57
- entity_id: "calendar.united_states_tx";
58
- state: "off";
59
- };
60
- "light.bedroom_ceiling_fan": {
61
- attributes: DynamicMergeAttributes<"light.bedroom_ceiling_fan", {
62
- brightness: null;
63
- color_mode: null;
64
- color_temp: null;
65
- color_temp_kelvin: null;
66
- friendly_name: "Bedroom Ceiling Fan";
67
- hs_color: null;
68
- icon: "mdi:lightbulb-group";
69
- max_color_temp_kelvin: 6535;
70
- max_mireds: 500;
71
- min_color_temp_kelvin: 2000;
72
- min_mireds: 153;
73
- rgb_color: null;
74
- supported_color_modes: ["color_temp", "xy"];
75
- supported_features: 40;
76
- xy_color: null;
77
- }>;
78
- context: {
79
- id: "01HX722Y1JFS6KN2MDERK0VJ2D";
80
- parent_id: null;
81
- user_id: null;
82
- };
83
- entity_id: "light.bedroom_ceiling_fan";
84
- state: "off";
85
- };
86
- "person.digital_alchemy": {
87
- attributes: DynamicMergeAttributes<"person.digital_alchemy", {
88
- device_trackers: [];
89
- editable: true;
90
- friendly_name: "digital-alchemy";
91
- id: "digital_alchemy";
92
- user_id: "4dd1cf7e93e94f3fbaf419501f9a3d59";
93
- }>;
94
- context: {
95
- id: "01HWXTSCSBRKJ9T2KV1JNER5KQ";
96
- parent_id: null;
97
- user_id: null;
98
- };
99
- entity_id: "person.digital_alchemy";
100
- state: "unknown";
101
- };
102
- "scene.games_room_auto": {
103
- attributes: DynamicMergeAttributes<"scene.games_room_auto", {
104
- "Managed By": "home_automation";
105
- friendly_name: "bedroom off";
106
- }>;
107
- context: {
108
- id: "01HWXW289S8HP5MSGNNTNB2CBG";
109
- parent_id: null;
110
- user_id: null;
111
- };
112
- entity_id: "scene.games_room_auto";
113
- state: "unknown";
114
- };
115
- "sensor.magic": {
116
- attributes: DynamicMergeAttributes<"sensor.magic", {
117
- friendly_name: "magic";
118
- icon: "mdi:satellite-uplink";
119
- restored: true;
120
- supported_features: 0;
121
- }>;
122
- context: {
123
- id: "01HWXTSCSBW34BP3R20RJ09CVZ";
124
- parent_id: null;
125
- user_id: null;
126
- };
127
- entity_id: "sensor.magic";
128
- state: string;
129
- };
130
- "sensor.sun_next_dawn": {
131
- attributes: DynamicMergeAttributes<"sensor.sun_next_dawn", {
132
- device_class: "timestamp";
133
- friendly_name: "Sun Next dawn";
134
- }>;
135
- context: {
136
- id: "01HWXTS8W1SRTPT5K1XM0G491X";
137
- parent_id: null;
138
- user_id: null;
139
- };
140
- entity_id: "sensor.sun_next_dawn";
141
- state: "2024-05-03T03:24:45+00:00";
142
- };
143
- "sensor.sun_next_dusk": {
144
- attributes: DynamicMergeAttributes<"sensor.sun_next_dusk", {
145
- device_class: "timestamp";
146
- friendly_name: "Sun Next dusk";
147
- }>;
148
- context: {
149
- id: "01HWXTS8W1S95P1MVHDGHSQEB2";
150
- parent_id: null;
151
- user_id: null;
152
- };
153
- entity_id: "sensor.sun_next_dusk";
154
- state: "2024-05-03T19:51:10+00:00";
155
- };
156
- "sensor.sun_next_midnight": {
157
- attributes: DynamicMergeAttributes<"sensor.sun_next_midnight", {
158
- device_class: "timestamp";
159
- friendly_name: "Sun Next midnight";
160
- }>;
161
- context: {
162
- id: "01HWXTS8W1YQCPA3WZ69Y9JSPD";
163
- parent_id: null;
164
- user_id: null;
165
- };
166
- entity_id: "sensor.sun_next_midnight";
167
- state: "2024-05-03T23:37:12+00:00";
168
- };
169
- "sensor.sun_next_noon": {
170
- attributes: DynamicMergeAttributes<"sensor.sun_next_noon", {
171
- device_class: "timestamp";
172
- friendly_name: "Sun Next noon";
173
- }>;
174
- context: {
175
- id: "01HWXTS8W28MVV48CQ31JB2WKC";
176
- parent_id: null;
177
- user_id: null;
178
- };
179
- entity_id: "sensor.sun_next_noon";
180
- state: "2024-05-03T11:37:19+00:00";
181
- };
182
- "sensor.sun_next_rising": {
183
- attributes: DynamicMergeAttributes<"sensor.sun_next_rising", {
184
- device_class: "timestamp";
185
- friendly_name: "Sun Next rising";
186
- }>;
187
- context: {
188
- id: "01HWXTS8W2MMADKGWE4A5BMH51";
189
- parent_id: null;
190
- user_id: null;
191
- };
192
- entity_id: "sensor.sun_next_rising";
193
- state: "2024-05-03T04:05:17+00:00";
194
- };
195
- "sensor.sun_next_setting": {
196
- attributes: DynamicMergeAttributes<"sensor.sun_next_setting", {
197
- device_class: "timestamp";
198
- friendly_name: "Sun Next setting";
199
- }>;
200
- context: {
201
- id: "01HWXTS8W24KWTHR2B6V32NCXG";
202
- parent_id: null;
203
- user_id: null;
204
- };
205
- entity_id: "sensor.sun_next_setting";
206
- state: "2024-05-03T19:10:21+00:00";
207
- };
208
- "sun.sun": {
209
- attributes: DynamicMergeAttributes<"sun.sun", {
210
- azimuth: 0.35;
211
- elevation: -21.86;
212
- friendly_name: "Sun";
213
- next_dawn: "2024-05-03T03:24:45.747945+00:00";
214
- next_dusk: "2024-05-03T19:51:10.358970+00:00";
215
- next_midnight: "2024-05-03T23:37:12+00:00";
216
- next_noon: "2024-05-03T11:37:19+00:00";
217
- next_rising: "2024-05-03T04:05:17.926549+00:00";
218
- next_setting: "2024-05-03T19:10:21.280558+00:00";
219
- rising: true;
220
- }>;
221
- context: {
222
- id: "01HWXTS8W1J2TDGMN7KKNWP8DV";
223
- parent_id: null;
224
- user_id: null;
225
- };
226
- entity_id: "sun.sun";
227
- state: "below_horizon";
228
- };
229
- "switch.bedroom_lamp": {
230
- attributes: DynamicMergeAttributes<"switch.bedroom_lamp", {
231
- friendly_name: "bedroom_lamp";
232
- restored: true;
233
- supported_features: 0;
234
- }>;
235
- context: {
236
- id: "01HWXTSCSB7BK003CH3AYYVXCB";
237
- parent_id: null;
238
- user_id: null;
239
- };
240
- entity_id: "switch.bedroom_lamp";
241
- state: "unavailable";
242
- };
243
- "switch.kitchen_cabinets": {
244
- attributes: DynamicMergeAttributes<"switch.kitchen_cabinets", {
245
- friendly_name: "kitchen_cabinets";
246
- restored: true;
247
- supported_features: 0;
248
- }>;
249
- context: {
250
- id: "01HWXTSCSBM9Y3SRQTFJ5CVK6H";
251
- parent_id: null;
252
- user_id: null;
253
- };
254
- entity_id: "switch.kitchen_cabinets";
255
- state: "unavailable";
256
- };
257
- "switch.living_room_mood_lights": {
258
- attributes: DynamicMergeAttributes<"switch.living_room_mood_lights", {
259
- friendly_name: "living_room_mood_lights";
260
- restored: true;
261
- supported_features: 0;
262
- }>;
263
- context: {
264
- id: "01HWXTSCSBS5B586JJ7VFH10SX";
265
- parent_id: null;
266
- user_id: null;
267
- };
268
- entity_id: "switch.living_room_mood_lights";
269
- state: "unavailable";
270
- };
271
- "switch.porch_light": {
272
- attributes: DynamicMergeAttributes<"switch.porch_light", {
273
- friendly_name: "porch_light";
274
- restored: true;
275
- supported_features: 0;
276
- }>;
277
- context: {
278
- id: "01HWXTSCSBFTSZR1M5XAK7XSR8";
279
- parent_id: null;
280
- user_id: null;
281
- };
282
- entity_id: "switch.porch_light";
283
- state: string;
284
- };
285
- "todo.shopping_list": {
286
- attributes: DynamicMergeAttributes<"todo.shopping_list", {
287
- friendly_name: "Shopping List";
288
- supported_features: 15;
289
- }>;
290
- context: {
291
- id: "01HWXTS8X3D417XC4YJTG8QJWB";
292
- parent_id: null;
293
- user_id: null;
294
- };
295
- entity_id: "todo.shopping_list";
296
- state: "0";
297
- };
298
- "tts.google_en_com": {
299
- attributes: DynamicMergeAttributes<"tts.google_en_com", {
300
- friendly_name: "Google en com";
301
- }>;
302
- context: {
303
- id: "01HWXTS8XMPQ236CDJ6X7C6E60";
304
- parent_id: null;
305
- user_id: null;
306
- };
307
- entity_id: "tts.google_en_com";
308
- state: "unknown";
309
- };
310
- "zone.home": {
311
- attributes: DynamicMergeAttributes<"zone.home", {
312
- editable: true;
313
- friendly_name: "Home";
314
- icon: "mdi:home";
315
- latitude: 52.373_133_9;
316
- longitude: 4.890_314_7;
317
- passive: false;
318
- persons: [];
319
- radius: 100;
320
- }>;
321
- context: {
322
- id: "01HWXTS8GMB4ZW20P8MGMX0QSN";
323
- parent_id: null;
324
- user_id: null;
325
- };
326
- entity_id: "zone.home";
327
- state: "0";
328
- };
329
- };
330
- export type iCallService = {
331
- automation: {
332
- /**
333
- * ### Reload
334
- *
335
- * > Reloads the automation configuration.
336
- */
337
- reload(service_data: {}): Promise<void>;
338
- /**
339
- * ### Toggle
340
- *
341
- * > Toggles (enable / disable) an automation.
342
- */
343
- toggle(service_data: {
344
- /**
345
- * Assisted definition
346
- * > ```yaml
347
- * > entity:
348
- * > - domain:
349
- * > - automation
350
- * > ```
351
- */
352
- entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
353
- }): Promise<void>;
354
- /**
355
- * ### Trigger
356
- *
357
- * > Triggers the actions of an automation.
358
- */
359
- trigger(service_data?: {
360
- /**
361
- * ## Skip conditions
362
- *
363
- * > Defines whether or not the conditions will be skipped.
364
- *
365
- * ### Default
366
- *
367
- * > ```json
368
- * > true
369
- * > ```
370
- */
371
- skip_condition?: boolean;
372
- /**
373
- * Assisted definition
374
- * > ```yaml
375
- * > entity:
376
- * > - domain:
377
- * > - automation
378
- * > ```
379
- */
380
- entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
381
- }): Promise<void>;
382
- /**
383
- * ### Turn off
384
- *
385
- * > Disables an automation.
386
- */
387
- turn_off(service_data?: {
388
- /**
389
- * ## Stop actions
390
- *
391
- * > Stops currently running actions.
392
- *
393
- * ### Default
394
- *
395
- * > ```json
396
- * > true
397
- * > ```
398
- */
399
- stop_actions?: boolean;
400
- /**
401
- * Assisted definition
402
- * > ```yaml
403
- * > entity:
404
- * > - domain:
405
- * > - automation
406
- * > ```
407
- */
408
- entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
409
- }): Promise<void>;
410
- /**
411
- * ### Turn on
412
- *
413
- * > Enables an automation.
414
- */
415
- turn_on(service_data: {
416
- /**
417
- * Assisted definition
418
- * > ```yaml
419
- * > entity:
420
- * > - domain:
421
- * > - automation
422
- * > ```
423
- */
424
- entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
425
- }): Promise<void>;
426
- };
427
- backup: {
428
- /**
429
- * ### Create backup
430
- *
431
- * > Creates a new backup.
432
- */
433
- create(service_data: {}): Promise<void>;
434
- };
435
- button: {
436
- /**
437
- * ### Press
438
- *
439
- * > Press the button entity.
440
- */
441
- press(service_data: {
442
- /**
443
- * Assisted definition
444
- * > ```yaml
445
- * > entity:
446
- * > - domain:
447
- * > - button
448
- * > ```
449
- */
450
- entity_id: PICK_ENTITY<"button"> | PICK_ENTITY<"button">[];
451
- }): Promise<void>;
452
- };
453
- calendar: {
454
- /**
455
- * ### Create event
456
- *
457
- * > Adds a new calendar event.
458
- */
459
- create_event(service_data?: {
460
- /**
461
- * ## Description
462
- *
463
- * > A more complete description of the event than the one provided by the summary.
464
- *
465
- * ### Example
466
- *
467
- * > ```json
468
- * > {
469
- * > "description": "Meeting to provide technical review for 'Phoenix' design."
470
- * > }
471
- * > ```
472
- */
473
- description?: string;
474
- /**
475
- * ## End date
476
- *
477
- * > The date the all-day event should end (exclusive).
478
- *
479
- * ### Example
480
- *
481
- * > ```json
482
- * > {
483
- * > "end_date": "2022-03-23"
484
- * > }
485
- * > ```
486
- *
487
- * ## Selector
488
- *
489
- * > ```yaml
490
- * > date: null
491
- * > ```
492
- */
493
- end_date?: unknown;
494
- /**
495
- * ## End time
496
- *
497
- * > The date and time the event should end.
498
- *
499
- * ### Example
500
- *
501
- * > ```json
502
- * > {
503
- * > "end_date_time": "2022-03-22 22:00:00"
504
- * > }
505
- * > ```
506
- *
507
- * ## Selector
508
- *
509
- * > ```yaml
510
- * > datetime: null
511
- * > ```
512
- */
513
- end_date_time?: unknown;
514
- /**
515
- * ## In
516
- *
517
- * > Days or weeks that you want to create the event in.
518
- *
519
- * ### Example
520
- *
521
- * > ```json
522
- * > {
523
- * > "in": "{\"days\": 2} or {\"weeks\": 2}"
524
- * > }
525
- * > ```
526
- *
527
- * ## Selector
528
- *
529
- * > ```yaml
530
- * >
531
- * > ```
532
- */
533
- in?: unknown;
534
- /**
535
- * ## Location
536
- *
537
- * > The location of the event.
538
- *
539
- * ### Example
540
- *
541
- * > ```json
542
- * > {
543
- * > "location": "Conference Room - F123, Bldg. 002"
544
- * > }
545
- * > ```
546
- */
547
- location?: string;
548
- /**
549
- * ## Start date
550
- *
551
- * > The date the all-day event should start.
552
- *
553
- * ### Example
554
- *
555
- * > ```json
556
- * > {
557
- * > "start_date": "2022-03-22"
558
- * > }
559
- * > ```
560
- *
561
- * ## Selector
562
- *
563
- * > ```yaml
564
- * > date: null
565
- * > ```
566
- */
567
- start_date?: unknown;
568
- /**
569
- * ## Start time
570
- *
571
- * > The date and time the event should start.
572
- *
573
- * ### Example
574
- *
575
- * > ```json
576
- * > {
577
- * > "start_date_time": "2022-03-22 20:00:00"
578
- * > }
579
- * > ```
580
- *
581
- * ## Selector
582
- *
583
- * > ```yaml
584
- * > datetime: null
585
- * > ```
586
- */
587
- start_date_time?: unknown;
588
- /**
589
- * ## Summary
590
- *
591
- * > Defines the short summary or subject for the event.
592
- *
593
- * ### Example
594
- *
595
- * > ```json
596
- * > {
597
- * > "summary": "Department Party"
598
- * > }
599
- * > ```
600
- */
601
- summary: string;
602
- /**
603
- * Assisted definition
604
- * > ```yaml
605
- * > entity:
606
- * > - domain:
607
- * > - calendar
608
- * > supported_features:
609
- * > - 1
610
- * > ```
611
- */
612
- entity_id: PICK_ENTITY<"calendar"> | PICK_ENTITY<"calendar">[];
613
- }): Promise<void>;
614
- /**
615
- * ### Get events
616
- *
617
- * > Get events on a calendar within a time range.
618
- */
619
- get_events(service_data?: {
620
- /**
621
- * ## Duration
622
- *
623
- * > Returns active events from start_date_time until the specified duration.
624
- *
625
- * ## Selector
626
- *
627
- * > ```yaml
628
- * > duration: null
629
- * > ```
630
- */
631
- duration?: unknown;
632
- /**
633
- * ## End time
634
- *
635
- * > Returns active events before this time (exclusive). Cannot be used with 'duration'.
636
- *
637
- * ### Example
638
- *
639
- * > ```json
640
- * > {
641
- * > "end_date_time": "2022-03-22 22:00:00"
642
- * > }
643
- * > ```
644
- *
645
- * ## Selector
646
- *
647
- * > ```yaml
648
- * > datetime: null
649
- * > ```
650
- */
651
- end_date_time?: unknown;
652
- /**
653
- * ## Start time
654
- *
655
- * > Returns active events after this time (exclusive). When not set, defaults to now.
656
- *
657
- * ### Example
658
- *
659
- * > ```json
660
- * > {
661
- * > "start_date_time": "2022-03-22 20:00:00"
662
- * > }
663
- * > ```
664
- *
665
- * ## Selector
666
- *
667
- * > ```yaml
668
- * > datetime: null
669
- * > ```
670
- */
671
- start_date_time?: unknown;
672
- /**
673
- * Assisted definition
674
- * > ```yaml
675
- * > entity:
676
- * > - domain:
677
- * > - calendar
678
- * > ```
679
- */
680
- entity_id: PICK_ENTITY<"calendar"> | PICK_ENTITY<"calendar">[];
681
- }): Promise<void>;
682
- /**
683
- * ### List event
684
- *
685
- * > Lists events on a calendar within a time range.
686
- */
687
- list_events(service_data?: {
688
- /**
689
- * ## Duration
690
- *
691
- * > Returns active events from start_date_time until the specified duration.
692
- *
693
- * ## Selector
694
- *
695
- * > ```yaml
696
- * > duration: null
697
- * > ```
698
- */
699
- duration?: unknown;
700
- /**
701
- * ## End time
702
- *
703
- * > Returns active events before this time (exclusive). Cannot be used with 'duration'.
704
- *
705
- * ### Example
706
- *
707
- * > ```json
708
- * > {
709
- * > "end_date_time": "2022-03-22 22:00:00"
710
- * > }
711
- * > ```
712
- *
713
- * ## Selector
714
- *
715
- * > ```yaml
716
- * > datetime: null
717
- * > ```
718
- */
719
- end_date_time?: unknown;
720
- /**
721
- * ## Start time
722
- *
723
- * > Returns active events after this time (exclusive). When not set, defaults to now.
724
- *
725
- * ### Example
726
- *
727
- * > ```json
728
- * > {
729
- * > "start_date_time": "2022-03-22 20:00:00"
730
- * > }
731
- * > ```
732
- *
733
- * ## Selector
734
- *
735
- * > ```yaml
736
- * > datetime: null
737
- * > ```
738
- */
739
- start_date_time?: unknown;
740
- /**
741
- * Assisted definition
742
- * > ```yaml
743
- * > entity:
744
- * > - domain:
745
- * > - calendar
746
- * > ```
747
- */
748
- entity_id: PICK_ENTITY<"calendar"> | PICK_ENTITY<"calendar">[];
749
- }): Promise<void>;
750
- };
751
- cloud: {
752
- /**
753
- * ### Remote connect
754
- *
755
- * > Makes the instance UI accessible from outside of the local network by using Home Assistant Cloud.
756
- */
757
- remote_connect(service_data: {}): Promise<void>;
758
- /**
759
- * ### Remote disconnect
760
- *
761
- * > Disconnects the Home Assistant UI from the Home Assistant Cloud. You will no longer be able to access your Home Assistant instance from outside your local network.
762
- */
763
- remote_disconnect(service_data: {}): Promise<void>;
764
- };
765
- conversation: {
766
- /**
767
- * ### Process
768
- *
769
- * > Launches a conversation from a transcribed text.
770
- */
771
- process(service_data?: {
772
- /**
773
- * ## Agent
774
- *
775
- * > Conversation agent to process your request. The conversation agent is the brains of your assistant. It processes the incoming text commands.
776
- *
777
- * ### Example
778
- *
779
- * > ```json
780
- * > {
781
- * > "agent_id": "homeassistant"
782
- * > }
783
- * > ```
784
- *
785
- * ## Selector
786
- *
787
- * > ```yaml
788
- * > conversation_agent: null
789
- * > ```
790
- */
791
- agent_id?: unknown;
792
- /**
793
- * ## Conversation ID
794
- *
795
- * > ID of the conversation, to be able to continue a previous conversation
796
- *
797
- * ### Example
798
- *
799
- * > ```json
800
- * > {
801
- * > "conversation_id": "my_conversation_1"
802
- * > }
803
- * > ```
804
- */
805
- conversation_id?: string;
806
- /**
807
- * ## Language
808
- *
809
- * > Language of text. Defaults to server language.
810
- *
811
- * ### Example
812
- *
813
- * > ```json
814
- * > {
815
- * > "language": "NL"
816
- * > }
817
- * > ```
818
- */
819
- language?: string;
820
- /**
821
- * ## Text
822
- *
823
- * > Transcribed text input.
824
- *
825
- * ### Example
826
- *
827
- * > ```json
828
- * > {
829
- * > "text": "Turn all lights on"
830
- * > }
831
- * > ```
832
- */
833
- text: string;
834
- }): Promise<void>;
835
- /**
836
- * ### Reload
837
- *
838
- * > Reloads the intent configuration.
839
- */
840
- reload(service_data?: {
841
- /**
842
- * ## Agent
843
- *
844
- * > Conversation agent to reload.
845
- *
846
- * ### Example
847
- *
848
- * > ```json
849
- * > {
850
- * > "agent_id": "homeassistant"
851
- * > }
852
- * > ```
853
- *
854
- * ## Selector
855
- *
856
- * > ```yaml
857
- * > conversation_agent: null
858
- * > ```
859
- */
860
- agent_id?: unknown;
861
- /**
862
- * ## Language
863
- *
864
- * > Language to clear cached intents for. Defaults to server language.
865
- *
866
- * ### Example
867
- *
868
- * > ```json
869
- * > {
870
- * > "language": "NL"
871
- * > }
872
- * > ```
873
- */
874
- language?: string;
875
- }): Promise<void>;
876
- };
877
- counter: {
878
- /**
879
- * ### Decrement
880
- *
881
- * > Decrements a counter.
882
- */
883
- decrement(service_data: {
884
- /**
885
- * Assisted definition
886
- * > ```yaml
887
- * > entity:
888
- * > - domain:
889
- * > - counter
890
- * > ```
891
- */
892
- entity_id: PICK_ENTITY<"counter"> | PICK_ENTITY<"counter">[];
893
- }): Promise<void>;
894
- /**
895
- * ### Increment
896
- *
897
- * > Increments a counter.
898
- */
899
- increment(service_data: {
900
- /**
901
- * Assisted definition
902
- * > ```yaml
903
- * > entity:
904
- * > - domain:
905
- * > - counter
906
- * > ```
907
- */
908
- entity_id: PICK_ENTITY<"counter"> | PICK_ENTITY<"counter">[];
909
- }): Promise<void>;
910
- /**
911
- * ### Reset
912
- *
913
- * > Resets a counter.
914
- */
915
- reset(service_data: {
916
- /**
917
- * Assisted definition
918
- * > ```yaml
919
- * > entity:
920
- * > - domain:
921
- * > - counter
922
- * > ```
923
- */
924
- entity_id: PICK_ENTITY<"counter"> | PICK_ENTITY<"counter">[];
925
- }): Promise<void>;
926
- /**
927
- * ### Set
928
- *
929
- * > Sets the counter value.
930
- */
931
- set_value(service_data: {
932
- /**
933
- * ## Value
934
- *
935
- * > The new counter value the entity should be set to.
936
- *
937
- * ## Selector
938
- *
939
- * > ```yaml
940
- * > number:
941
- * > min: 0
942
- * > max: 9223372036854776000
943
- * > mode: box
944
- * > ```
945
- */
946
- value: number;
947
- /**
948
- * Assisted definition
949
- * > ```yaml
950
- * > entity:
951
- * > - domain:
952
- * > - counter
953
- * > ```
954
- */
955
- entity_id: PICK_ENTITY<"counter"> | PICK_ENTITY<"counter">[];
956
- }): Promise<void>;
957
- };
958
- ffmpeg: {
959
- /**
960
- * ### Restart
961
- *
962
- * > Sends a restart command to a ffmpeg based sensor.
963
- */
964
- restart(service_data?: {
965
- /**
966
- * ## Entity
967
- *
968
- * > Name of entity that will restart. Platform dependent.
969
- *
970
- * ## Selector
971
- *
972
- * > ```yaml
973
- * > entity:
974
- * > integration: ffmpeg
975
- * > domain: binary_sensor
976
- * > ```
977
- */
978
- entity_id?: PICK_FROM_PLATFORM<"ffmpeg", "binary_sensor"> | PICK_FROM_PLATFORM<"ffmpeg", "binary_sensor">[];
979
- }): Promise<void>;
980
- /**
981
- * ### Start
982
- *
983
- * > Sends a start command to a ffmpeg based sensor.
984
- */
985
- start(service_data?: {
986
- /**
987
- * ## Entity
988
- *
989
- * > Name of entity that will start. Platform dependent.
990
- *
991
- * ## Selector
992
- *
993
- * > ```yaml
994
- * > entity:
995
- * > integration: ffmpeg
996
- * > domain: binary_sensor
997
- * > ```
998
- */
999
- entity_id?: PICK_FROM_PLATFORM<"ffmpeg", "binary_sensor"> | PICK_FROM_PLATFORM<"ffmpeg", "binary_sensor">[];
1000
- }): Promise<void>;
1001
- /**
1002
- * ### Stop
1003
- *
1004
- * > Sends a stop command to a ffmpeg based sensor.
1005
- */
1006
- stop(service_data?: {
1007
- /**
1008
- * ## Entity
1009
- *
1010
- * > Name of entity that will stop. Platform dependent.
1011
- *
1012
- * ## Selector
1013
- *
1014
- * > ```yaml
1015
- * > entity:
1016
- * > integration: ffmpeg
1017
- * > domain: binary_sensor
1018
- * > ```
1019
- */
1020
- entity_id?: PICK_FROM_PLATFORM<"ffmpeg", "binary_sensor"> | PICK_FROM_PLATFORM<"ffmpeg", "binary_sensor">[];
1021
- }): Promise<void>;
1022
- };
1023
- frontend: {
1024
- /**
1025
- * ### Reload themes
1026
- *
1027
- * > Reloads themes from the YAML-configuration.
1028
- */
1029
- reload_themes(service_data: {}): Promise<void>;
1030
- /**
1031
- * ### Set the default theme
1032
- *
1033
- * > Sets the default theme Home Assistant uses. Can be overridden by a user.
1034
- */
1035
- set_theme(service_data?: {
1036
- /**
1037
- * ## Mode
1038
- *
1039
- * > Theme mode.
1040
- *
1041
- * ### Default
1042
- *
1043
- * > ```json
1044
- * > "light"
1045
- * > ```
1046
- */
1047
- mode?: "dark" | "light";
1048
- /**
1049
- * ## Theme
1050
- *
1051
- * > Name of a theme.
1052
- *
1053
- * ### Example
1054
- *
1055
- * > ```json
1056
- * > {
1057
- * > "name": "default"
1058
- * > }
1059
- * > ```
1060
- *
1061
- * ## Selector
1062
- *
1063
- * > ```yaml
1064
- * > theme:
1065
- * > include_default: true
1066
- * > ```
1067
- */
1068
- name: unknown;
1069
- }): Promise<void>;
1070
- };
1071
- homeassistant: {
1072
- /**
1073
- * ### Check configuration
1074
- *
1075
- * > Checks the Home Assistant YAML-configuration files for errors. Errors will be shown in the Home Assistant logs.
1076
- */
1077
- check_config(service_data: {}): Promise<void>;
1078
- /**
1079
- * ### Reload all
1080
- *
1081
- * > Reload all YAML configuration that can be reloaded without restarting Home Assistant.
1082
- */
1083
- reload_all(service_data: {}): Promise<void>;
1084
- /**
1085
- * ### Reload config entry
1086
- *
1087
- * > Reloads the specified config entry.
1088
- */
1089
- reload_config_entry(service_data?: {
1090
- /**
1091
- * ## Config entry ID
1092
- *
1093
- * > The configuration entry ID of the entry to be reloaded.
1094
- *
1095
- * ### Example
1096
- *
1097
- * > ```json
1098
- * > {
1099
- * > "entry_id": "8955375327824e14ba89e4b29cc3ec9a"
1100
- * > }
1101
- * > ```
1102
- */
1103
- entry_id?: string;
1104
- /**
1105
- * Assisted definition
1106
- * > ```yaml
1107
- * > entity:
1108
- * > - {}
1109
- * > device:
1110
- * > - {}
1111
- * > ```
1112
- */
1113
- entity_id: PICK_ENTITY | PICK_ENTITY[];
1114
- }): Promise<void>;
1115
- /**
1116
- * ### Reload core configuration
1117
- *
1118
- * > Reloads the core configuration from the YAML-configuration.
1119
- */
1120
- reload_core_config(service_data: {}): Promise<void>;
1121
- /**
1122
- * ### Reload custom Jinja2 templates
1123
- *
1124
- * > Reloads Jinja2 templates found in the `custom_templates` folder in your config. New values will be applied on the next render of the template.
1125
- */
1126
- reload_custom_templates(service_data: {}): Promise<void>;
1127
- /**
1128
- * ### Restart
1129
- *
1130
- * > Restarts Home Assistant.
1131
- */
1132
- restart(service_data: {}): Promise<void>;
1133
- /**
1134
- * ### Save persistent states
1135
- *
1136
- * > Saves the persistent states immediately. Maintains the normal periodic saving interval.
1137
- */
1138
- save_persistent_states(service_data: {}): Promise<void>;
1139
- /**
1140
- * ### Set location
1141
- *
1142
- * > Updates the Home Assistant location.
1143
- */
1144
- set_location(service_data?: {
1145
- /**
1146
- * ## Elevation
1147
- *
1148
- * > Elevation of your location.
1149
- *
1150
- * ### Example
1151
- *
1152
- * > ```json
1153
- * > {
1154
- * > "elevation": "120"
1155
- * > }
1156
- * > ```
1157
- *
1158
- * ## Selector
1159
- *
1160
- * > ```yaml
1161
- * > number:
1162
- * > mode: box
1163
- * > step: any
1164
- * > ```
1165
- */
1166
- elevation?: number;
1167
- /**
1168
- * ## Latitude
1169
- *
1170
- * > Latitude of your location.
1171
- *
1172
- * ### Example
1173
- *
1174
- * > ```json
1175
- * > {
1176
- * > "latitude": "32.87336"
1177
- * > }
1178
- * > ```
1179
- *
1180
- * ## Selector
1181
- *
1182
- * > ```yaml
1183
- * > number:
1184
- * > mode: box
1185
- * > min: -90
1186
- * > max: 90
1187
- * > step: any
1188
- * > ```
1189
- */
1190
- latitude: number;
1191
- /**
1192
- * ## Longitude
1193
- *
1194
- * > Longitude of your location.
1195
- *
1196
- * ### Example
1197
- *
1198
- * > ```json
1199
- * > {
1200
- * > "longitude": "117.22743"
1201
- * > }
1202
- * > ```
1203
- *
1204
- * ## Selector
1205
- *
1206
- * > ```yaml
1207
- * > number:
1208
- * > mode: box
1209
- * > min: -180
1210
- * > max: 180
1211
- * > step: any
1212
- * > ```
1213
- */
1214
- longitude: number;
1215
- }): Promise<void>;
1216
- /**
1217
- * ### Stop
1218
- *
1219
- * > Stops Home Assistant.
1220
- */
1221
- stop(service_data: {}): Promise<void>;
1222
- /**
1223
- * ### Generic toggle
1224
- *
1225
- * > Generic service to toggle devices on/off under any domain.
1226
- */
1227
- toggle(service_data: {
1228
- /**
1229
- * Assisted definition
1230
- * > ```yaml
1231
- * > entity:
1232
- * > - {}
1233
- * > ```
1234
- */
1235
- entity_id: PICK_ENTITY | PICK_ENTITY[];
1236
- }): Promise<void>;
1237
- /**
1238
- * ### Generic turn off
1239
- *
1240
- * > Generic service to turn devices off under any domain.
1241
- */
1242
- turn_off(service_data: {
1243
- /**
1244
- * Assisted definition
1245
- * > ```yaml
1246
- * > entity:
1247
- * > - {}
1248
- * > ```
1249
- */
1250
- entity_id: PICK_ENTITY | PICK_ENTITY[];
1251
- }): Promise<void>;
1252
- /**
1253
- * ### Generic turn on
1254
- *
1255
- * > Generic service to turn devices on under any domain.
1256
- */
1257
- turn_on(service_data: {
1258
- /**
1259
- * Assisted definition
1260
- * > ```yaml
1261
- * > entity:
1262
- * > - {}
1263
- * > ```
1264
- */
1265
- entity_id: PICK_ENTITY | PICK_ENTITY[];
1266
- }): Promise<void>;
1267
- /**
1268
- * ### Update entity
1269
- *
1270
- * > Forces one or more entities to update its data.
1271
- */
1272
- update_entity(service_data: {
1273
- /**
1274
- * Assisted definition
1275
- * > ```yaml
1276
- * > entity:
1277
- * > - {}
1278
- * > ```
1279
- */
1280
- entity_id: PICK_ENTITY | PICK_ENTITY[];
1281
- }): Promise<void>;
1282
- };
1283
- input_boolean: {
1284
- /**
1285
- * ### Reload
1286
- *
1287
- * > Reloads helpers from the YAML-configuration.
1288
- */
1289
- reload(service_data: {}): Promise<void>;
1290
- /**
1291
- * ### Toggle
1292
- *
1293
- * > Toggles the helper on/off.
1294
- */
1295
- toggle(service_data: {
1296
- /**
1297
- * Assisted definition
1298
- * > ```yaml
1299
- * > entity:
1300
- * > - domain:
1301
- * > - input_boolean
1302
- * > ```
1303
- */
1304
- entity_id: PICK_ENTITY<"input_boolean"> | PICK_ENTITY<"input_boolean">[];
1305
- }): Promise<void>;
1306
- /**
1307
- * ### Turn off
1308
- *
1309
- * > Turns off the helper.
1310
- */
1311
- turn_off(service_data: {
1312
- /**
1313
- * Assisted definition
1314
- * > ```yaml
1315
- * > entity:
1316
- * > - domain:
1317
- * > - input_boolean
1318
- * > ```
1319
- */
1320
- entity_id: PICK_ENTITY<"input_boolean"> | PICK_ENTITY<"input_boolean">[];
1321
- }): Promise<void>;
1322
- /**
1323
- * ### Turn on
1324
- *
1325
- * > Turns on the helper.
1326
- */
1327
- turn_on(service_data: {
1328
- /**
1329
- * Assisted definition
1330
- * > ```yaml
1331
- * > entity:
1332
- * > - domain:
1333
- * > - input_boolean
1334
- * > ```
1335
- */
1336
- entity_id: PICK_ENTITY<"input_boolean"> | PICK_ENTITY<"input_boolean">[];
1337
- }): Promise<void>;
1338
- };
1339
- input_button: {
1340
- /**
1341
- * ### Press
1342
- *
1343
- * > Mimics the physical button press on the device.
1344
- */
1345
- press(service_data: {
1346
- /**
1347
- * Assisted definition
1348
- * > ```yaml
1349
- * > entity:
1350
- * > - domain:
1351
- * > - input_button
1352
- * > ```
1353
- */
1354
- entity_id: PICK_ENTITY<"input_button"> | PICK_ENTITY<"input_button">[];
1355
- }): Promise<void>;
1356
- /**
1357
- * ### Reload
1358
- *
1359
- * > Reloads helpers from the YAML-configuration.
1360
- */
1361
- reload(service_data: {}): Promise<void>;
1362
- };
1363
- input_datetime: {
1364
- /**
1365
- * ### Reload
1366
- *
1367
- * > Reloads helpers from the YAML-configuration.
1368
- */
1369
- reload(service_data: {}): Promise<void>;
1370
- /**
1371
- * ### Set
1372
- *
1373
- * > Sets the date and/or time.
1374
- */
1375
- set_datetime(service_data?: {
1376
- /**
1377
- * ## Date
1378
- *
1379
- * > The target date.
1380
- *
1381
- * ### Example
1382
- *
1383
- * > ```json
1384
- * > {
1385
- * > "date": "\"2019-04-20\""
1386
- * > }
1387
- * > ```
1388
- */
1389
- date?: string;
1390
- /**
1391
- * ## Date & time
1392
- *
1393
- * > The target date & time.
1394
- *
1395
- * ### Example
1396
- *
1397
- * > ```json
1398
- * > {
1399
- * > "datetime": "\"2019-04-20 05:04:20\""
1400
- * > }
1401
- * > ```
1402
- */
1403
- datetime?: string;
1404
- /**
1405
- * ## Time
1406
- *
1407
- * > The target time.
1408
- *
1409
- * ### Example
1410
- *
1411
- * > ```json
1412
- * > {
1413
- * > "time": "\"05:04:20\""
1414
- * > }
1415
- * > ```
1416
- */
1417
- time?: string;
1418
- /**
1419
- * ## Timestamp
1420
- *
1421
- * > The target date & time, expressed by a UNIX timestamp.
1422
- *
1423
- * ## Selector
1424
- *
1425
- * > ```yaml
1426
- * > number:
1427
- * > min: 0
1428
- * > max: 9223372036854776000
1429
- * > mode: box
1430
- * > ```
1431
- */
1432
- timestamp?: number;
1433
- /**
1434
- * Assisted definition
1435
- * > ```yaml
1436
- * > entity:
1437
- * > - domain:
1438
- * > - input_datetime
1439
- * > ```
1440
- */
1441
- entity_id: PICK_ENTITY<"input_datetime"> | PICK_ENTITY<"input_datetime">[];
1442
- }): Promise<void>;
1443
- };
1444
- input_number: {
1445
- /**
1446
- * ### Decrement
1447
- *
1448
- * > Decrements the current value by 1 step.
1449
- */
1450
- decrement(service_data: {
1451
- /**
1452
- * Assisted definition
1453
- * > ```yaml
1454
- * > entity:
1455
- * > - domain:
1456
- * > - input_number
1457
- * > ```
1458
- */
1459
- entity_id: PICK_ENTITY<"input_number"> | PICK_ENTITY<"input_number">[];
1460
- }): Promise<void>;
1461
- /**
1462
- * ### Increment
1463
- *
1464
- * > Increments the value by 1 step.
1465
- */
1466
- increment(service_data: {
1467
- /**
1468
- * Assisted definition
1469
- * > ```yaml
1470
- * > entity:
1471
- * > - domain:
1472
- * > - input_number
1473
- * > ```
1474
- */
1475
- entity_id: PICK_ENTITY<"input_number"> | PICK_ENTITY<"input_number">[];
1476
- }): Promise<void>;
1477
- /**
1478
- * ### Reload
1479
- *
1480
- * > Reloads helpers from the YAML-configuration.
1481
- */
1482
- reload(service_data: {}): Promise<void>;
1483
- /**
1484
- * ### Set
1485
- *
1486
- * > Sets the value.
1487
- */
1488
- set_value(service_data: {
1489
- /**
1490
- * ## Value
1491
- *
1492
- * > The target value.
1493
- *
1494
- * ## Selector
1495
- *
1496
- * > ```yaml
1497
- * > number:
1498
- * > min: 0
1499
- * > max: 9223372036854776000
1500
- * > step: 0.001
1501
- * > mode: box
1502
- * > ```
1503
- */
1504
- value: number;
1505
- /**
1506
- * Assisted definition
1507
- * > ```yaml
1508
- * > entity:
1509
- * > - domain:
1510
- * > - input_number
1511
- * > ```
1512
- */
1513
- entity_id: PICK_ENTITY<"input_number"> | PICK_ENTITY<"input_number">[];
1514
- }): Promise<void>;
1515
- };
1516
- input_select: {
1517
- /**
1518
- * ### Reload
1519
- *
1520
- * > Reloads helpers from the YAML-configuration.
1521
- */
1522
- reload(service_data: {}): Promise<void>;
1523
- /**
1524
- * ### First
1525
- *
1526
- * > Selects the first option.
1527
- */
1528
- select_first(service_data: {
1529
- /**
1530
- * Assisted definition
1531
- * > ```yaml
1532
- * > entity:
1533
- * > - domain:
1534
- * > - input_select
1535
- * > ```
1536
- */
1537
- entity_id: PICK_ENTITY<"input_select"> | PICK_ENTITY<"input_select">[];
1538
- }): Promise<void>;
1539
- /**
1540
- * ### Last
1541
- *
1542
- * > Selects the last option.
1543
- */
1544
- select_last(service_data: {
1545
- /**
1546
- * Assisted definition
1547
- * > ```yaml
1548
- * > entity:
1549
- * > - domain:
1550
- * > - input_select
1551
- * > ```
1552
- */
1553
- entity_id: PICK_ENTITY<"input_select"> | PICK_ENTITY<"input_select">[];
1554
- }): Promise<void>;
1555
- /**
1556
- * ### Next
1557
- *
1558
- * > Select the next option.
1559
- */
1560
- select_next(service_data?: {
1561
- /**
1562
- * ## Cycle
1563
- *
1564
- * > If the option should cycle from the last to the first option on the list.
1565
- *
1566
- * ### Default
1567
- *
1568
- * > ```json
1569
- * > true
1570
- * > ```
1571
- */
1572
- cycle?: boolean;
1573
- /**
1574
- * Assisted definition
1575
- * > ```yaml
1576
- * > entity:
1577
- * > - domain:
1578
- * > - input_select
1579
- * > ```
1580
- */
1581
- entity_id: PICK_ENTITY<"input_select"> | PICK_ENTITY<"input_select">[];
1582
- }): Promise<void>;
1583
- /**
1584
- * ### Select
1585
- *
1586
- * > Selects an option.
1587
- */
1588
- select_option(service_data: {
1589
- /**
1590
- * ## Option
1591
- *
1592
- * > Option to be selected.
1593
- *
1594
- * ### Example
1595
- *
1596
- * > ```json
1597
- * > {
1598
- * > "option": "\"Item A\""
1599
- * > }
1600
- * > ```
1601
- */
1602
- option: string;
1603
- /**
1604
- * Assisted definition
1605
- * > ```yaml
1606
- * > entity:
1607
- * > - domain:
1608
- * > - input_select
1609
- * > ```
1610
- */
1611
- entity_id: PICK_ENTITY<"input_select"> | PICK_ENTITY<"input_select">[];
1612
- }): Promise<void>;
1613
- /**
1614
- * ### Previous
1615
- *
1616
- * > Selects the previous option.
1617
- */
1618
- select_previous(service_data?: {
1619
- /**
1620
- * ## Cycle
1621
- *
1622
- * > If the option should cycle from the last to the first option on the list.
1623
- *
1624
- * ### Default
1625
- *
1626
- * > ```json
1627
- * > true
1628
- * > ```
1629
- */
1630
- cycle?: boolean;
1631
- /**
1632
- * Assisted definition
1633
- * > ```yaml
1634
- * > entity:
1635
- * > - domain:
1636
- * > - input_select
1637
- * > ```
1638
- */
1639
- entity_id: PICK_ENTITY<"input_select"> | PICK_ENTITY<"input_select">[];
1640
- }): Promise<void>;
1641
- /**
1642
- * ### Set options
1643
- *
1644
- * > Sets the options.
1645
- */
1646
- set_options(service_data: {
1647
- /**
1648
- * ## Options
1649
- *
1650
- * > List of options.
1651
- *
1652
- * ### Example
1653
- *
1654
- * > ```json
1655
- * > {
1656
- * > "options": "[\"Item A\", \"Item B\", \"Item C\"]"
1657
- * > }
1658
- * > ```
1659
- *
1660
- * ## Selector
1661
- *
1662
- * > ```yaml
1663
- * > object: null
1664
- * > ```
1665
- */
1666
- options: unknown;
1667
- /**
1668
- * Assisted definition
1669
- * > ```yaml
1670
- * > entity:
1671
- * > - domain:
1672
- * > - input_select
1673
- * > ```
1674
- */
1675
- entity_id: PICK_ENTITY<"input_select"> | PICK_ENTITY<"input_select">[];
1676
- }): Promise<void>;
1677
- };
1678
- light: {
1679
- /**
1680
- * ### Toggle
1681
- *
1682
- * > Toggles one or more lights, from on to off, or, off to on, based on their current state.
1683
- */
1684
- toggle(service_data?: {
1685
- /**
1686
- * ## Brightness value
1687
- *
1688
- * > Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
1689
- *
1690
- * ## Selector
1691
- *
1692
- * > ```yaml
1693
- * > number:
1694
- * > min: 0
1695
- * > max: 255
1696
- * > ```
1697
- */
1698
- brightness?: number;
1699
- /**
1700
- * ## Brightness
1701
- *
1702
- * > Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
1703
- *
1704
- * ## Selector
1705
- *
1706
- * > ```yaml
1707
- * > number:
1708
- * > min: 0
1709
- * > max: 100
1710
- * > unit_of_measurement: '%'
1711
- * > ```
1712
- */
1713
- brightness_pct?: number;
1714
- /**
1715
- * ## Color name
1716
- *
1717
- * > A human-readable color name.
1718
- */
1719
- color_name?: "homeassistant" | "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "navyblue" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
1720
- /**
1721
- * ## Color temperature
1722
- *
1723
- * > Color temperature in mireds.
1724
- *
1725
- * ## Selector
1726
- *
1727
- * > ```yaml
1728
- * > color_temp: null
1729
- * > ```
1730
- */
1731
- color_temp?: unknown;
1732
- /**
1733
- * ## Effect
1734
- *
1735
- * > Light effect.
1736
- */
1737
- effect?: string;
1738
- /**
1739
- * ## Flash
1740
- *
1741
- * > Tell light to flash, can be either value short or long.
1742
- */
1743
- flash?: "long" | "short";
1744
- /**
1745
- * ## Hue/Sat color
1746
- *
1747
- * > Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.
1748
- *
1749
- * ### Example
1750
- *
1751
- * > ```json
1752
- * > {
1753
- * > "hs_color": "[300, 70]"
1754
- * > }
1755
- * > ```
1756
- *
1757
- * ## Selector
1758
- *
1759
- * > ```yaml
1760
- * > object: null
1761
- * > ```
1762
- */
1763
- hs_color?: unknown;
1764
- /**
1765
- * ## Color temperature
1766
- *
1767
- * > Color temperature in Kelvin.
1768
- *
1769
- * ## Selector
1770
- *
1771
- * > ```yaml
1772
- * > color_temp:
1773
- * > unit: kelvin
1774
- * > min: 2000
1775
- * > max: 6500
1776
- * > ```
1777
- */
1778
- kelvin?: unknown;
1779
- /**
1780
- * ## Profile
1781
- *
1782
- * > Name of a light profile to use.
1783
- *
1784
- * ### Example
1785
- *
1786
- * > ```json
1787
- * > {
1788
- * > "profile": "relax"
1789
- * > }
1790
- * > ```
1791
- */
1792
- profile?: string;
1793
- /**
1794
- * ## Color
1795
- *
1796
- * > The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
1797
- *
1798
- * ### Example
1799
- *
1800
- * > ```json
1801
- * > {
1802
- * > "rgb_color": "[255, 100, 100]"
1803
- * > }
1804
- * > ```
1805
- *
1806
- * ## Selector
1807
- *
1808
- * > ```yaml
1809
- * > color_rgb: null
1810
- * > ```
1811
- */
1812
- rgb_color?: unknown;
1813
- /**
1814
- * ## Transition
1815
- *
1816
- * > Duration it takes to get to next state.
1817
- *
1818
- * ## Selector
1819
- *
1820
- * > ```yaml
1821
- * > number:
1822
- * > min: 0
1823
- * > max: 300
1824
- * > unit_of_measurement: seconds
1825
- * > ```
1826
- */
1827
- transition?: number;
1828
- /**
1829
- * ## White
1830
- *
1831
- * > Set the light to white mode.
1832
- *
1833
- * ## Selector
1834
- *
1835
- * > ```yaml
1836
- * > constant:
1837
- * > value: true
1838
- * > label: Enabled
1839
- * > ```
1840
- */
1841
- white?: unknown;
1842
- /**
1843
- * ## XY-color
1844
- *
1845
- * > Color in XY-format. A list of two decimal numbers between 0 and 1.
1846
- *
1847
- * ### Example
1848
- *
1849
- * > ```json
1850
- * > {
1851
- * > "xy_color": "[0.52, 0.43]"
1852
- * > }
1853
- * > ```
1854
- *
1855
- * ## Selector
1856
- *
1857
- * > ```yaml
1858
- * > object: null
1859
- * > ```
1860
- */
1861
- xy_color?: unknown;
1862
- /**
1863
- * Assisted definition
1864
- * > ```yaml
1865
- * > entity:
1866
- * > - domain:
1867
- * > - light
1868
- * > ```
1869
- */
1870
- entity_id: PICK_ENTITY<"light"> | PICK_ENTITY<"light">[];
1871
- }): Promise<void>;
1872
- /**
1873
- * ### Turn off
1874
- *
1875
- * > Turn off one or more lights.
1876
- */
1877
- turn_off(service_data?: {
1878
- /**
1879
- * ## Flash
1880
- *
1881
- * > Tell light to flash, can be either value short or long.
1882
- */
1883
- flash?: "long" | "short";
1884
- /**
1885
- * ## Transition
1886
- *
1887
- * > Duration it takes to get to next state.
1888
- *
1889
- * ## Selector
1890
- *
1891
- * > ```yaml
1892
- * > number:
1893
- * > min: 0
1894
- * > max: 300
1895
- * > unit_of_measurement: seconds
1896
- * > ```
1897
- */
1898
- transition?: number;
1899
- /**
1900
- * Assisted definition
1901
- * > ```yaml
1902
- * > entity:
1903
- * > - domain:
1904
- * > - light
1905
- * > ```
1906
- */
1907
- entity_id: PICK_ENTITY<"light"> | PICK_ENTITY<"light">[];
1908
- }): Promise<void>;
1909
- /**
1910
- * ### Turn on
1911
- *
1912
- * > Turn on one or more lights and adjust properties of the light, even when they are turned on already.
1913
- */
1914
- turn_on(service_data?: {
1915
- /**
1916
- * ## Brightness value
1917
- *
1918
- * > Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
1919
- *
1920
- * ## Selector
1921
- *
1922
- * > ```yaml
1923
- * > number:
1924
- * > min: 0
1925
- * > max: 255
1926
- * > ```
1927
- */
1928
- brightness?: number;
1929
- /**
1930
- * ## Brightness
1931
- *
1932
- * > Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
1933
- *
1934
- * ## Selector
1935
- *
1936
- * > ```yaml
1937
- * > number:
1938
- * > min: 0
1939
- * > max: 100
1940
- * > unit_of_measurement: '%'
1941
- * > ```
1942
- */
1943
- brightness_pct?: number;
1944
- /**
1945
- * ## Brightness step value
1946
- *
1947
- * > Change brightness by an amount.
1948
- *
1949
- * ## Selector
1950
- *
1951
- * > ```yaml
1952
- * > number:
1953
- * > min: -225
1954
- * > max: 255
1955
- * > ```
1956
- */
1957
- brightness_step?: number;
1958
- /**
1959
- * ## Brightness step
1960
- *
1961
- * > Change brightness by a percentage.
1962
- *
1963
- * ## Selector
1964
- *
1965
- * > ```yaml
1966
- * > number:
1967
- * > min: -100
1968
- * > max: 100
1969
- * > unit_of_measurement: '%'
1970
- * > ```
1971
- */
1972
- brightness_step_pct?: number;
1973
- /**
1974
- * ## Color name
1975
- *
1976
- * > A human-readable color name.
1977
- */
1978
- color_name?: "homeassistant" | "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "navyblue" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
1979
- /**
1980
- * ## Color temperature
1981
- *
1982
- * > Color temperature in mireds.
1983
- *
1984
- * ## Selector
1985
- *
1986
- * > ```yaml
1987
- * > color_temp:
1988
- * > unit: mired
1989
- * > min: 153
1990
- * > max: 500
1991
- * > ```
1992
- */
1993
- color_temp?: unknown;
1994
- /**
1995
- * ## Effect
1996
- *
1997
- * > Light effect.
1998
- */
1999
- effect?: string;
2000
- /**
2001
- * ## Flash
2002
- *
2003
- * > Tell light to flash, can be either value short or long.
2004
- */
2005
- flash?: "long" | "short";
2006
- /**
2007
- * ## Hue/Sat color
2008
- *
2009
- * > Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.
2010
- *
2011
- * ### Example
2012
- *
2013
- * > ```json
2014
- * > {
2015
- * > "hs_color": "[300, 70]"
2016
- * > }
2017
- * > ```
2018
- *
2019
- * ## Selector
2020
- *
2021
- * > ```yaml
2022
- * > object: null
2023
- * > ```
2024
- */
2025
- hs_color?: unknown;
2026
- /**
2027
- * ## Color temperature
2028
- *
2029
- * > Color temperature in Kelvin.
2030
- *
2031
- * ## Selector
2032
- *
2033
- * > ```yaml
2034
- * > color_temp:
2035
- * > unit: kelvin
2036
- * > min: 2000
2037
- * > max: 6500
2038
- * > ```
2039
- */
2040
- kelvin?: unknown;
2041
- /**
2042
- * ## Profile
2043
- *
2044
- * > Name of a light profile to use.
2045
- *
2046
- * ### Example
2047
- *
2048
- * > ```json
2049
- * > {
2050
- * > "profile": "relax"
2051
- * > }
2052
- * > ```
2053
- */
2054
- profile?: string;
2055
- /**
2056
- * ## Color
2057
- *
2058
- * > The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
2059
- *
2060
- * ## Selector
2061
- *
2062
- * > ```yaml
2063
- * > color_rgb: null
2064
- * > ```
2065
- */
2066
- rgb_color?: unknown;
2067
- /**
2068
- * ## RGBW-color
2069
- *
2070
- * > The color in RGBW format. A list of four integers between 0 and 255 representing the values of red, green, blue, and white.
2071
- *
2072
- * ### Example
2073
- *
2074
- * > ```json
2075
- * > {
2076
- * > "rgbw_color": "[255, 100, 100, 50]"
2077
- * > }
2078
- * > ```
2079
- *
2080
- * ## Selector
2081
- *
2082
- * > ```yaml
2083
- * > object: null
2084
- * > ```
2085
- */
2086
- rgbw_color?: unknown;
2087
- /**
2088
- * ## RGBWW-color
2089
- *
2090
- * > The color in RGBWW format. A list of five integers between 0 and 255 representing the values of red, green, blue, cold white, and warm white.
2091
- *
2092
- * ### Example
2093
- *
2094
- * > ```json
2095
- * > {
2096
- * > "rgbww_color": "[255, 100, 100, 50, 70]"
2097
- * > }
2098
- * > ```
2099
- *
2100
- * ## Selector
2101
- *
2102
- * > ```yaml
2103
- * > object: null
2104
- * > ```
2105
- */
2106
- rgbww_color?: unknown;
2107
- /**
2108
- * ## Transition
2109
- *
2110
- * > Duration it takes to get to next state.
2111
- *
2112
- * ## Selector
2113
- *
2114
- * > ```yaml
2115
- * > number:
2116
- * > min: 0
2117
- * > max: 300
2118
- * > unit_of_measurement: seconds
2119
- * > ```
2120
- */
2121
- transition?: number;
2122
- /**
2123
- * ## White
2124
- *
2125
- * > Set the light to white mode.
2126
- *
2127
- * ## Selector
2128
- *
2129
- * > ```yaml
2130
- * > constant:
2131
- * > value: true
2132
- * > label: Enabled
2133
- * > ```
2134
- */
2135
- white?: unknown;
2136
- /**
2137
- * ## XY-color
2138
- *
2139
- * > Color in XY-format. A list of two decimal numbers between 0 and 1.
2140
- *
2141
- * ### Example
2142
- *
2143
- * > ```json
2144
- * > {
2145
- * > "xy_color": "[0.52, 0.43]"
2146
- * > }
2147
- * > ```
2148
- *
2149
- * ## Selector
2150
- *
2151
- * > ```yaml
2152
- * > object: null
2153
- * > ```
2154
- */
2155
- xy_color?: unknown;
2156
- /**
2157
- * Assisted definition
2158
- * > ```yaml
2159
- * > entity:
2160
- * > - domain:
2161
- * > - light
2162
- * > ```
2163
- */
2164
- entity_id: PICK_ENTITY<"light"> | PICK_ENTITY<"light">[];
2165
- }): Promise<void>;
2166
- };
2167
- input_text: {
2168
- /**
2169
- * ### Reload
2170
- *
2171
- * > Reloads helpers from the YAML-configuration.
2172
- */
2173
- reload(service_data: {}): Promise<void>;
2174
- /**
2175
- * ### Set
2176
- *
2177
- * > Sets the value.
2178
- */
2179
- set_value(service_data: {
2180
- /**
2181
- * ## Value
2182
- *
2183
- * > The target value.
2184
- *
2185
- * ### Example
2186
- *
2187
- * > ```json
2188
- * > {
2189
- * > "value": "This is an example text"
2190
- * > }
2191
- * > ```
2192
- */
2193
- value: string;
2194
- /**
2195
- * Assisted definition
2196
- * > ```yaml
2197
- * > entity:
2198
- * > - domain:
2199
- * > - input_text
2200
- * > ```
2201
- */
2202
- entity_id: PICK_ENTITY<"input_text"> | PICK_ENTITY<"input_text">[];
2203
- }): Promise<void>;
2204
- };
2205
- logbook: {
2206
- /**
2207
- * ### Log
2208
- *
2209
- * > Creates a custom entry in the logbook.
2210
- */
2211
- log(service_data?: {
2212
- /**
2213
- * ## Domain
2214
- *
2215
- * > Determines which icon is used in the logbook entry. The icon illustrates the integration domain related to this logbook entry.
2216
- *
2217
- * ### Example
2218
- *
2219
- * > ```json
2220
- * > {
2221
- * > "domain": "light"
2222
- * > }
2223
- * > ```
2224
- */
2225
- domain?: string;
2226
- /**
2227
- * ## Entity ID
2228
- *
2229
- * > Entity to reference in the logbook entry.
2230
- *
2231
- * ## Selector
2232
- *
2233
- * > ```yaml
2234
- * > entity: null
2235
- * > ```
2236
- */
2237
- entity_id?: PICK_ENTITY | PICK_ENTITY[];
2238
- /**
2239
- * ## Message
2240
- *
2241
- * > Message of the logbook entry.
2242
- *
2243
- * ### Example
2244
- *
2245
- * > ```json
2246
- * > {
2247
- * > "message": "is being used"
2248
- * > }
2249
- * > ```
2250
- */
2251
- message: string;
2252
- /**
2253
- * ## Name
2254
- *
2255
- * > Custom name for an entity, can be referenced using an `entity_id`.
2256
- *
2257
- * ### Example
2258
- *
2259
- * > ```json
2260
- * > {
2261
- * > "name": "Kitchen"
2262
- * > }
2263
- * > ```
2264
- */
2265
- name: string;
2266
- }): Promise<void>;
2267
- };
2268
- logger: {
2269
- /**
2270
- * ### Set default level
2271
- *
2272
- * > Sets the default log level for integrations.
2273
- */
2274
- set_default_level(service_data?: {
2275
- /**
2276
- * ## Level
2277
- *
2278
- * > Default severity level for all integrations.
2279
- */
2280
- level?: "debug" | "info" | "warning" | "error" | "fatal" | "critical";
2281
- }): Promise<void>;
2282
- /**
2283
- * ### Set level
2284
- *
2285
- * > Sets the log level for one or more integrations.
2286
- */
2287
- set_level(service_data: {}): Promise<void>;
2288
- };
2289
- button: {
2290
- /**
2291
- * ### Press
2292
- *
2293
- * > Press the button entity.
2294
- */
2295
- press(service_data: {
2296
- /**
2297
- * Assisted definition
2298
- * > ```yaml
2299
- * > entity:
2300
- * > - domain:
2301
- * > - button
2302
- * > ```
2303
- */
2304
- entity_id: PICK_ENTITY<"button"> | PICK_ENTITY<"button">[];
2305
- }): Promise<void>;
2306
- };
2307
- notify: {
2308
- /**
2309
- * ### Send a notification with notify
2310
- *
2311
- * > Sends a notification message using the notify service.
2312
- */
2313
- notify(service_data?: {
2314
- /**
2315
- * ## data
2316
- *
2317
- * ### Example
2318
- *
2319
- * > ```json
2320
- * > {
2321
- * > "data": "platform specific"
2322
- * > }
2323
- * > ```
2324
- *
2325
- * ## Selector
2326
- *
2327
- * > ```yaml
2328
- * > object: null
2329
- * > ```
2330
- */
2331
- data?: NotificationData & (AndroidNotificationData | AppleNotificationData);
2332
- /**
2333
- * ## message
2334
- *
2335
- * ### Example
2336
- *
2337
- * > ```json
2338
- * > {
2339
- * > "message": "The garage door has been open for 10 minutes."
2340
- * > }
2341
- * > ```
2342
- */
2343
- message: string;
2344
- /**
2345
- * ## target
2346
- *
2347
- * ### Example
2348
- *
2349
- * > ```json
2350
- * > {
2351
- * > "target": "platform specific"
2352
- * > }
2353
- * > ```
2354
- *
2355
- * ## Selector
2356
- *
2357
- * > ```yaml
2358
- * > object: null
2359
- * > ```
2360
- */
2361
- target?: unknown;
2362
- /**
2363
- * ## title
2364
- *
2365
- * ### Example
2366
- *
2367
- * > ```json
2368
- * > {
2369
- * > "title": "Your Garage Door Friend"
2370
- * > }
2371
- * > ```
2372
- */
2373
- title?: string;
2374
- }): Promise<void>;
2375
- /**
2376
- * ### Send a persistent notification
2377
- *
2378
- * > Sends a notification that is visible in the **Notifications** panel.
2379
- */
2380
- persistent_notification(service_data?: {
2381
- /**
2382
- * ## Data
2383
- *
2384
- * > Some integrations provide extended functionality. For information on how to use _data_, refer to the integration documentation..
2385
- *
2386
- * ### Example
2387
- *
2388
- * > ```json
2389
- * > {
2390
- * > "data": "platform specific"
2391
- * > }
2392
- * > ```
2393
- *
2394
- * ## Selector
2395
- *
2396
- * > ```yaml
2397
- * > object: null
2398
- * > ```
2399
- */
2400
- data?: NotificationData & (AndroidNotificationData | AppleNotificationData);
2401
- /**
2402
- * ## Message
2403
- *
2404
- * > Message body of the notification.
2405
- *
2406
- * ### Example
2407
- *
2408
- * > ```json
2409
- * > {
2410
- * > "message": "The garage door has been open for 10 minutes."
2411
- * > }
2412
- * > ```
2413
- */
2414
- message: string;
2415
- /**
2416
- * ## Title
2417
- *
2418
- * > Title of the notification.
2419
- *
2420
- * ### Example
2421
- *
2422
- * > ```json
2423
- * > {
2424
- * > "title": "Your Garage Door Friend"
2425
- * > }
2426
- * > ```
2427
- */
2428
- title?: string;
2429
- }): Promise<void>;
2430
- };
2431
- persistent_notification: {
2432
- /**
2433
- * ### Create
2434
- *
2435
- * > Shows a notification on the **Notifications** panel.
2436
- */
2437
- create(service_data?: {
2438
- /**
2439
- * ## Message
2440
- *
2441
- * > Message body of the notification.
2442
- *
2443
- * ### Example
2444
- *
2445
- * > ```json
2446
- * > {
2447
- * > "message": "Please check your configuration.yaml."
2448
- * > }
2449
- * > ```
2450
- */
2451
- message: string;
2452
- /**
2453
- * ## Notification ID
2454
- *
2455
- * > ID of the notification. This new notification will overwrite an existing notification with the same ID.
2456
- *
2457
- * ### Example
2458
- *
2459
- * > ```json
2460
- * > {
2461
- * > "notification_id": "1234"
2462
- * > }
2463
- * > ```
2464
- */
2465
- notification_id?: string;
2466
- /**
2467
- * ## Title
2468
- *
2469
- * > Optional title of the notification.
2470
- *
2471
- * ### Example
2472
- *
2473
- * > ```json
2474
- * > {
2475
- * > "title": "Test notification"
2476
- * > }
2477
- * > ```
2478
- */
2479
- title?: string;
2480
- }): Promise<void>;
2481
- /**
2482
- * ### Dismiss
2483
- *
2484
- * > Removes a notification from the **Notifications** panel.
2485
- */
2486
- dismiss(service_data: {
2487
- /**
2488
- * ## Notification ID
2489
- *
2490
- * > ID of the notification to be removed.
2491
- *
2492
- * ### Example
2493
- *
2494
- * > ```json
2495
- * > {
2496
- * > "notification_id": "1234"
2497
- * > }
2498
- * > ```
2499
- */
2500
- notification_id: string;
2501
- }): Promise<void>;
2502
- /**
2503
- * ### Dismiss all
2504
- *
2505
- * > Removes all notifications from the **Notifications** panel.
2506
- */
2507
- dismiss_all(service_data: {}): Promise<void>;
2508
- };
2509
- person: {
2510
- /**
2511
- * ### Reload
2512
- *
2513
- * > Reloads persons from the YAML-configuration.
2514
- */
2515
- reload(service_data: {}): Promise<void>;
2516
- };
2517
- recorder: {
2518
- /**
2519
- * ### Disable
2520
- *
2521
- * > Stops the recording of events and state changes.
2522
- */
2523
- disable(service_data: {}): Promise<void>;
2524
- /**
2525
- * ### Enable
2526
- *
2527
- * > Starts the recording of events and state changes.
2528
- */
2529
- enable(service_data: {}): Promise<void>;
2530
- /**
2531
- * ### Purge
2532
- *
2533
- * > Starts purge task - to clean up old data from your database.
2534
- */
2535
- purge(service_data?: {
2536
- /**
2537
- * ## Apply filter
2538
- *
2539
- * > Apply `entity_id` and `event_type` filters in addition to time-based purge.
2540
- *
2541
- * ### Default
2542
- *
2543
- * > ```json
2544
- * > false
2545
- * > ```
2546
- */
2547
- apply_filter?: boolean;
2548
- /**
2549
- * ## Days to keep
2550
- *
2551
- * > Number of days to keep the data in the database. Starting today, counting backward. A value of `7` means that everything older than a week will be purged.
2552
- *
2553
- * ## Selector
2554
- *
2555
- * > ```yaml
2556
- * > number:
2557
- * > min: 0
2558
- * > max: 365
2559
- * > unit_of_measurement: days
2560
- * > ```
2561
- */
2562
- keep_days?: number;
2563
- /**
2564
- * ## Repack
2565
- *
2566
- * > Attempt to save disk space by rewriting the entire database file.
2567
- *
2568
- * ### Default
2569
- *
2570
- * > ```json
2571
- * > false
2572
- * > ```
2573
- */
2574
- repack?: boolean;
2575
- }): Promise<void>;
2576
- /**
2577
- * ### Purge entities
2578
- *
2579
- * > Starts a purge task to remove the data related to specific entities from your database.
2580
- */
2581
- purge_entities(service_data?: {
2582
- /**
2583
- * ## Domains to remove
2584
- *
2585
- * > List of domains for which the data needs to be removed from the recorder database.
2586
- *
2587
- * ### Example
2588
- *
2589
- * > ```json
2590
- * > {
2591
- * > "domains": "sun"
2592
- * > }
2593
- * > ```
2594
- *
2595
- * ### Default
2596
- *
2597
- * > ```json
2598
- * > []
2599
- * > ```
2600
- *
2601
- * ## Selector
2602
- *
2603
- * > ```yaml
2604
- * > object: null
2605
- * > ```
2606
- */
2607
- domains?: unknown;
2608
- /**
2609
- * ## Entity globs to remove
2610
- *
2611
- * > List of glob patterns used to select the entities for which the data is to be removed from the recorder database.
2612
- *
2613
- * ### Example
2614
- *
2615
- * > ```json
2616
- * > {
2617
- * > "entity_globs": "domain*.object_id*"
2618
- * > }
2619
- * > ```
2620
- *
2621
- * ### Default
2622
- *
2623
- * > ```json
2624
- * > []
2625
- * > ```
2626
- *
2627
- * ## Selector
2628
- *
2629
- * > ```yaml
2630
- * > object: null
2631
- * > ```
2632
- */
2633
- entity_globs?: unknown;
2634
- /**
2635
- * ## Days to keep
2636
- *
2637
- * > Number of days to keep the data for rows matching the filter. Starting today, counting backward. A value of `7` means that everything older than a week will be purged. The default of 0 days will remove all matching rows immediately.
2638
- *
2639
- * ### Default
2640
- *
2641
- * > ```json
2642
- * > 0
2643
- * > ```
2644
- *
2645
- * ## Selector
2646
- *
2647
- * > ```yaml
2648
- * > number:
2649
- * > min: 0
2650
- * > max: 365
2651
- * > unit_of_measurement: days
2652
- * > ```
2653
- */
2654
- keep_days?: number;
2655
- /**
2656
- * Assisted definition
2657
- * > ```yaml
2658
- * > entity:
2659
- * > - {}
2660
- * > ```
2661
- */
2662
- entity_id: PICK_ENTITY | PICK_ENTITY[];
2663
- }): Promise<void>;
2664
- };
2665
- scene: {
2666
- /**
2667
- * ### Apply
2668
- *
2669
- * > Activates a scene with configuration.
2670
- */
2671
- apply(service_data?: {
2672
- /**
2673
- * ## Entities state
2674
- *
2675
- * > List of entities and their target state.
2676
- *
2677
- * ### Example
2678
- *
2679
- * > ```json
2680
- * > {
2681
- * > "entities": "light.kitchen: \"on\"\nlight.ceiling:\n state: \"on\"\n brightness: 80\n"
2682
- * > }
2683
- * > ```
2684
- *
2685
- * ## Selector
2686
- *
2687
- * > ```yaml
2688
- * > object: null
2689
- * > ```
2690
- */
2691
- entities: unknown;
2692
- /**
2693
- * ## Transition
2694
- *
2695
- * > Time it takes the devices to transition into the states defined in the scene.
2696
- *
2697
- * ## Selector
2698
- *
2699
- * > ```yaml
2700
- * > number:
2701
- * > min: 0
2702
- * > max: 300
2703
- * > unit_of_measurement: seconds
2704
- * > ```
2705
- */
2706
- transition?: number;
2707
- }): Promise<void>;
2708
- /**
2709
- * ### Create
2710
- *
2711
- * > Creates a new scene.
2712
- */
2713
- create(service_data?: {
2714
- /**
2715
- * ## Entities state
2716
- *
2717
- * > List of entities and their target state. If your entities are already in the target state right now, use `snapshot_entities` instead.
2718
- *
2719
- * ### Example
2720
- *
2721
- * > ```json
2722
- * > {
2723
- * > "entities": "light.tv_back_light: \"on\"\nlight.ceiling:\n state: \"on\"\n brightness: 200\n"
2724
- * > }
2725
- * > ```
2726
- *
2727
- * ## Selector
2728
- *
2729
- * > ```yaml
2730
- * > object: null
2731
- * > ```
2732
- */
2733
- entities?: unknown;
2734
- /**
2735
- * ## Scene entity ID
2736
- *
2737
- * > The entity ID of the new scene.
2738
- *
2739
- * ### Example
2740
- *
2741
- * > ```json
2742
- * > {
2743
- * > "scene_id": "all_lights"
2744
- * > }
2745
- * > ```
2746
- */
2747
- scene_id: string;
2748
- /**
2749
- * ## Snapshot entities
2750
- *
2751
- * > List of entities to be included in the snapshot. By taking a snapshot, you record the current state of those entities. If you do not want to use the current state of all your entities for this scene, you can combine the `snapshot_entities` with `entities`.
2752
- *
2753
- * ### Example
2754
- *
2755
- * > ```json
2756
- * > {
2757
- * > "snapshot_entities": "- light.ceiling\n- light.kitchen\n"
2758
- * > }
2759
- * > ```
2760
- */
2761
- snapshot_entities?: PICK_ENTITY | PICK_ENTITY[];
2762
- }): Promise<void>;
2763
- /**
2764
- * ### Delete
2765
- *
2766
- * > Deletes a dynamically created scene.
2767
- */
2768
- delete(service_data: {
2769
- /**
2770
- * Assisted definition
2771
- * > ```yaml
2772
- * > entity:
2773
- * > - integration: homeassistant
2774
- * > domain:
2775
- * > - scene
2776
- * > ```
2777
- */
2778
- entity_id: PICK_FROM_PLATFORM<"homeassistant", "scene"> | PICK_FROM_PLATFORM<"homeassistant", "scene">[];
2779
- }): Promise<void>;
2780
- /**
2781
- * ### Reload
2782
- *
2783
- * > Reloads the scenes from the YAML-configuration.
2784
- */
2785
- reload(service_data: {}): Promise<void>;
2786
- /**
2787
- * ### Activate
2788
- *
2789
- * > Activates a scene.
2790
- */
2791
- turn_on(service_data?: {
2792
- /**
2793
- * ## Transition
2794
- *
2795
- * > Time it takes the devices to transition into the states defined in the scene.
2796
- *
2797
- * ## Selector
2798
- *
2799
- * > ```yaml
2800
- * > number:
2801
- * > min: 0
2802
- * > max: 300
2803
- * > unit_of_measurement: seconds
2804
- * > ```
2805
- */
2806
- transition?: number;
2807
- /**
2808
- * Assisted definition
2809
- * > ```yaml
2810
- * > entity:
2811
- * > - domain:
2812
- * > - scene
2813
- * > ```
2814
- */
2815
- entity_id: PICK_ENTITY<"scene"> | PICK_ENTITY<"scene">[];
2816
- }): Promise<void>;
2817
- };
2818
- schedule: {
2819
- /**
2820
- * ### Reload
2821
- *
2822
- * > Reloads schedules from the YAML-configuration.
2823
- */
2824
- reload(service_data: {}): Promise<void>;
2825
- };
2826
- script: {
2827
- /**
2828
- * ### Reload
2829
- *
2830
- * > Reloads all the available scripts.
2831
- */
2832
- reload(service_data: {}): Promise<void>;
2833
- /**
2834
- * ### Toggle
2835
- *
2836
- * > Toggle a script. Starts it, if isn't running, stops it otherwise.
2837
- */
2838
- toggle(service_data: {
2839
- /**
2840
- * Assisted definition
2841
- * > ```yaml
2842
- * > entity:
2843
- * > - domain:
2844
- * > - script
2845
- * > ```
2846
- */
2847
- entity_id: PICK_ENTITY<"script"> | PICK_ENTITY<"script">[];
2848
- }): Promise<void>;
2849
- /**
2850
- * ### Turn off
2851
- *
2852
- * > Stops a running script.
2853
- */
2854
- turn_off(service_data: {
2855
- /**
2856
- * Assisted definition
2857
- * > ```yaml
2858
- * > entity:
2859
- * > - domain:
2860
- * > - script
2861
- * > ```
2862
- */
2863
- entity_id: PICK_ENTITY<"script"> | PICK_ENTITY<"script">[];
2864
- }): Promise<void>;
2865
- /**
2866
- * ### Turn on
2867
- *
2868
- * > Runs the sequence of actions defined in a script.
2869
- */
2870
- turn_on(service_data: {
2871
- /**
2872
- * Assisted definition
2873
- * > ```yaml
2874
- * > entity:
2875
- * > - domain:
2876
- * > - script
2877
- * > ```
2878
- */
2879
- entity_id: PICK_ENTITY<"script"> | PICK_ENTITY<"script">[];
2880
- }): Promise<void>;
2881
- };
2882
- shopping_list: {
2883
- /**
2884
- * ### Add item
2885
- *
2886
- * > Adds an item to the shopping list.
2887
- */
2888
- add_item(service_data: {
2889
- /**
2890
- * ## Name
2891
- *
2892
- * > The name of the item to add.
2893
- *
2894
- * ### Example
2895
- *
2896
- * > ```json
2897
- * > {
2898
- * > "name": "Beer"
2899
- * > }
2900
- * > ```
2901
- */
2902
- name: string;
2903
- }): Promise<void>;
2904
- /**
2905
- * ### Clear completed items
2906
- *
2907
- * > Clears completed items from the shopping list.
2908
- */
2909
- clear_completed_items(service_data: {}): Promise<void>;
2910
- /**
2911
- * ### Complete all
2912
- *
2913
- * > Marks all items as completed in the shopping list (without removing them from the list).
2914
- */
2915
- complete_all(service_data: {}): Promise<void>;
2916
- /**
2917
- * ### Complete item
2918
- *
2919
- * > Marks the first item with matching name as completed in the shopping list.
2920
- */
2921
- complete_item(service_data: {
2922
- /**
2923
- * ## Name
2924
- *
2925
- * > The name of the item to mark as completed (without removing).
2926
- *
2927
- * ### Example
2928
- *
2929
- * > ```json
2930
- * > {
2931
- * > "name": "Beer"
2932
- * > }
2933
- * > ```
2934
- */
2935
- name: string;
2936
- }): Promise<void>;
2937
- /**
2938
- * ### Incomplete all
2939
- *
2940
- * > Marks all items as incomplete in the shopping list.
2941
- */
2942
- incomplete_all(service_data: {}): Promise<void>;
2943
- /**
2944
- * ### Incomplete item
2945
- *
2946
- * > Marks the first item with matching name as incomplete in the shopping list.
2947
- */
2948
- incomplete_item(service_data: {
2949
- /**
2950
- * ## Name
2951
- *
2952
- * > The name of the item to mark as incomplete.
2953
- *
2954
- * ### Example
2955
- *
2956
- * > ```json
2957
- * > {
2958
- * > "name": "Beer"
2959
- * > }
2960
- * > ```
2961
- */
2962
- name: string;
2963
- }): Promise<void>;
2964
- /**
2965
- * ### Remove item
2966
- *
2967
- * > Removes the first item with matching name from the shopping list.
2968
- */
2969
- remove_item(service_data: {
2970
- /**
2971
- * ## Name
2972
- *
2973
- * > The name of the item to remove.
2974
- *
2975
- * ### Example
2976
- *
2977
- * > ```json
2978
- * > {
2979
- * > "name": "Beer"
2980
- * > }
2981
- * > ```
2982
- */
2983
- name: string;
2984
- }): Promise<void>;
2985
- /**
2986
- * ### Sort all items
2987
- *
2988
- * > Sorts all items by name in the shopping list.
2989
- */
2990
- sort(service_data?: {
2991
- /**
2992
- * ## Sort reverse
2993
- *
2994
- * > Whether to sort in reverse (descending) order.
2995
- *
2996
- * ### Default
2997
- *
2998
- * > ```json
2999
- * > false
3000
- * > ```
3001
- */
3002
- reverse?: boolean;
3003
- }): Promise<void>;
3004
- };
3005
- switch: {
3006
- /**
3007
- * ### Toggle
3008
- *
3009
- * > Toggles a switch on/off.
3010
- */
3011
- toggle(service_data: {
3012
- /**
3013
- * Assisted definition
3014
- * > ```yaml
3015
- * > entity:
3016
- * > - domain:
3017
- * > - switch
3018
- * > ```
3019
- */
3020
- entity_id: PICK_ENTITY<"switch"> | PICK_ENTITY<"switch">[];
3021
- }): Promise<void>;
3022
- /**
3023
- * ### Turn off
3024
- *
3025
- * > Turns a switch off.
3026
- */
3027
- turn_off(service_data: {
3028
- /**
3029
- * Assisted definition
3030
- * > ```yaml
3031
- * > entity:
3032
- * > - domain:
3033
- * > - switch
3034
- * > ```
3035
- */
3036
- entity_id: PICK_ENTITY<"switch"> | PICK_ENTITY<"switch">[];
3037
- }): Promise<void>;
3038
- /**
3039
- * ### Turn on
3040
- *
3041
- * > Turns a switch on.
3042
- */
3043
- turn_on(service_data: {
3044
- /**
3045
- * Assisted definition
3046
- * > ```yaml
3047
- * > entity:
3048
- * > - domain:
3049
- * > - switch
3050
- * > ```
3051
- */
3052
- entity_id: PICK_ENTITY<"switch"> | PICK_ENTITY<"switch">[];
3053
- }): Promise<void>;
3054
- };
3055
- synapse: {
3056
- /**
3057
- * ### reload
3058
- *
3059
- * > Ask synapse application to re-send the entity list. Sent to all connected by default
3060
- */
3061
- reload(service_data?: {
3062
- /**
3063
- * ## app
3064
- *
3065
- * > The name of the app to target for the reload. If omitted, targets all apps.
3066
- *
3067
- * ### Example
3068
- *
3069
- * > ```json
3070
- * > {
3071
- * > "app": "home_automation"
3072
- * > }
3073
- * > ```
3074
- *
3075
- * ## Selector
3076
- *
3077
- * > ```yaml
3078
- * >
3079
- * > ```
3080
- */
3081
- app?: unknown;
3082
- }): Promise<void>;
3083
- };
3084
- system_log: {
3085
- /**
3086
- * ### Clear all
3087
- *
3088
- * > Clears all log entries.
3089
- */
3090
- clear(service_data: {}): Promise<void>;
3091
- /**
3092
- * ### Write
3093
- *
3094
- * > Write log entry.
3095
- */
3096
- write(service_data?: {
3097
- /**
3098
- * ## Level
3099
- *
3100
- * > Log level.
3101
- *
3102
- * ### Default
3103
- *
3104
- * > ```json
3105
- * > "error"
3106
- * > ```
3107
- */
3108
- level?: "debug" | "info" | "warning" | "error" | "critical";
3109
- /**
3110
- * ## Logger
3111
- *
3112
- * > Logger name under which to log the message. Defaults to `system_log.external`.
3113
- *
3114
- * ### Example
3115
- *
3116
- * > ```json
3117
- * > {
3118
- * > "logger": "mycomponent.myplatform"
3119
- * > }
3120
- * > ```
3121
- */
3122
- logger?: string;
3123
- /**
3124
- * ## Message
3125
- *
3126
- * > Message to log.
3127
- *
3128
- * ### Example
3129
- *
3130
- * > ```json
3131
- * > {
3132
- * > "message": "Something went wrong"
3133
- * > }
3134
- * > ```
3135
- */
3136
- message: string;
3137
- }): Promise<void>;
3138
- };
3139
- timer: {
3140
- /**
3141
- * ### Cancel
3142
- *
3143
- * > Cancels a timer.
3144
- */
3145
- cancel(service_data: {
3146
- /**
3147
- * Assisted definition
3148
- * > ```yaml
3149
- * > entity:
3150
- * > - domain:
3151
- * > - timer
3152
- * > ```
3153
- */
3154
- entity_id: PICK_ENTITY<"timer"> | PICK_ENTITY<"timer">[];
3155
- }): Promise<void>;
3156
- /**
3157
- * ### Change
3158
- *
3159
- * > Changes a timer.
3160
- */
3161
- change(service_data: {
3162
- /**
3163
- * ## Duration
3164
- *
3165
- * > Duration to add or subtract to the running timer.
3166
- *
3167
- * ### Example
3168
- *
3169
- * > ```json
3170
- * > {
3171
- * > "duration": "00:01:00, 60 or -60"
3172
- * > }
3173
- * > ```
3174
- *
3175
- * ### Default
3176
- *
3177
- * > ```json
3178
- * > 0
3179
- * > ```
3180
- */
3181
- duration: string;
3182
- /**
3183
- * Assisted definition
3184
- * > ```yaml
3185
- * > entity:
3186
- * > - domain:
3187
- * > - timer
3188
- * > ```
3189
- */
3190
- entity_id: PICK_ENTITY<"timer"> | PICK_ENTITY<"timer">[];
3191
- }): Promise<void>;
3192
- /**
3193
- * ### Finish
3194
- *
3195
- * > Finishes a timer.
3196
- */
3197
- finish(service_data: {
3198
- /**
3199
- * Assisted definition
3200
- * > ```yaml
3201
- * > entity:
3202
- * > - domain:
3203
- * > - timer
3204
- * > ```
3205
- */
3206
- entity_id: PICK_ENTITY<"timer"> | PICK_ENTITY<"timer">[];
3207
- }): Promise<void>;
3208
- /**
3209
- * ### Pause
3210
- *
3211
- * > Pauses a timer.
3212
- */
3213
- pause(service_data: {
3214
- /**
3215
- * Assisted definition
3216
- * > ```yaml
3217
- * > entity:
3218
- * > - domain:
3219
- * > - timer
3220
- * > ```
3221
- */
3222
- entity_id: PICK_ENTITY<"timer"> | PICK_ENTITY<"timer">[];
3223
- }): Promise<void>;
3224
- /**
3225
- * ### Reload
3226
- *
3227
- * > Reloads timers from the YAML-configuration.
3228
- */
3229
- reload(service_data: {}): Promise<void>;
3230
- /**
3231
- * ### Start
3232
- *
3233
- * > Starts a timer.
3234
- */
3235
- start(service_data?: {
3236
- /**
3237
- * ## Duration
3238
- *
3239
- * > Duration the timer requires to finish. [optional].
3240
- *
3241
- * ### Example
3242
- *
3243
- * > ```json
3244
- * > {
3245
- * > "duration": "00:01:00 or 60"
3246
- * > }
3247
- * > ```
3248
- */
3249
- duration?: string;
3250
- /**
3251
- * Assisted definition
3252
- * > ```yaml
3253
- * > entity:
3254
- * > - domain:
3255
- * > - timer
3256
- * > ```
3257
- */
3258
- entity_id: PICK_ENTITY<"timer"> | PICK_ENTITY<"timer">[];
3259
- }): Promise<void>;
3260
- };
3261
- todo: {
3262
- /**
3263
- * ### Add to-do list item
3264
- *
3265
- * > Add a new to-do list item.
3266
- */
3267
- add_item(service_data?: {
3268
- /**
3269
- * ## Description
3270
- *
3271
- * > A more complete description of the to-do item than provided by the item name.
3272
- *
3273
- * ### Example
3274
- *
3275
- * > ```json
3276
- * > {
3277
- * > "description": "A more complete description of the to-do item than that provided by the summary."
3278
- * > }
3279
- * > ```
3280
- */
3281
- description?: string;
3282
- /**
3283
- * ## Due date
3284
- *
3285
- * > The date the to-do item is expected to be completed.
3286
- *
3287
- * ### Example
3288
- *
3289
- * > ```json
3290
- * > {
3291
- * > "due_date": "2023-11-17"
3292
- * > }
3293
- * > ```
3294
- *
3295
- * ## Selector
3296
- *
3297
- * > ```yaml
3298
- * > date: null
3299
- * > ```
3300
- */
3301
- due_date?: unknown;
3302
- /**
3303
- * ## Due date and time
3304
- *
3305
- * > The date and time the to-do item is expected to be completed.
3306
- *
3307
- * ### Example
3308
- *
3309
- * > ```json
3310
- * > {
3311
- * > "due_datetime": "2023-11-17 13:30:00"
3312
- * > }
3313
- * > ```
3314
- *
3315
- * ## Selector
3316
- *
3317
- * > ```yaml
3318
- * > datetime: null
3319
- * > ```
3320
- */
3321
- due_datetime?: unknown;
3322
- /**
3323
- * ## Item name
3324
- *
3325
- * > The name that represents the to-do item.
3326
- *
3327
- * ### Example
3328
- *
3329
- * > ```json
3330
- * > {
3331
- * > "item": "Submit income tax return"
3332
- * > }
3333
- * > ```
3334
- */
3335
- item: string;
3336
- /**
3337
- * Assisted definition
3338
- * > ```yaml
3339
- * > entity:
3340
- * > - domain:
3341
- * > - todo
3342
- * > supported_features:
3343
- * > - 1
3344
- * > ```
3345
- */
3346
- entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
3347
- }): Promise<void>;
3348
- /**
3349
- * ### Get to-do list items
3350
- *
3351
- * > Get items on a to-do list.
3352
- */
3353
- get_items(service_data?: {
3354
- /**
3355
- * ## Status
3356
- *
3357
- * > Only return to-do items with the specified statuses. Returns not completed actions by default.
3358
- *
3359
- * ### Example
3360
- *
3361
- * > ```json
3362
- * > {
3363
- * > "status": "needs_action"
3364
- * > }
3365
- * > ```
3366
- *
3367
- * ### Default
3368
- *
3369
- * > ```json
3370
- * > "needs_action"
3371
- * > ```
3372
- */
3373
- status?: "needs_action" | "completed";
3374
- /**
3375
- * Assisted definition
3376
- * > ```yaml
3377
- * > entity:
3378
- * > - domain:
3379
- * > - todo
3380
- * > ```
3381
- */
3382
- entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
3383
- }): Promise<void>;
3384
- /**
3385
- * ### Remove all completed to-do list items
3386
- *
3387
- * > Remove all to-do list items that have been completed.
3388
- */
3389
- remove_completed_items(service_data: {
3390
- /**
3391
- * Assisted definition
3392
- * > ```yaml
3393
- * > entity:
3394
- * > - domain:
3395
- * > - todo
3396
- * > supported_features:
3397
- * > - 2
3398
- * > ```
3399
- */
3400
- entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
3401
- }): Promise<void>;
3402
- /**
3403
- * ### Remove a to-do list item
3404
- *
3405
- * > Remove an existing to-do list item by its name.
3406
- */
3407
- remove_item(service_data: {
3408
- /**
3409
- * ## Item name
3410
- *
3411
- * > The name for the to-do list items.
3412
- */
3413
- item: string;
3414
- /**
3415
- * Assisted definition
3416
- * > ```yaml
3417
- * > entity:
3418
- * > - domain:
3419
- * > - todo
3420
- * > supported_features:
3421
- * > - 2
3422
- * > ```
3423
- */
3424
- entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
3425
- }): Promise<void>;
3426
- /**
3427
- * ### Update to-do list item
3428
- *
3429
- * > Update an existing to-do list item based on its name.
3430
- */
3431
- update_item(service_data?: {
3432
- /**
3433
- * ## Description
3434
- *
3435
- * > A more complete description of the to-do item than provided by the item name.
3436
- *
3437
- * ### Example
3438
- *
3439
- * > ```json
3440
- * > {
3441
- * > "description": "A more complete description of the to-do item than that provided by the summary."
3442
- * > }
3443
- * > ```
3444
- */
3445
- description?: string;
3446
- /**
3447
- * ## Due date
3448
- *
3449
- * > The date the to-do item is expected to be completed.
3450
- *
3451
- * ### Example
3452
- *
3453
- * > ```json
3454
- * > {
3455
- * > "due_date": "2023-11-17"
3456
- * > }
3457
- * > ```
3458
- *
3459
- * ## Selector
3460
- *
3461
- * > ```yaml
3462
- * > date: null
3463
- * > ```
3464
- */
3465
- due_date?: unknown;
3466
- /**
3467
- * ## Due date and time
3468
- *
3469
- * > The date and time the to-do item is expected to be completed.
3470
- *
3471
- * ### Example
3472
- *
3473
- * > ```json
3474
- * > {
3475
- * > "due_datetime": "2023-11-17 13:30:00"
3476
- * > }
3477
- * > ```
3478
- *
3479
- * ## Selector
3480
- *
3481
- * > ```yaml
3482
- * > datetime: null
3483
- * > ```
3484
- */
3485
- due_datetime?: unknown;
3486
- /**
3487
- * ## Item name
3488
- *
3489
- * > The name for the to-do list item.
3490
- *
3491
- * ### Example
3492
- *
3493
- * > ```json
3494
- * > {
3495
- * > "item": "Submit income tax return"
3496
- * > }
3497
- * > ```
3498
- */
3499
- item: string;
3500
- /**
3501
- * ## Rename item
3502
- *
3503
- * > The new name of the to-do item
3504
- *
3505
- * ### Example
3506
- *
3507
- * > ```json
3508
- * > {
3509
- * > "rename": "Something else"
3510
- * > }
3511
- * > ```
3512
- */
3513
- rename?: string;
3514
- /**
3515
- * ## Set status
3516
- *
3517
- * > A status or confirmation of the to-do item.
3518
- *
3519
- * ### Example
3520
- *
3521
- * > ```json
3522
- * > {
3523
- * > "status": "needs_action"
3524
- * > }
3525
- * > ```
3526
- */
3527
- status?: "needs_action" | "completed";
3528
- /**
3529
- * Assisted definition
3530
- * > ```yaml
3531
- * > entity:
3532
- * > - domain:
3533
- * > - todo
3534
- * > supported_features:
3535
- * > - 4
3536
- * > ```
3537
- */
3538
- entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
3539
- }): Promise<void>;
3540
- };
3541
- tts: {
3542
- /**
3543
- * ### Clear TTS cache
3544
- *
3545
- * > Removes all cached text-to-speech files and purges the memory.
3546
- */
3547
- clear_cache(service_data: {}): Promise<void>;
3548
- /**
3549
- * ### Say a TTS message with cloud
3550
- *
3551
- * > Say something using text-to-speech on a media player with cloud.
3552
- */
3553
- cloud_say(service_data?: {
3554
- /**
3555
- * ## cache
3556
- *
3557
- * ### Default
3558
- *
3559
- * > ```json
3560
- * > false
3561
- * > ```
3562
- */
3563
- cache?: boolean;
3564
- /**
3565
- * ## entity_id
3566
- */
3567
- entity_id: PICK_ENTITY<"media_player"> | PICK_ENTITY<"media_player">[];
3568
- /**
3569
- * ## language
3570
- *
3571
- * ### Example
3572
- *
3573
- * > ```json
3574
- * > {
3575
- * > "language": "ru"
3576
- * > }
3577
- * > ```
3578
- */
3579
- language?: string;
3580
- /**
3581
- * ## message
3582
- *
3583
- * ### Example
3584
- *
3585
- * > ```json
3586
- * > {
3587
- * > "message": "My name is hanna"
3588
- * > }
3589
- * > ```
3590
- */
3591
- message: string;
3592
- /**
3593
- * ## options
3594
- *
3595
- * ### Example
3596
- *
3597
- * > ```json
3598
- * > {
3599
- * > "options": "platform specific"
3600
- * > }
3601
- * > ```
3602
- *
3603
- * ## Selector
3604
- *
3605
- * > ```yaml
3606
- * > object: null
3607
- * > ```
3608
- */
3609
- options?: unknown;
3610
- }): Promise<void>;
3611
- /**
3612
- * ### Speak
3613
- *
3614
- * > Speaks something using text-to-speech on a media player.
3615
- */
3616
- speak(service_data?: {
3617
- /**
3618
- * ## Cache
3619
- *
3620
- * > Stores this message locally so that when the text is requested again, the output can be produced more quickly.
3621
- *
3622
- * ### Default
3623
- *
3624
- * > ```json
3625
- * > true
3626
- * > ```
3627
- */
3628
- cache?: boolean;
3629
- /**
3630
- * ## Language
3631
- *
3632
- * > Language to use for speech generation.
3633
- *
3634
- * ### Example
3635
- *
3636
- * > ```json
3637
- * > {
3638
- * > "language": "ru"
3639
- * > }
3640
- * > ```
3641
- */
3642
- language?: string;
3643
- /**
3644
- * ## Media player entity
3645
- *
3646
- * > Media players to play the message.
3647
- */
3648
- media_player_entity_id: PICK_ENTITY<"media_player"> | PICK_ENTITY<"media_player">[];
3649
- /**
3650
- * ## Message
3651
- *
3652
- * > The text you want to convert into speech so that you can listen to it on your device.
3653
- *
3654
- * ### Example
3655
- *
3656
- * > ```json
3657
- * > {
3658
- * > "message": "My name is hanna"
3659
- * > }
3660
- * > ```
3661
- */
3662
- message: string;
3663
- /**
3664
- * ## Options
3665
- *
3666
- * > A dictionary containing integration-specific options.
3667
- *
3668
- * ### Example
3669
- *
3670
- * > ```json
3671
- * > {
3672
- * > "options": "platform specific"
3673
- * > }
3674
- * > ```
3675
- *
3676
- * ## Selector
3677
- *
3678
- * > ```yaml
3679
- * > object: null
3680
- * > ```
3681
- */
3682
- options?: unknown;
3683
- } & RequireAtLeastOne<{
3684
- /**
3685
- * Assisted definition
3686
- * > ```yaml
3687
- * > entity:
3688
- * > - domain:
3689
- * > - tts
3690
- * > ```
3691
- */
3692
- entity_id: PICK_ENTITY<"tts"> | PICK_ENTITY<"tts">[];
3693
- }>): Promise<void>;
3694
- };
3695
- zone: {
3696
- /**
3697
- * ### Reload
3698
- *
3699
- * > Reloads zones from the YAML-configuration.
3700
- */
3701
- reload(service_data: {}): Promise<void>;
3702
- };
3703
- };
3704
- export type REGISTRY_SETUP = {
3705
- area: {
3706
- _test: "switch.living_room_mood_lights";
3707
- _living_room: "switch.living_room_mood_lights";
3708
- _kitchen: "switch.kitchen_cabinets";
3709
- _bedroom: "switch.bedroom_lamp" | "light.bedroom_ceiling_fan";
3710
- };
3711
- platform: {
3712
- _sun: "sensor.sun_next_dawn" | "sensor.sun_next_dusk" | "sensor.sun_next_midnight" | "sensor.sun_next_noon" | "sensor.sun_next_rising" | "sensor.sun_next_setting" | "sensor.sun_solar_elevation" | "sensor.sun_solar_azimuth" | "sensor.sun_solar_rising";
3713
- _person: "person.digital_alchemy";
3714
- _shopping_list: "todo.shopping_list";
3715
- _google_translate: "tts.google_en_com";
3716
- _synapse: "binary_sensor.hass_e2e_online" | "sensor.magic" | "button.example" | "binary_sensor.toggles" | "switch.bedroom_lamp" | "switch.kitchen_cabinets" | "switch.living_room_mood_lights" | "switch.porch_light";
3717
- _holiday: "calendar.united_states_tx";
3718
- };
3719
- label: {
3720
- _synapse: "binary_sensor.hass_e2e_online" | "sensor.magic" | "binary_sensor.toggles" | "switch.bedroom_lamp" | "switch.kitchen_cabinets" | "switch.living_room_mood_lights" | "switch.porch_light";
3721
- _test: never;
3722
- };
3723
- floor: {
3724
- _downstairs: "switch.kitchen_cabinets" | "switch.living_room_mood_lights";
3725
- _upstairs: "switch.bedroom_lamp";
3726
- };
3727
- device: {
3728
- _308e39cf50a9fc6c30b4110724ed1f2e: "sensor.sun_next_dawn" | "sensor.sun_next_dusk" | "sensor.sun_next_midnight" | "sensor.sun_next_noon" | "sensor.sun_next_rising" | "sensor.sun_next_setting" | "button.example" | "sensor.sun_solar_elevation" | "sensor.sun_solar_azimuth" | "sensor.sun_solar_rising";
3729
- _e58841e47cf86097b310316e55d6bb12: "calendar.united_states_tx";
3730
- };
3731
- };
3732
- export type TAreaId = "living_room" | "kitchen" | "bedroom" | "test";
3733
- export type TDeviceId = "308e39cf50a9fc6c30b4110724ed1f2e" | "e58841e47cf86097b310316e55d6bb12";
3734
- export type TFloorId = "downstairs" | "upstairs";
3735
- export type TLabelId = "synapse" | "test";
3736
- export type TZoneId = string;
3737
- export type TRawEntityIds = "person.digital_alchemy" | "zone.home" | "sun.sun" | "sensor.sun_next_dawn" | "sensor.sun_next_dusk" | "button.example" | "sensor.sun_next_midnight" | "sensor.sun_next_noon" | "light.bedroom_ceiling_fan" | "scene.games_room_auto" | "sensor.sun_next_rising" | "sensor.sun_next_setting" | "todo.shopping_list" | "tts.google_en_com" | "binary_sensor.hass_e2e_online" | "sensor.magic" | "binary_sensor.toggles" | "switch.bedroom_lamp" | "switch.kitchen_cabinets" | "switch.living_room_mood_lights" | "switch.porch_light" | "calendar.united_states_tx";
3738
- export type TPlatformId = "sun" | "person" | "shopping_list" | "google_translate" | "synapse" | "holiday";
3739
- export type TRawDomains = "person" | "zone" | "sun" | "light" | "scene" | "button" | "sensor" | "todo" | "tts" | "binary_sensor" | "switch" | "calendar";
3740
- export type TUniqueIDMapping = {
3741
- "5622d76001a335e3ea893c4d60d31b3d-next_dawn": "sensor.sun_next_dawn";
3742
- "5622d76001a335e3ea893c4d60d31b3d-next_dusk": "sensor.sun_next_dusk";
3743
- "5622d76001a335e3ea893c4d60d31b3d-next_midnight": "sensor.sun_next_midnight";
3744
- "5622d76001a335e3ea893c4d60d31b3d-next_noon": "sensor.sun_next_noon";
3745
- "5622d76001a335e3ea893c4d60d31b3d-next_rising": "sensor.sun_next_rising";
3746
- "5622d76001a335e3ea893c4d60d31b3d-next_setting": "sensor.sun_next_setting";
3747
- "5622d76001a335e3ea893c4d60d31b3d-solar_elevation": "sensor.sun_solar_elevation";
3748
- "6d8acf36200c5ff8d2d9bb1b1f1dbe00c7eb5b7540103fd90c9a035f82967431": "button.start_white_noise";
3749
- "5622d76001a335e3ea893c4d60d31b3d-solar_azimuth": "sensor.sun_solar_azimuth";
3750
- "5622d76001a335e3ea893c4d60d31b3d-solar_rising": "sensor.sun_solar_rising";
3751
- digital_alchemy: "person.digital_alchemy";
3752
- "6acd101923c0460fc31bad82c4efa140": "todo.shopping_list";
3753
- "4a7fc2592d3a98e0eed8cbc73e839c1c": "tts.google_en_com";
3754
- hass_e2e_is_online: "binary_sensor.hass_e2e_online";
3755
- e1806fdc93296bbd5ab42967003cd38729ff9ba6cfeefc3e15a03ad01ac894fe: "sensor.magic";
3756
- a6e8373221727e197144ba689d7606d4be6f609f2fd0fd8e17516548780465ab: "binary_sensor.toggles";
3757
- "413eb6d69bbec134a07a6d32effd3c3763955e611f43256600cca40725276816": "switch.bedroom_lamp";
3758
- "06d5a22e681ee9c668f8563bd3108853fb053c43342131782afe989090c4ced9": "switch.kitchen_cabinets";
3759
- "27b4fc99f35bbdd1a07173caff5b52f86e3bc342db96f48427e47980b0fb6b49": "switch.living_room_mood_lights";
3760
- "8eb8c1f8c760e97cfa49a0a29cd6891313a1e9a45dd046a556a9f317778cf50a": "switch.porch_light";
3761
- "05ecbbc6111791b6baacbbb60397db14": "calendar.united_states_tx";
3762
- };
3763
- export type TUniqueId = "5622d76001a335e3ea893c4d60d31b3d-next_dawn" | "5622d76001a335e3ea893c4d60d31b3d-next_dusk" | "5622d76001a335e3ea893c4d60d31b3d-next_midnight" | "5622d76001a335e3ea893c4d60d31b3d-next_noon" | "5622d76001a335e3ea893c4d60d31b3d-next_rising" | "5622d76001a335e3ea893c4d60d31b3d-next_setting" | "5622d76001a335e3ea893c4d60d31b3d-solar_elevation" | "5622d76001a335e3ea893c4d60d31b3d-solar_azimuth" | "5622d76001a335e3ea893c4d60d31b3d-solar_rising" | "digital_alchemy" | "6acd101923c0460fc31bad82c4efa140" | "4a7fc2592d3a98e0eed8cbc73e839c1c" | "hass_e2e_is_online" | "e1806fdc93296bbd5ab42967003cd38729ff9ba6cfeefc3e15a03ad01ac894fe" | "a6e8373221727e197144ba689d7606d4be6f609f2fd0fd8e17516548780465ab" | "413eb6d69bbec134a07a6d32effd3c3763955e611f43256600cca40725276816" | "06d5a22e681ee9c668f8563bd3108853fb053c43342131782afe989090c4ced9" | "27b4fc99f35bbdd1a07173caff5b52f86e3bc342db96f48427e47980b0fb6b49" | "8eb8c1f8c760e97cfa49a0a29cd6891313a1e9a45dd046a556a9f317778cf50a" | "05ecbbc6111791b6baacbbb60397db14";
3764
- export {};