@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
@@ -0,0 +1,2759 @@
1
+ /* eslint-disable sonarjs/class-name */
2
+ /* eslint-disable @typescript-eslint/no-empty-object-type */
3
+ /* eslint-disable @cspell/spellchecker */
4
+
5
+ import {
6
+ AndroidNotificationData,
7
+ AppleNotificationData,
8
+ NotificationData,
9
+ } from "../helpers/index.mts";
10
+
11
+ declare module "../user.mts" {
12
+ export interface iCallService {
13
+ // # MARK: automation
14
+ automation: {
15
+ /**
16
+ * ### Reload
17
+ *
18
+ * > Reloads the automation configuration.
19
+ */
20
+ reload(service_data: {}): Promise<void>;
21
+ /**
22
+ * ### Toggle
23
+ *
24
+ * > Toggles (enable / disable) an automation.
25
+ */
26
+ toggle(service_data: {
27
+ /**
28
+ * Assisted definition
29
+ * > ```yaml
30
+ * > entity:
31
+ * > - domain:
32
+ * > - automation
33
+ * > ```
34
+ */
35
+ entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
36
+ }): Promise<void>;
37
+ /**
38
+ * ### Trigger
39
+ *
40
+ * > Triggers the actions of an automation.
41
+ */
42
+ trigger(service_data?: {
43
+ /**
44
+ * ## Skip conditions
45
+ *
46
+ * > Defines whether or not the conditions will be skipped.
47
+ *
48
+ * ### Default
49
+ *
50
+ * > ```json
51
+ * > true
52
+ * > ```
53
+ */
54
+ skip_condition?: boolean;
55
+ /**
56
+ * Assisted definition
57
+ * > ```yaml
58
+ * > entity:
59
+ * > - domain:
60
+ * > - automation
61
+ * > ```
62
+ */
63
+ entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
64
+ }): Promise<void>;
65
+ /**
66
+ * ### Turn off
67
+ *
68
+ * > Disables an automation.
69
+ */
70
+ turn_off(service_data?: {
71
+ /**
72
+ * ## Stop actions
73
+ *
74
+ * > Stops currently running actions.
75
+ *
76
+ * ### Default
77
+ *
78
+ * > ```json
79
+ * > true
80
+ * > ```
81
+ */
82
+ stop_actions?: boolean;
83
+ /**
84
+ * Assisted definition
85
+ * > ```yaml
86
+ * > entity:
87
+ * > - domain:
88
+ * > - automation
89
+ * > ```
90
+ */
91
+ entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
92
+ }): Promise<void>;
93
+ /**
94
+ * ### Turn on
95
+ *
96
+ * > Enables an automation.
97
+ */
98
+ turn_on(service_data: {
99
+ /**
100
+ * Assisted definition
101
+ * > ```yaml
102
+ * > entity:
103
+ * > - domain:
104
+ * > - automation
105
+ * > ```
106
+ */
107
+ entity_id: PICK_ENTITY<"automation"> | PICK_ENTITY<"automation">[];
108
+ }): Promise<void>;
109
+ };
110
+ // # MARK: backup
111
+ backup: {
112
+ /**
113
+ * ### Create backup
114
+ *
115
+ * > Creates a new backup.
116
+ */
117
+ create(service_data: {}): Promise<void>;
118
+ };
119
+ // # MARK: button
120
+ button: {
121
+ /**
122
+ * ### Press
123
+ *
124
+ * > Press the button entity.
125
+ */
126
+ press(service_data: {
127
+ /**
128
+ * Assisted definition
129
+ * > ```yaml
130
+ * > entity:
131
+ * > - domain:
132
+ * > - button
133
+ * > ```
134
+ */
135
+ entity_id: PICK_ENTITY<"button"> | PICK_ENTITY<"button">[];
136
+ }): Promise<void>;
137
+ };
138
+ // # MARK: calendar
139
+ calendar: {
140
+ /**
141
+ * ### Create event
142
+ *
143
+ * > Adds a new calendar event.
144
+ */
145
+ create_event(service_data?: {
146
+ /**
147
+ * ## Description
148
+ *
149
+ * > A more complete description of the event than the one provided by the summary.
150
+ *
151
+ * ### Example
152
+ *
153
+ * > ```json
154
+ * > {
155
+ * > "description": "Meeting to provide technical review for 'Phoenix' design."
156
+ * > }
157
+ * > ```
158
+ */
159
+ description?: string;
160
+ /**
161
+ * ## End date
162
+ *
163
+ * > The date the all-day event should end (exclusive).
164
+ *
165
+ * ### Example
166
+ *
167
+ * > ```json
168
+ * > {
169
+ * > "end_date": "2022-03-23"
170
+ * > }
171
+ * > ```
172
+ *
173
+ * ## Selector
174
+ *
175
+ * > ```yaml
176
+ * > date: null
177
+ * > ```
178
+ */
179
+ end_date?: unknown;
180
+ /**
181
+ * ## End time
182
+ *
183
+ * > The date and time the event should end.
184
+ *
185
+ * ### Example
186
+ *
187
+ * > ```json
188
+ * > {
189
+ * > "end_date_time": "2022-03-22 22:00:00"
190
+ * > }
191
+ * > ```
192
+ *
193
+ * ## Selector
194
+ *
195
+ * > ```yaml
196
+ * > datetime: null
197
+ * > ```
198
+ */
199
+ end_date_time?: unknown;
200
+ /**
201
+ * ## In
202
+ *
203
+ * > Days or weeks that you want to create the event in.
204
+ *
205
+ * ### Example
206
+ *
207
+ * > ```json
208
+ * > {
209
+ * > "in": "{\"days\": 2} or {\"weeks\": 2}"
210
+ * > }
211
+ * > ```
212
+ *
213
+ * ## Selector
214
+ *
215
+ * > ```yaml
216
+ * >
217
+ * > ```
218
+ */
219
+ in?: unknown;
220
+ /**
221
+ * ## Location
222
+ *
223
+ * > The location of the event.
224
+ *
225
+ * ### Example
226
+ *
227
+ * > ```json
228
+ * > {
229
+ * > "location": "Conference Room - F123, Bldg. 002"
230
+ * > }
231
+ * > ```
232
+ */
233
+ location?: string;
234
+ /**
235
+ * ## Start date
236
+ *
237
+ * > The date the all-day event should start.
238
+ *
239
+ * ### Example
240
+ *
241
+ * > ```json
242
+ * > {
243
+ * > "start_date": "2022-03-22"
244
+ * > }
245
+ * > ```
246
+ *
247
+ * ## Selector
248
+ *
249
+ * > ```yaml
250
+ * > date: null
251
+ * > ```
252
+ */
253
+ start_date?: unknown;
254
+ /**
255
+ * ## Start time
256
+ *
257
+ * > The date and time the event should start.
258
+ *
259
+ * ### Example
260
+ *
261
+ * > ```json
262
+ * > {
263
+ * > "start_date_time": "2022-03-22 20:00:00"
264
+ * > }
265
+ * > ```
266
+ *
267
+ * ## Selector
268
+ *
269
+ * > ```yaml
270
+ * > datetime: null
271
+ * > ```
272
+ */
273
+ start_date_time?: unknown;
274
+ /**
275
+ * ## Summary
276
+ *
277
+ * > Defines the short summary or subject for the event.
278
+ *
279
+ * ### Example
280
+ *
281
+ * > ```json
282
+ * > {
283
+ * > "summary": "Department Party"
284
+ * > }
285
+ * > ```
286
+ */
287
+ summary: string;
288
+ /**
289
+ * Assisted definition
290
+ * > ```yaml
291
+ * > entity:
292
+ * > - domain:
293
+ * > - calendar
294
+ * > supported_features:
295
+ * > - 1
296
+ * > ```
297
+ */
298
+ entity_id: PICK_ENTITY<"calendar"> | PICK_ENTITY<"calendar">[];
299
+ }): Promise<void>;
300
+ /**
301
+ * ### Get events
302
+ *
303
+ * > Get events on a calendar within a time range.
304
+ */
305
+ get_events(service_data?: {
306
+ /**
307
+ * ## Duration
308
+ *
309
+ * > Returns active events from start_date_time until the specified duration.
310
+ *
311
+ * ## Selector
312
+ *
313
+ * > ```yaml
314
+ * > duration: null
315
+ * > ```
316
+ */
317
+ duration?: unknown;
318
+ /**
319
+ * ## End time
320
+ *
321
+ * > Returns active events before this time (exclusive). Cannot be used with 'duration'.
322
+ *
323
+ * ### Example
324
+ *
325
+ * > ```json
326
+ * > {
327
+ * > "end_date_time": "2022-03-22 22:00:00"
328
+ * > }
329
+ * > ```
330
+ *
331
+ * ## Selector
332
+ *
333
+ * > ```yaml
334
+ * > datetime: null
335
+ * > ```
336
+ */
337
+ end_date_time?: unknown;
338
+ /**
339
+ * ## Start time
340
+ *
341
+ * > Returns active events after this time (exclusive). When not set, defaults to now.
342
+ *
343
+ * ### Example
344
+ *
345
+ * > ```json
346
+ * > {
347
+ * > "start_date_time": "2022-03-22 20:00:00"
348
+ * > }
349
+ * > ```
350
+ *
351
+ * ## Selector
352
+ *
353
+ * > ```yaml
354
+ * > datetime: null
355
+ * > ```
356
+ */
357
+ start_date_time?: unknown;
358
+ /**
359
+ * Assisted definition
360
+ * > ```yaml
361
+ * > entity:
362
+ * > - domain:
363
+ * > - calendar
364
+ * > ```
365
+ */
366
+ entity_id: PICK_ENTITY<"calendar"> | PICK_ENTITY<"calendar">[];
367
+ }): Promise<void>;
368
+ /**
369
+ * ### List event
370
+ *
371
+ * > Lists events on a calendar within a time range.
372
+ */
373
+ list_events(service_data?: {
374
+ /**
375
+ * ## Duration
376
+ *
377
+ * > Returns active events from start_date_time until the specified duration.
378
+ *
379
+ * ## Selector
380
+ *
381
+ * > ```yaml
382
+ * > duration: null
383
+ * > ```
384
+ */
385
+ duration?: unknown;
386
+ /**
387
+ * ## End time
388
+ *
389
+ * > Returns active events before this time (exclusive). Cannot be used with 'duration'.
390
+ *
391
+ * ### Example
392
+ *
393
+ * > ```json
394
+ * > {
395
+ * > "end_date_time": "2022-03-22 22:00:00"
396
+ * > }
397
+ * > ```
398
+ *
399
+ * ## Selector
400
+ *
401
+ * > ```yaml
402
+ * > datetime: null
403
+ * > ```
404
+ */
405
+ end_date_time?: unknown;
406
+ /**
407
+ * ## Start time
408
+ *
409
+ * > Returns active events after this time (exclusive). When not set, defaults to now.
410
+ *
411
+ * ### Example
412
+ *
413
+ * > ```json
414
+ * > {
415
+ * > "start_date_time": "2022-03-22 20:00:00"
416
+ * > }
417
+ * > ```
418
+ *
419
+ * ## Selector
420
+ *
421
+ * > ```yaml
422
+ * > datetime: null
423
+ * > ```
424
+ */
425
+ start_date_time?: unknown;
426
+ /**
427
+ * Assisted definition
428
+ * > ```yaml
429
+ * > entity:
430
+ * > - domain:
431
+ * > - calendar
432
+ * > ```
433
+ */
434
+ entity_id: PICK_ENTITY<"calendar"> | PICK_ENTITY<"calendar">[];
435
+ }): Promise<void>;
436
+ };
437
+ // # MARK: cloud
438
+ cloud: {
439
+ /**
440
+ * ### Remote connect
441
+ *
442
+ * > Makes the instance UI accessible from outside of the local network by using Home Assistant Cloud.
443
+ */
444
+ remote_connect(service_data: {}): Promise<void>;
445
+ /**
446
+ * ### Remote disconnect
447
+ *
448
+ * > 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.
449
+ */
450
+ remote_disconnect(service_data: {}): Promise<void>;
451
+ };
452
+ // # MARK: conversation
453
+ conversation: {
454
+ /**
455
+ * ### Process
456
+ *
457
+ * > Launches a conversation from a transcribed text.
458
+ */
459
+ process(service_data?: {
460
+ /**
461
+ * ## Agent
462
+ *
463
+ * > Conversation agent to process your request. The conversation agent is the brains of your assistant. It processes the incoming text commands.
464
+ *
465
+ * ### Example
466
+ *
467
+ * > ```json
468
+ * > {
469
+ * > "agent_id": "homeassistant"
470
+ * > }
471
+ * > ```
472
+ *
473
+ * ## Selector
474
+ *
475
+ * > ```yaml
476
+ * > conversation_agent: null
477
+ * > ```
478
+ */
479
+ agent_id?: unknown;
480
+ /**
481
+ * ## Conversation ID
482
+ *
483
+ * > ID of the conversation, to be able to continue a previous conversation
484
+ *
485
+ * ### Example
486
+ *
487
+ * > ```json
488
+ * > {
489
+ * > "conversation_id": "my_conversation_1"
490
+ * > }
491
+ * > ```
492
+ */
493
+ conversation_id?: string;
494
+ /**
495
+ * ## Language
496
+ *
497
+ * > Language of text. Defaults to server language.
498
+ *
499
+ * ### Example
500
+ *
501
+ * > ```json
502
+ * > {
503
+ * > "language": "NL"
504
+ * > }
505
+ * > ```
506
+ */
507
+ language?: string;
508
+ /**
509
+ * ## Text
510
+ *
511
+ * > Transcribed text input.
512
+ *
513
+ * ### Example
514
+ *
515
+ * > ```json
516
+ * > {
517
+ * > "text": "Turn all lights on"
518
+ * > }
519
+ * > ```
520
+ */
521
+ text: string;
522
+ }): Promise<void>;
523
+ /**
524
+ * ### Reload
525
+ *
526
+ * > Reloads the intent configuration.
527
+ */
528
+ reload(service_data?: {
529
+ /**
530
+ * ## Agent
531
+ *
532
+ * > Conversation agent to reload.
533
+ *
534
+ * ### Example
535
+ *
536
+ * > ```json
537
+ * > {
538
+ * > "agent_id": "homeassistant"
539
+ * > }
540
+ * > ```
541
+ *
542
+ * ## Selector
543
+ *
544
+ * > ```yaml
545
+ * > conversation_agent: null
546
+ * > ```
547
+ */
548
+ agent_id?: unknown;
549
+ /**
550
+ * ## Language
551
+ *
552
+ * > Language to clear cached intents for. Defaults to server language.
553
+ *
554
+ * ### Example
555
+ *
556
+ * > ```json
557
+ * > {
558
+ * > "language": "NL"
559
+ * > }
560
+ * > ```
561
+ */
562
+ language?: string;
563
+ }): Promise<void>;
564
+ };
565
+ // # MARK: frontend
566
+ frontend: {
567
+ /**
568
+ * ### Reload themes
569
+ *
570
+ * > Reloads themes from the YAML-configuration.
571
+ */
572
+ reload_themes(service_data: {}): Promise<void>;
573
+ /**
574
+ * ### Set the default theme
575
+ *
576
+ * > Sets the default theme Home Assistant uses. Can be overridden by a user.
577
+ */
578
+ set_theme(service_data?: {
579
+ /**
580
+ * ## Mode
581
+ *
582
+ * > Theme mode.
583
+ *
584
+ * ### Default
585
+ *
586
+ * > ```json
587
+ * > "light"
588
+ * > ```
589
+ */
590
+ mode?: "dark" | "light";
591
+ /**
592
+ * ## Theme
593
+ *
594
+ * > Name of a theme.
595
+ *
596
+ * ### Example
597
+ *
598
+ * > ```json
599
+ * > {
600
+ * > "name": "default"
601
+ * > }
602
+ * > ```
603
+ *
604
+ * ## Selector
605
+ *
606
+ * > ```yaml
607
+ * > theme:
608
+ * > include_default: true
609
+ * > ```
610
+ */
611
+ name: unknown;
612
+ }): Promise<void>;
613
+ };
614
+ // # MARK: homeassistant
615
+ homeassistant: {
616
+ /**
617
+ * ### Check configuration
618
+ *
619
+ * > Checks the Home Assistant YAML-configuration files for errors. Errors will be shown in the Home Assistant logs.
620
+ */
621
+ check_config(service_data: {}): Promise<void>;
622
+ /**
623
+ * ### Reload all
624
+ *
625
+ * > Reload all YAML configuration that can be reloaded without restarting Home Assistant.
626
+ */
627
+ reload_all(service_data: {}): Promise<void>;
628
+ /**
629
+ * ### Reload config entry
630
+ *
631
+ * > Reloads the specified config entry.
632
+ */
633
+ reload_config_entry(service_data?: {
634
+ /**
635
+ * ## Config entry ID
636
+ *
637
+ * > The configuration entry ID of the entry to be reloaded.
638
+ *
639
+ * ### Example
640
+ *
641
+ * > ```json
642
+ * > {
643
+ * > "entry_id": "8955375327824e14ba89e4b29cc3ec9a"
644
+ * > }
645
+ * > ```
646
+ */
647
+ entry_id?: string;
648
+ /**
649
+ * Assisted definition
650
+ * > ```yaml
651
+ * > entity:
652
+ * > - {}
653
+ * > device:
654
+ * > - {}
655
+ * > ```
656
+ */
657
+ entity_id: PICK_ENTITY | PICK_ENTITY[];
658
+ }): Promise<void>;
659
+ /**
660
+ * ### Reload core configuration
661
+ *
662
+ * > Reloads the core configuration from the YAML-configuration.
663
+ */
664
+ reload_core_config(service_data: {}): Promise<void>;
665
+ /**
666
+ * ### Reload custom Jinja2 templates
667
+ *
668
+ * > Reloads Jinja2 templates found in the `custom_templates` folder in your config. New values will be applied on the next render of the template.
669
+ */
670
+ reload_custom_templates(service_data: {}): Promise<void>;
671
+ /**
672
+ * ### Restart
673
+ *
674
+ * > Restarts Home Assistant.
675
+ */
676
+ restart(service_data: {}): Promise<void>;
677
+ /**
678
+ * ### Save persistent states
679
+ *
680
+ * > Saves the persistent states immediately. Maintains the normal periodic saving interval.
681
+ */
682
+ save_persistent_states(service_data: {}): Promise<void>;
683
+ /**
684
+ * ### Set location
685
+ *
686
+ * > Updates the Home Assistant location.
687
+ */
688
+ set_location(service_data?: {
689
+ /**
690
+ * ## Elevation
691
+ *
692
+ * > Elevation of your location.
693
+ *
694
+ * ### Example
695
+ *
696
+ * > ```json
697
+ * > {
698
+ * > "elevation": "120"
699
+ * > }
700
+ * > ```
701
+ *
702
+ * ## Selector
703
+ *
704
+ * > ```yaml
705
+ * > number:
706
+ * > mode: box
707
+ * > step: any
708
+ * > ```
709
+ */
710
+ elevation?: number;
711
+ /**
712
+ * ## Latitude
713
+ *
714
+ * > Latitude of your location.
715
+ *
716
+ * ### Example
717
+ *
718
+ * > ```json
719
+ * > {
720
+ * > "latitude": "32.87336"
721
+ * > }
722
+ * > ```
723
+ *
724
+ * ## Selector
725
+ *
726
+ * > ```yaml
727
+ * > number:
728
+ * > mode: box
729
+ * > min: -90
730
+ * > max: 90
731
+ * > step: any
732
+ * > ```
733
+ */
734
+ latitude: number;
735
+ /**
736
+ * ## Longitude
737
+ *
738
+ * > Longitude of your location.
739
+ *
740
+ * ### Example
741
+ *
742
+ * > ```json
743
+ * > {
744
+ * > "longitude": "117.22743"
745
+ * > }
746
+ * > ```
747
+ *
748
+ * ## Selector
749
+ *
750
+ * > ```yaml
751
+ * > number:
752
+ * > mode: box
753
+ * > min: -180
754
+ * > max: 180
755
+ * > step: any
756
+ * > ```
757
+ */
758
+ longitude: number;
759
+ }): Promise<void>;
760
+ /**
761
+ * ### Stop
762
+ *
763
+ * > Stops Home Assistant.
764
+ */
765
+ stop(service_data: {}): Promise<void>;
766
+ /**
767
+ * ### Generic toggle
768
+ *
769
+ * > Generic service to toggle devices on/off under any domain.
770
+ */
771
+ toggle(service_data: {
772
+ /**
773
+ * Assisted definition
774
+ * > ```yaml
775
+ * > entity:
776
+ * > - {}
777
+ * > ```
778
+ */
779
+ entity_id: PICK_ENTITY | PICK_ENTITY[];
780
+ }): Promise<void>;
781
+ /**
782
+ * ### Generic turn off
783
+ *
784
+ * > Generic service to turn devices off under any domain.
785
+ */
786
+ turn_off(service_data: {
787
+ /**
788
+ * Assisted definition
789
+ * > ```yaml
790
+ * > entity:
791
+ * > - {}
792
+ * > ```
793
+ */
794
+ entity_id: PICK_ENTITY | PICK_ENTITY[];
795
+ }): Promise<void>;
796
+ /**
797
+ * ### Generic turn on
798
+ *
799
+ * > Generic service to turn devices on under any domain.
800
+ */
801
+ turn_on(service_data: {
802
+ /**
803
+ * Assisted definition
804
+ * > ```yaml
805
+ * > entity:
806
+ * > - {}
807
+ * > ```
808
+ */
809
+ entity_id: PICK_ENTITY | PICK_ENTITY[];
810
+ }): Promise<void>;
811
+ /**
812
+ * ### Update entity
813
+ *
814
+ * > Forces one or more entities to update its data.
815
+ */
816
+ update_entity(service_data: {
817
+ /**
818
+ * Assisted definition
819
+ * > ```yaml
820
+ * > entity:
821
+ * > - {}
822
+ * > ```
823
+ */
824
+ entity_id: PICK_ENTITY | PICK_ENTITY[];
825
+ }): Promise<void>;
826
+ };
827
+ // # MARK: light
828
+ light: {
829
+ /**
830
+ * ### Toggle
831
+ *
832
+ * > Toggles one or more lights, from on to off, or, off to on, based on their current state.
833
+ */
834
+ toggle(service_data?: {
835
+ /**
836
+ * ## Brightness value
837
+ *
838
+ * > Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
839
+ *
840
+ * ## Selector
841
+ *
842
+ * > ```yaml
843
+ * > number:
844
+ * > min: 0
845
+ * > max: 255
846
+ * > ```
847
+ */
848
+ brightness?: number;
849
+ /**
850
+ * ## Brightness
851
+ *
852
+ * > Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
853
+ *
854
+ * ## Selector
855
+ *
856
+ * > ```yaml
857
+ * > number:
858
+ * > min: 0
859
+ * > max: 100
860
+ * > unit_of_measurement: '%'
861
+ * > ```
862
+ */
863
+ brightness_pct?: number;
864
+ /**
865
+ * ## Color name
866
+ *
867
+ * > A human-readable color name.
868
+ */
869
+ color_name?:
870
+ | "homeassistant"
871
+ | "aliceblue"
872
+ | "antiquewhite"
873
+ | "aqua"
874
+ | "aquamarine"
875
+ | "azure"
876
+ | "beige"
877
+ | "bisque"
878
+ | "blanchedalmond"
879
+ | "blue"
880
+ | "blueviolet"
881
+ | "brown"
882
+ | "burlywood"
883
+ | "cadetblue"
884
+ | "chartreuse"
885
+ | "chocolate"
886
+ | "coral"
887
+ | "cornflowerblue"
888
+ | "cornsilk"
889
+ | "crimson"
890
+ | "cyan"
891
+ | "darkblue"
892
+ | "darkcyan"
893
+ | "darkgoldenrod"
894
+ | "darkgray"
895
+ | "darkgreen"
896
+ | "darkgrey"
897
+ | "darkkhaki"
898
+ | "darkmagenta"
899
+ | "darkolivegreen"
900
+ | "darkorange"
901
+ | "darkorchid"
902
+ | "darkred"
903
+ | "darksalmon"
904
+ | "darkseagreen"
905
+ | "darkslateblue"
906
+ | "darkslategray"
907
+ | "darkslategrey"
908
+ | "darkturquoise"
909
+ | "darkviolet"
910
+ | "deeppink"
911
+ | "deepskyblue"
912
+ | "dimgray"
913
+ | "dimgrey"
914
+ | "dodgerblue"
915
+ | "firebrick"
916
+ | "floralwhite"
917
+ | "forestgreen"
918
+ | "fuchsia"
919
+ | "gainsboro"
920
+ | "ghostwhite"
921
+ | "gold"
922
+ | "goldenrod"
923
+ | "gray"
924
+ | "green"
925
+ | "greenyellow"
926
+ | "grey"
927
+ | "honeydew"
928
+ | "hotpink"
929
+ | "indianred"
930
+ | "indigo"
931
+ | "ivory"
932
+ | "khaki"
933
+ | "lavender"
934
+ | "lavenderblush"
935
+ | "lawngreen"
936
+ | "lemonchiffon"
937
+ | "lightblue"
938
+ | "lightcoral"
939
+ | "lightcyan"
940
+ | "lightgoldenrodyellow"
941
+ | "lightgray"
942
+ | "lightgreen"
943
+ | "lightgrey"
944
+ | "lightpink"
945
+ | "lightsalmon"
946
+ | "lightseagreen"
947
+ | "lightskyblue"
948
+ | "lightslategray"
949
+ | "lightslategrey"
950
+ | "lightsteelblue"
951
+ | "lightyellow"
952
+ | "lime"
953
+ | "limegreen"
954
+ | "linen"
955
+ | "magenta"
956
+ | "maroon"
957
+ | "mediumaquamarine"
958
+ | "mediumblue"
959
+ | "mediumorchid"
960
+ | "mediumpurple"
961
+ | "mediumseagreen"
962
+ | "mediumslateblue"
963
+ | "mediumspringgreen"
964
+ | "mediumturquoise"
965
+ | "mediumvioletred"
966
+ | "midnightblue"
967
+ | "mintcream"
968
+ | "mistyrose"
969
+ | "moccasin"
970
+ | "navajowhite"
971
+ | "navy"
972
+ | "navyblue"
973
+ | "oldlace"
974
+ | "olive"
975
+ | "olivedrab"
976
+ | "orange"
977
+ | "orangered"
978
+ | "orchid"
979
+ | "palegoldenrod"
980
+ | "palegreen"
981
+ | "paleturquoise"
982
+ | "palevioletred"
983
+ | "papayawhip"
984
+ | "peachpuff"
985
+ | "peru"
986
+ | "pink"
987
+ | "plum"
988
+ | "powderblue"
989
+ | "purple"
990
+ | "red"
991
+ | "rosybrown"
992
+ | "royalblue"
993
+ | "saddlebrown"
994
+ | "salmon"
995
+ | "sandybrown"
996
+ | "seagreen"
997
+ | "seashell"
998
+ | "sienna"
999
+ | "silver"
1000
+ | "skyblue"
1001
+ | "slateblue"
1002
+ | "slategray"
1003
+ | "slategrey"
1004
+ | "snow"
1005
+ | "springgreen"
1006
+ | "steelblue"
1007
+ | "tan"
1008
+ | "teal"
1009
+ | "thistle"
1010
+ | "tomato"
1011
+ | "turquoise"
1012
+ | "violet"
1013
+ | "wheat"
1014
+ | "white"
1015
+ | "whitesmoke"
1016
+ | "yellow"
1017
+ | "yellowgreen";
1018
+ /**
1019
+ * ## Color temperature
1020
+ *
1021
+ * > Color temperature in mireds.
1022
+ *
1023
+ * ## Selector
1024
+ *
1025
+ * > ```yaml
1026
+ * > color_temp: null
1027
+ * > ```
1028
+ */
1029
+ color_temp?: unknown;
1030
+ /**
1031
+ * ## Effect
1032
+ *
1033
+ * > Light effect.
1034
+ */
1035
+ effect?: string;
1036
+ /**
1037
+ * ## Flash
1038
+ *
1039
+ * > Tell light to flash, can be either value short or long.
1040
+ */
1041
+ flash?: "long" | "short";
1042
+ /**
1043
+ * ## Hue/Sat color
1044
+ *
1045
+ * > Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.
1046
+ *
1047
+ * ### Example
1048
+ *
1049
+ * > ```json
1050
+ * > {
1051
+ * > "hs_color": "[300, 70]"
1052
+ * > }
1053
+ * > ```
1054
+ *
1055
+ * ## Selector
1056
+ *
1057
+ * > ```yaml
1058
+ * > object: null
1059
+ * > ```
1060
+ */
1061
+ hs_color?: unknown;
1062
+ /**
1063
+ * ## Color temperature
1064
+ *
1065
+ * > Color temperature in Kelvin.
1066
+ *
1067
+ * ## Selector
1068
+ *
1069
+ * > ```yaml
1070
+ * > color_temp:
1071
+ * > unit: kelvin
1072
+ * > min: 2000
1073
+ * > max: 6500
1074
+ * > ```
1075
+ */
1076
+ kelvin?: unknown;
1077
+ /**
1078
+ * ## Profile
1079
+ *
1080
+ * > Name of a light profile to use.
1081
+ *
1082
+ * ### Example
1083
+ *
1084
+ * > ```json
1085
+ * > {
1086
+ * > "profile": "relax"
1087
+ * > }
1088
+ * > ```
1089
+ */
1090
+ profile?: string;
1091
+ /**
1092
+ * ## Color
1093
+ *
1094
+ * > The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
1095
+ *
1096
+ * ### Example
1097
+ *
1098
+ * > ```json
1099
+ * > {
1100
+ * > "rgb_color": "[255, 100, 100]"
1101
+ * > }
1102
+ * > ```
1103
+ *
1104
+ * ## Selector
1105
+ *
1106
+ * > ```yaml
1107
+ * > color_rgb: null
1108
+ * > ```
1109
+ */
1110
+ rgb_color?: unknown;
1111
+ /**
1112
+ * ## Transition
1113
+ *
1114
+ * > Duration it takes to get to next state.
1115
+ *
1116
+ * ## Selector
1117
+ *
1118
+ * > ```yaml
1119
+ * > number:
1120
+ * > min: 0
1121
+ * > max: 300
1122
+ * > unit_of_measurement: seconds
1123
+ * > ```
1124
+ */
1125
+ transition?: number;
1126
+ /**
1127
+ * ## White
1128
+ *
1129
+ * > Set the light to white mode.
1130
+ *
1131
+ * ## Selector
1132
+ *
1133
+ * > ```yaml
1134
+ * > constant:
1135
+ * > value: true
1136
+ * > label: Enabled
1137
+ * > ```
1138
+ */
1139
+ white?: unknown;
1140
+ /**
1141
+ * ## XY-color
1142
+ *
1143
+ * > Color in XY-format. A list of two decimal numbers between 0 and 1.
1144
+ *
1145
+ * ### Example
1146
+ *
1147
+ * > ```json
1148
+ * > {
1149
+ * > "xy_color": "[0.52, 0.43]"
1150
+ * > }
1151
+ * > ```
1152
+ *
1153
+ * ## Selector
1154
+ *
1155
+ * > ```yaml
1156
+ * > object: null
1157
+ * > ```
1158
+ */
1159
+ xy_color?: unknown;
1160
+ /**
1161
+ * Assisted definition
1162
+ * > ```yaml
1163
+ * > entity:
1164
+ * > - domain:
1165
+ * > - light
1166
+ * > ```
1167
+ */
1168
+ entity_id: PICK_ENTITY<"light"> | PICK_ENTITY<"light">[];
1169
+ }): Promise<void>;
1170
+ /**
1171
+ * ### Turn off
1172
+ *
1173
+ * > Turn off one or more lights.
1174
+ */
1175
+ turn_off(service_data?: {
1176
+ /**
1177
+ * ## Flash
1178
+ *
1179
+ * > Tell light to flash, can be either value short or long.
1180
+ */
1181
+ flash?: "long" | "short";
1182
+ /**
1183
+ * ## Transition
1184
+ *
1185
+ * > Duration it takes to get to next state.
1186
+ *
1187
+ * ## Selector
1188
+ *
1189
+ * > ```yaml
1190
+ * > number:
1191
+ * > min: 0
1192
+ * > max: 300
1193
+ * > unit_of_measurement: seconds
1194
+ * > ```
1195
+ */
1196
+ transition?: number;
1197
+ /**
1198
+ * Assisted definition
1199
+ * > ```yaml
1200
+ * > entity:
1201
+ * > - domain:
1202
+ * > - light
1203
+ * > ```
1204
+ */
1205
+ entity_id: PICK_ENTITY<"light"> | PICK_ENTITY<"light">[];
1206
+ }): Promise<void>;
1207
+ /**
1208
+ * ### Turn on
1209
+ *
1210
+ * > Turn on one or more lights and adjust properties of the light, even when they are turned on already.
1211
+ */
1212
+ turn_on(service_data?: {
1213
+ /**
1214
+ * ## Brightness value
1215
+ *
1216
+ * > Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
1217
+ *
1218
+ * ## Selector
1219
+ *
1220
+ * > ```yaml
1221
+ * > number:
1222
+ * > min: 0
1223
+ * > max: 255
1224
+ * > ```
1225
+ */
1226
+ brightness?: number;
1227
+ /**
1228
+ * ## Brightness
1229
+ *
1230
+ * > Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
1231
+ *
1232
+ * ## Selector
1233
+ *
1234
+ * > ```yaml
1235
+ * > number:
1236
+ * > min: 0
1237
+ * > max: 100
1238
+ * > unit_of_measurement: '%'
1239
+ * > ```
1240
+ */
1241
+ brightness_pct?: number;
1242
+ /**
1243
+ * ## Brightness step value
1244
+ *
1245
+ * > Change brightness by an amount.
1246
+ *
1247
+ * ## Selector
1248
+ *
1249
+ * > ```yaml
1250
+ * > number:
1251
+ * > min: -225
1252
+ * > max: 255
1253
+ * > ```
1254
+ */
1255
+ brightness_step?: number;
1256
+ /**
1257
+ * ## Brightness step
1258
+ *
1259
+ * > Change brightness by a percentage.
1260
+ *
1261
+ * ## Selector
1262
+ *
1263
+ * > ```yaml
1264
+ * > number:
1265
+ * > min: -100
1266
+ * > max: 100
1267
+ * > unit_of_measurement: '%'
1268
+ * > ```
1269
+ */
1270
+ brightness_step_pct?: number;
1271
+ /**
1272
+ * ## Color name
1273
+ *
1274
+ * > A human-readable color name.
1275
+ */
1276
+ color_name?:
1277
+ | "homeassistant"
1278
+ | "aliceblue"
1279
+ | "antiquewhite"
1280
+ | "aqua"
1281
+ | "aquamarine"
1282
+ | "azure"
1283
+ | "beige"
1284
+ | "bisque"
1285
+ | "blanchedalmond"
1286
+ | "blue"
1287
+ | "blueviolet"
1288
+ | "brown"
1289
+ | "burlywood"
1290
+ | "cadetblue"
1291
+ | "chartreuse"
1292
+ | "chocolate"
1293
+ | "coral"
1294
+ | "cornflowerblue"
1295
+ | "cornsilk"
1296
+ | "crimson"
1297
+ | "cyan"
1298
+ | "darkblue"
1299
+ | "darkcyan"
1300
+ | "darkgoldenrod"
1301
+ | "darkgray"
1302
+ | "darkgreen"
1303
+ | "darkgrey"
1304
+ | "darkkhaki"
1305
+ | "darkmagenta"
1306
+ | "darkolivegreen"
1307
+ | "darkorange"
1308
+ | "darkorchid"
1309
+ | "darkred"
1310
+ | "darksalmon"
1311
+ | "darkseagreen"
1312
+ | "darkslateblue"
1313
+ | "darkslategray"
1314
+ | "darkslategrey"
1315
+ | "darkturquoise"
1316
+ | "darkviolet"
1317
+ | "deeppink"
1318
+ | "deepskyblue"
1319
+ | "dimgray"
1320
+ | "dimgrey"
1321
+ | "dodgerblue"
1322
+ | "firebrick"
1323
+ | "floralwhite"
1324
+ | "forestgreen"
1325
+ | "fuchsia"
1326
+ | "gainsboro"
1327
+ | "ghostwhite"
1328
+ | "gold"
1329
+ | "goldenrod"
1330
+ | "gray"
1331
+ | "green"
1332
+ | "greenyellow"
1333
+ | "grey"
1334
+ | "honeydew"
1335
+ | "hotpink"
1336
+ | "indianred"
1337
+ | "indigo"
1338
+ | "ivory"
1339
+ | "khaki"
1340
+ | "lavender"
1341
+ | "lavenderblush"
1342
+ | "lawngreen"
1343
+ | "lemonchiffon"
1344
+ | "lightblue"
1345
+ | "lightcoral"
1346
+ | "lightcyan"
1347
+ | "lightgoldenrodyellow"
1348
+ | "lightgray"
1349
+ | "lightgreen"
1350
+ | "lightgrey"
1351
+ | "lightpink"
1352
+ | "lightsalmon"
1353
+ | "lightseagreen"
1354
+ | "lightskyblue"
1355
+ | "lightslategray"
1356
+ | "lightslategrey"
1357
+ | "lightsteelblue"
1358
+ | "lightyellow"
1359
+ | "lime"
1360
+ | "limegreen"
1361
+ | "linen"
1362
+ | "magenta"
1363
+ | "maroon"
1364
+ | "mediumaquamarine"
1365
+ | "mediumblue"
1366
+ | "mediumorchid"
1367
+ | "mediumpurple"
1368
+ | "mediumseagreen"
1369
+ | "mediumslateblue"
1370
+ | "mediumspringgreen"
1371
+ | "mediumturquoise"
1372
+ | "mediumvioletred"
1373
+ | "midnightblue"
1374
+ | "mintcream"
1375
+ | "mistyrose"
1376
+ | "moccasin"
1377
+ | "navajowhite"
1378
+ | "navy"
1379
+ | "navyblue"
1380
+ | "oldlace"
1381
+ | "olive"
1382
+ | "olivedrab"
1383
+ | "orange"
1384
+ | "orangered"
1385
+ | "orchid"
1386
+ | "palegoldenrod"
1387
+ | "palegreen"
1388
+ | "paleturquoise"
1389
+ | "palevioletred"
1390
+ | "papayawhip"
1391
+ | "peachpuff"
1392
+ | "peru"
1393
+ | "pink"
1394
+ | "plum"
1395
+ | "powderblue"
1396
+ | "purple"
1397
+ | "red"
1398
+ | "rosybrown"
1399
+ | "royalblue"
1400
+ | "saddlebrown"
1401
+ | "salmon"
1402
+ | "sandybrown"
1403
+ | "seagreen"
1404
+ | "seashell"
1405
+ | "sienna"
1406
+ | "silver"
1407
+ | "skyblue"
1408
+ | "slateblue"
1409
+ | "slategray"
1410
+ | "slategrey"
1411
+ | "snow"
1412
+ | "springgreen"
1413
+ | "steelblue"
1414
+ | "tan"
1415
+ | "teal"
1416
+ | "thistle"
1417
+ | "tomato"
1418
+ | "turquoise"
1419
+ | "violet"
1420
+ | "wheat"
1421
+ | "white"
1422
+ | "whitesmoke"
1423
+ | "yellow"
1424
+ | "yellowgreen";
1425
+ /**
1426
+ * ## Color temperature
1427
+ *
1428
+ * > Color temperature in mireds.
1429
+ *
1430
+ * ## Selector
1431
+ *
1432
+ * > ```yaml
1433
+ * > color_temp:
1434
+ * > unit: mired
1435
+ * > min: 153
1436
+ * > max: 500
1437
+ * > ```
1438
+ */
1439
+ color_temp?: unknown;
1440
+ /**
1441
+ * ## Effect
1442
+ *
1443
+ * > Light effect.
1444
+ */
1445
+ effect?: string;
1446
+ /**
1447
+ * ## Flash
1448
+ *
1449
+ * > Tell light to flash, can be either value short or long.
1450
+ */
1451
+ flash?: "long" | "short";
1452
+ /**
1453
+ * ## Hue/Sat color
1454
+ *
1455
+ * > Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.
1456
+ *
1457
+ * ### Example
1458
+ *
1459
+ * > ```json
1460
+ * > {
1461
+ * > "hs_color": "[300, 70]"
1462
+ * > }
1463
+ * > ```
1464
+ *
1465
+ * ## Selector
1466
+ *
1467
+ * > ```yaml
1468
+ * > object: null
1469
+ * > ```
1470
+ */
1471
+ hs_color?: unknown;
1472
+ /**
1473
+ * ## Color temperature
1474
+ *
1475
+ * > Color temperature in Kelvin.
1476
+ *
1477
+ * ## Selector
1478
+ *
1479
+ * > ```yaml
1480
+ * > color_temp:
1481
+ * > unit: kelvin
1482
+ * > min: 2000
1483
+ * > max: 6500
1484
+ * > ```
1485
+ */
1486
+ kelvin?: unknown;
1487
+ /**
1488
+ * ## Profile
1489
+ *
1490
+ * > Name of a light profile to use.
1491
+ *
1492
+ * ### Example
1493
+ *
1494
+ * > ```json
1495
+ * > {
1496
+ * > "profile": "relax"
1497
+ * > }
1498
+ * > ```
1499
+ */
1500
+ profile?: string;
1501
+ /**
1502
+ * ## Color
1503
+ *
1504
+ * > The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
1505
+ *
1506
+ * ## Selector
1507
+ *
1508
+ * > ```yaml
1509
+ * > color_rgb: null
1510
+ * > ```
1511
+ */
1512
+ rgb_color?: unknown;
1513
+ /**
1514
+ * ## RGBW-color
1515
+ *
1516
+ * > The color in RGBW format. A list of four integers between 0 and 255 representing the values of red, green, blue, and white.
1517
+ *
1518
+ * ### Example
1519
+ *
1520
+ * > ```json
1521
+ * > {
1522
+ * > "rgbw_color": "[255, 100, 100, 50]"
1523
+ * > }
1524
+ * > ```
1525
+ *
1526
+ * ## Selector
1527
+ *
1528
+ * > ```yaml
1529
+ * > object: null
1530
+ * > ```
1531
+ */
1532
+ rgbw_color?: unknown;
1533
+ /**
1534
+ * ## RGBWW-color
1535
+ *
1536
+ * > 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.
1537
+ *
1538
+ * ### Example
1539
+ *
1540
+ * > ```json
1541
+ * > {
1542
+ * > "rgbww_color": "[255, 100, 100, 50, 70]"
1543
+ * > }
1544
+ * > ```
1545
+ *
1546
+ * ## Selector
1547
+ *
1548
+ * > ```yaml
1549
+ * > object: null
1550
+ * > ```
1551
+ */
1552
+ rgbww_color?: unknown;
1553
+ /**
1554
+ * ## Transition
1555
+ *
1556
+ * > Duration it takes to get to next state.
1557
+ *
1558
+ * ## Selector
1559
+ *
1560
+ * > ```yaml
1561
+ * > number:
1562
+ * > min: 0
1563
+ * > max: 300
1564
+ * > unit_of_measurement: seconds
1565
+ * > ```
1566
+ */
1567
+ transition?: number;
1568
+ /**
1569
+ * ## White
1570
+ *
1571
+ * > Set the light to white mode.
1572
+ *
1573
+ * ## Selector
1574
+ *
1575
+ * > ```yaml
1576
+ * > constant:
1577
+ * > value: true
1578
+ * > label: Enabled
1579
+ * > ```
1580
+ */
1581
+ white?: unknown;
1582
+ /**
1583
+ * ## XY-color
1584
+ *
1585
+ * > Color in XY-format. A list of two decimal numbers between 0 and 1.
1586
+ *
1587
+ * ### Example
1588
+ *
1589
+ * > ```json
1590
+ * > {
1591
+ * > "xy_color": "[0.52, 0.43]"
1592
+ * > }
1593
+ * > ```
1594
+ *
1595
+ * ## Selector
1596
+ *
1597
+ * > ```yaml
1598
+ * > object: null
1599
+ * > ```
1600
+ */
1601
+ xy_color?: unknown;
1602
+ /**
1603
+ * Assisted definition
1604
+ * > ```yaml
1605
+ * > entity:
1606
+ * > - domain:
1607
+ * > - light
1608
+ * > ```
1609
+ */
1610
+ entity_id: PICK_ENTITY<"light"> | PICK_ENTITY<"light">[];
1611
+ }): Promise<void>;
1612
+ };
1613
+ // # MARK: logbook
1614
+ logbook: {
1615
+ /**
1616
+ * ### Log
1617
+ *
1618
+ * > Creates a custom entry in the logbook.
1619
+ */
1620
+ log(service_data?: {
1621
+ /**
1622
+ * ## Domain
1623
+ *
1624
+ * > Determines which icon is used in the logbook entry. The icon illustrates the integration domain related to this logbook entry.
1625
+ *
1626
+ * ### Example
1627
+ *
1628
+ * > ```json
1629
+ * > {
1630
+ * > "domain": "light"
1631
+ * > }
1632
+ * > ```
1633
+ */
1634
+ domain?: string;
1635
+ /**
1636
+ * ## Entity ID
1637
+ *
1638
+ * > Entity to reference in the logbook entry.
1639
+ *
1640
+ * ## Selector
1641
+ *
1642
+ * > ```yaml
1643
+ * > entity: null
1644
+ * > ```
1645
+ */
1646
+ entity_id?: PICK_ENTITY | PICK_ENTITY[];
1647
+ /**
1648
+ * ## Message
1649
+ *
1650
+ * > Message of the logbook entry.
1651
+ *
1652
+ * ### Example
1653
+ *
1654
+ * > ```json
1655
+ * > {
1656
+ * > "message": "is being used"
1657
+ * > }
1658
+ * > ```
1659
+ */
1660
+ message: string;
1661
+ /**
1662
+ * ## Name
1663
+ *
1664
+ * > Custom name for an entity, can be referenced using an `entity_id`.
1665
+ *
1666
+ * ### Example
1667
+ *
1668
+ * > ```json
1669
+ * > {
1670
+ * > "name": "Kitchen"
1671
+ * > }
1672
+ * > ```
1673
+ */
1674
+ name: string;
1675
+ }): Promise<void>;
1676
+ };
1677
+ // # MARK: logger
1678
+ logger: {
1679
+ /**
1680
+ * ### Set default level
1681
+ *
1682
+ * > Sets the default log level for integrations.
1683
+ */
1684
+ set_default_level(service_data?: {
1685
+ /**
1686
+ * ## Level
1687
+ *
1688
+ * > Default severity level for all integrations.
1689
+ */
1690
+ level?: "debug" | "info" | "warning" | "error" | "fatal" | "critical";
1691
+ }): Promise<void>;
1692
+ /**
1693
+ * ### Set level
1694
+ *
1695
+ * > Sets the log level for one or more integrations.
1696
+ */
1697
+ set_level(service_data: {}): Promise<void>;
1698
+ };
1699
+ // # MARK: notify
1700
+ notify: {
1701
+ /**
1702
+ * ### Send a notification with notify
1703
+ *
1704
+ * > Sends a notification message using the notify service.
1705
+ */
1706
+ notify(service_data?: {
1707
+ /**
1708
+ * ## data
1709
+ *
1710
+ * ### Example
1711
+ *
1712
+ * > ```json
1713
+ * > {
1714
+ * > "data": "platform specific"
1715
+ * > }
1716
+ * > ```
1717
+ *
1718
+ * ## Selector
1719
+ *
1720
+ * > ```yaml
1721
+ * > object: null
1722
+ * > ```
1723
+ */
1724
+ data?: NotificationData & (AndroidNotificationData | AppleNotificationData);
1725
+ /**
1726
+ * ## message
1727
+ *
1728
+ * ### Example
1729
+ *
1730
+ * > ```json
1731
+ * > {
1732
+ * > "message": "The garage door has been open for 10 minutes."
1733
+ * > }
1734
+ * > ```
1735
+ */
1736
+ message: string;
1737
+ /**
1738
+ * ## target
1739
+ *
1740
+ * ### Example
1741
+ *
1742
+ * > ```json
1743
+ * > {
1744
+ * > "target": "platform specific"
1745
+ * > }
1746
+ * > ```
1747
+ *
1748
+ * ## Selector
1749
+ *
1750
+ * > ```yaml
1751
+ * > object: null
1752
+ * > ```
1753
+ */
1754
+ target?: unknown;
1755
+ /**
1756
+ * ## title
1757
+ *
1758
+ * ### Example
1759
+ *
1760
+ * > ```json
1761
+ * > {
1762
+ * > "title": "Your Garage Door Friend"
1763
+ * > }
1764
+ * > ```
1765
+ */
1766
+ title?: string;
1767
+ }): Promise<void>;
1768
+ /**
1769
+ * ### Send a persistent notification
1770
+ *
1771
+ * > Sends a notification that is visible in the **Notifications** panel.
1772
+ */
1773
+ persistent_notification(service_data?: {
1774
+ /**
1775
+ * ## Data
1776
+ *
1777
+ * > Some integrations provide extended functionality. For information on how to use _data_, refer to the integration documentation..
1778
+ *
1779
+ * ### Example
1780
+ *
1781
+ * > ```json
1782
+ * > {
1783
+ * > "data": "platform specific"
1784
+ * > }
1785
+ * > ```
1786
+ *
1787
+ * ## Selector
1788
+ *
1789
+ * > ```yaml
1790
+ * > object: null
1791
+ * > ```
1792
+ */
1793
+ data?: NotificationData & (AndroidNotificationData | AppleNotificationData);
1794
+ /**
1795
+ * ## Message
1796
+ *
1797
+ * > Message body of the notification.
1798
+ *
1799
+ * ### Example
1800
+ *
1801
+ * > ```json
1802
+ * > {
1803
+ * > "message": "The garage door has been open for 10 minutes."
1804
+ * > }
1805
+ * > ```
1806
+ */
1807
+ message: string;
1808
+ /**
1809
+ * ## Title
1810
+ *
1811
+ * > Title of the notification.
1812
+ *
1813
+ * ### Example
1814
+ *
1815
+ * > ```json
1816
+ * > {
1817
+ * > "title": "Your Garage Door Friend"
1818
+ * > }
1819
+ * > ```
1820
+ */
1821
+ title?: string;
1822
+ }): Promise<void>;
1823
+ };
1824
+ // # MARK: persistent_notification
1825
+ persistent_notification: {
1826
+ /**
1827
+ * ### Create
1828
+ *
1829
+ * > Shows a notification on the **Notifications** panel.
1830
+ */
1831
+ create(service_data?: {
1832
+ /**
1833
+ * ## Message
1834
+ *
1835
+ * > Message body of the notification.
1836
+ *
1837
+ * ### Example
1838
+ *
1839
+ * > ```json
1840
+ * > {
1841
+ * > "message": "Please check your configuration.yaml."
1842
+ * > }
1843
+ * > ```
1844
+ */
1845
+ message: string;
1846
+ /**
1847
+ * ## Notification ID
1848
+ *
1849
+ * > ID of the notification. This new notification will overwrite an existing notification with the same ID.
1850
+ *
1851
+ * ### Example
1852
+ *
1853
+ * > ```json
1854
+ * > {
1855
+ * > "notification_id": "1234"
1856
+ * > }
1857
+ * > ```
1858
+ */
1859
+ notification_id?: string;
1860
+ /**
1861
+ * ## Title
1862
+ *
1863
+ * > Optional title of the notification.
1864
+ *
1865
+ * ### Example
1866
+ *
1867
+ * > ```json
1868
+ * > {
1869
+ * > "title": "Test notification"
1870
+ * > }
1871
+ * > ```
1872
+ */
1873
+ title?: string;
1874
+ }): Promise<void>;
1875
+ /**
1876
+ * ### Dismiss
1877
+ *
1878
+ * > Removes a notification from the **Notifications** panel.
1879
+ */
1880
+ dismiss(service_data: {
1881
+ /**
1882
+ * ## Notification ID
1883
+ *
1884
+ * > ID of the notification to be removed.
1885
+ *
1886
+ * ### Example
1887
+ *
1888
+ * > ```json
1889
+ * > {
1890
+ * > "notification_id": "1234"
1891
+ * > }
1892
+ * > ```
1893
+ */
1894
+ notification_id: string;
1895
+ }): Promise<void>;
1896
+ /**
1897
+ * ### Dismiss all
1898
+ *
1899
+ * > Removes all notifications from the **Notifications** panel.
1900
+ */
1901
+ dismiss_all(service_data: {}): Promise<void>;
1902
+ };
1903
+ // # MARK: person
1904
+ person: {
1905
+ /**
1906
+ * ### Reload
1907
+ *
1908
+ * > Reloads persons from the YAML-configuration.
1909
+ */
1910
+ reload(service_data: {}): Promise<void>;
1911
+ };
1912
+ // # MARK: recorder
1913
+ recorder: {
1914
+ /**
1915
+ * ### Disable
1916
+ *
1917
+ * > Stops the recording of events and state changes.
1918
+ */
1919
+ disable(service_data: {}): Promise<void>;
1920
+ /**
1921
+ * ### Enable
1922
+ *
1923
+ * > Starts the recording of events and state changes.
1924
+ */
1925
+ enable(service_data: {}): Promise<void>;
1926
+ /**
1927
+ * ### Purge
1928
+ *
1929
+ * > Starts purge task - to clean up old data from your database.
1930
+ */
1931
+ purge(service_data?: {
1932
+ /**
1933
+ * ## Apply filter
1934
+ *
1935
+ * > Apply `entity_id` and `event_type` filters in addition to time-based purge.
1936
+ *
1937
+ * ### Default
1938
+ *
1939
+ * > ```json
1940
+ * > false
1941
+ * > ```
1942
+ */
1943
+ apply_filter?: boolean;
1944
+ /**
1945
+ * ## Days to keep
1946
+ *
1947
+ * > 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.
1948
+ *
1949
+ * ## Selector
1950
+ *
1951
+ * > ```yaml
1952
+ * > number:
1953
+ * > min: 0
1954
+ * > max: 365
1955
+ * > unit_of_measurement: days
1956
+ * > ```
1957
+ */
1958
+ keep_days?: number;
1959
+ /**
1960
+ * ## Repack
1961
+ *
1962
+ * > Attempt to save disk space by rewriting the entire database file.
1963
+ *
1964
+ * ### Default
1965
+ *
1966
+ * > ```json
1967
+ * > false
1968
+ * > ```
1969
+ */
1970
+ repack?: boolean;
1971
+ }): Promise<void>;
1972
+ /**
1973
+ * ### Purge entities
1974
+ *
1975
+ * > Starts a purge task to remove the data related to specific entities from your database.
1976
+ */
1977
+ purge_entities(service_data?: {
1978
+ /**
1979
+ * ## Domains to remove
1980
+ *
1981
+ * > List of domains for which the data needs to be removed from the recorder database.
1982
+ *
1983
+ * ### Example
1984
+ *
1985
+ * > ```json
1986
+ * > {
1987
+ * > "domains": "sun"
1988
+ * > }
1989
+ * > ```
1990
+ *
1991
+ * ### Default
1992
+ *
1993
+ * > ```json
1994
+ * > []
1995
+ * > ```
1996
+ *
1997
+ * ## Selector
1998
+ *
1999
+ * > ```yaml
2000
+ * > object: null
2001
+ * > ```
2002
+ */
2003
+ domains?: unknown;
2004
+ /**
2005
+ * ## Entity globs to remove
2006
+ *
2007
+ * > List of glob patterns used to select the entities for which the data is to be removed from the recorder database.
2008
+ *
2009
+ * ### Example
2010
+ *
2011
+ * > ```json
2012
+ * > {
2013
+ * > "entity_globs": "domain*.object_id*"
2014
+ * > }
2015
+ * > ```
2016
+ *
2017
+ * ### Default
2018
+ *
2019
+ * > ```json
2020
+ * > []
2021
+ * > ```
2022
+ *
2023
+ * ## Selector
2024
+ *
2025
+ * > ```yaml
2026
+ * > object: null
2027
+ * > ```
2028
+ */
2029
+ entity_globs?: unknown;
2030
+ /**
2031
+ * ## Days to keep
2032
+ *
2033
+ * > 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.
2034
+ *
2035
+ * ### Default
2036
+ *
2037
+ * > ```json
2038
+ * > 0
2039
+ * > ```
2040
+ *
2041
+ * ## Selector
2042
+ *
2043
+ * > ```yaml
2044
+ * > number:
2045
+ * > min: 0
2046
+ * > max: 365
2047
+ * > unit_of_measurement: days
2048
+ * > ```
2049
+ */
2050
+ keep_days?: number;
2051
+ /**
2052
+ * Assisted definition
2053
+ * > ```yaml
2054
+ * > entity:
2055
+ * > - {}
2056
+ * > ```
2057
+ */
2058
+ entity_id: PICK_ENTITY | PICK_ENTITY[];
2059
+ }): Promise<void>;
2060
+ };
2061
+ // # MARK: scene
2062
+ scene: {
2063
+ /**
2064
+ * ### Apply
2065
+ *
2066
+ * > Activates a scene with configuration.
2067
+ */
2068
+ apply(service_data?: {
2069
+ /**
2070
+ * ## Entities state
2071
+ *
2072
+ * > List of entities and their target state.
2073
+ *
2074
+ * ### Example
2075
+ *
2076
+ * > ```json
2077
+ * > {
2078
+ * > "entities": "light.kitchen: \"on\"\nlight.ceiling:\n state: \"on\"\n brightness: 80\n"
2079
+ * > }
2080
+ * > ```
2081
+ *
2082
+ * ## Selector
2083
+ *
2084
+ * > ```yaml
2085
+ * > object: null
2086
+ * > ```
2087
+ */
2088
+ entities: unknown;
2089
+ /**
2090
+ * ## Transition
2091
+ *
2092
+ * > Time it takes the devices to transition into the states defined in the scene.
2093
+ *
2094
+ * ## Selector
2095
+ *
2096
+ * > ```yaml
2097
+ * > number:
2098
+ * > min: 0
2099
+ * > max: 300
2100
+ * > unit_of_measurement: seconds
2101
+ * > ```
2102
+ */
2103
+ transition?: number;
2104
+ }): Promise<void>;
2105
+ /**
2106
+ * ### Create
2107
+ *
2108
+ * > Creates a new scene.
2109
+ */
2110
+ create(service_data?: {
2111
+ /**
2112
+ * ## Entities state
2113
+ *
2114
+ * > List of entities and their target state. If your entities are already in the target state right now, use `snapshot_entities` instead.
2115
+ *
2116
+ * ### Example
2117
+ *
2118
+ * > ```json
2119
+ * > {
2120
+ * > "entities": "light.tv_back_light: \"on\"\nlight.ceiling:\n state: \"on\"\n brightness: 200\n"
2121
+ * > }
2122
+ * > ```
2123
+ *
2124
+ * ## Selector
2125
+ *
2126
+ * > ```yaml
2127
+ * > object: null
2128
+ * > ```
2129
+ */
2130
+ entities?: unknown;
2131
+ /**
2132
+ * ## Scene entity ID
2133
+ *
2134
+ * > The entity ID of the new scene.
2135
+ *
2136
+ * ### Example
2137
+ *
2138
+ * > ```json
2139
+ * > {
2140
+ * > "scene_id": "all_lights"
2141
+ * > }
2142
+ * > ```
2143
+ */
2144
+ scene_id: string;
2145
+ /**
2146
+ * ## Snapshot entities
2147
+ *
2148
+ * > 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`.
2149
+ *
2150
+ * ### Example
2151
+ *
2152
+ * > ```json
2153
+ * > {
2154
+ * > "snapshot_entities": "- light.ceiling\n- light.kitchen\n"
2155
+ * > }
2156
+ * > ```
2157
+ */
2158
+ snapshot_entities?: PICK_ENTITY | PICK_ENTITY[];
2159
+ }): Promise<void>;
2160
+ /**
2161
+ * ### Reload
2162
+ *
2163
+ * > Reloads the scenes from the YAML-configuration.
2164
+ */
2165
+ reload(service_data: {}): Promise<void>;
2166
+ /**
2167
+ * ### Activate
2168
+ *
2169
+ * > Activates a scene.
2170
+ */
2171
+ turn_on(service_data?: {
2172
+ /**
2173
+ * ## Transition
2174
+ *
2175
+ * > Time it takes the devices to transition into the states defined in the scene.
2176
+ *
2177
+ * ## Selector
2178
+ *
2179
+ * > ```yaml
2180
+ * > number:
2181
+ * > min: 0
2182
+ * > max: 300
2183
+ * > unit_of_measurement: seconds
2184
+ * > ```
2185
+ */
2186
+ transition?: number;
2187
+ /**
2188
+ * Assisted definition
2189
+ * > ```yaml
2190
+ * > entity:
2191
+ * > - domain:
2192
+ * > - scene
2193
+ * > ```
2194
+ */
2195
+ entity_id: PICK_ENTITY<"scene"> | PICK_ENTITY<"scene">[];
2196
+ }): Promise<void>;
2197
+ };
2198
+ // # MARK: schedule
2199
+ schedule: {
2200
+ /**
2201
+ * ### Reload
2202
+ *
2203
+ * > Reloads schedules from the YAML-configuration.
2204
+ */
2205
+ reload(service_data: {}): Promise<void>;
2206
+ };
2207
+ // # MARK: shopping_list
2208
+ shopping_list: {
2209
+ /**
2210
+ * ### Add item
2211
+ *
2212
+ * > Adds an item to the shopping list.
2213
+ */
2214
+ add_item(service_data: {
2215
+ /**
2216
+ * ## Name
2217
+ *
2218
+ * > The name of the item to add.
2219
+ *
2220
+ * ### Example
2221
+ *
2222
+ * > ```json
2223
+ * > {
2224
+ * > "name": "Beer"
2225
+ * > }
2226
+ * > ```
2227
+ */
2228
+ name: string;
2229
+ }): Promise<void>;
2230
+ /**
2231
+ * ### Clear completed items
2232
+ *
2233
+ * > Clears completed items from the shopping list.
2234
+ */
2235
+ clear_completed_items(service_data: {}): Promise<void>;
2236
+ /**
2237
+ * ### Complete all
2238
+ *
2239
+ * > Marks all items as completed in the shopping list (without removing them from the list).
2240
+ */
2241
+ complete_all(service_data: {}): Promise<void>;
2242
+ /**
2243
+ * ### Complete item
2244
+ *
2245
+ * > Marks the first item with matching name as completed in the shopping list.
2246
+ */
2247
+ complete_item(service_data: {
2248
+ /**
2249
+ * ## Name
2250
+ *
2251
+ * > The name of the item to mark as completed (without removing).
2252
+ *
2253
+ * ### Example
2254
+ *
2255
+ * > ```json
2256
+ * > {
2257
+ * > "name": "Beer"
2258
+ * > }
2259
+ * > ```
2260
+ */
2261
+ name: string;
2262
+ }): Promise<void>;
2263
+ /**
2264
+ * ### Incomplete all
2265
+ *
2266
+ * > Marks all items as incomplete in the shopping list.
2267
+ */
2268
+ incomplete_all(service_data: {}): Promise<void>;
2269
+ /**
2270
+ * ### Incomplete item
2271
+ *
2272
+ * > Marks the first item with matching name as incomplete in the shopping list.
2273
+ */
2274
+ incomplete_item(service_data: {
2275
+ /**
2276
+ * ## Name
2277
+ *
2278
+ * > The name of the item to mark as incomplete.
2279
+ *
2280
+ * ### Example
2281
+ *
2282
+ * > ```json
2283
+ * > {
2284
+ * > "name": "Beer"
2285
+ * > }
2286
+ * > ```
2287
+ */
2288
+ name: string;
2289
+ }): Promise<void>;
2290
+ /**
2291
+ * ### Remove item
2292
+ *
2293
+ * > Removes the first item with matching name from the shopping list.
2294
+ */
2295
+ remove_item(service_data: {
2296
+ /**
2297
+ * ## Name
2298
+ *
2299
+ * > The name of the item to remove.
2300
+ *
2301
+ * ### Example
2302
+ *
2303
+ * > ```json
2304
+ * > {
2305
+ * > "name": "Beer"
2306
+ * > }
2307
+ * > ```
2308
+ */
2309
+ name: string;
2310
+ }): Promise<void>;
2311
+ /**
2312
+ * ### Sort all items
2313
+ *
2314
+ * > Sorts all items by name in the shopping list.
2315
+ */
2316
+ sort(service_data?: {
2317
+ /**
2318
+ * ## Sort reverse
2319
+ *
2320
+ * > Whether to sort in reverse (descending) order.
2321
+ *
2322
+ * ### Default
2323
+ *
2324
+ * > ```json
2325
+ * > false
2326
+ * > ```
2327
+ */
2328
+ reverse?: boolean;
2329
+ }): Promise<void>;
2330
+ };
2331
+ // # MARK: switch
2332
+ switch: {
2333
+ /**
2334
+ * ### Toggle
2335
+ *
2336
+ * > Toggles a switch on/off.
2337
+ */
2338
+ toggle(service_data: {
2339
+ /**
2340
+ * Assisted definition
2341
+ * > ```yaml
2342
+ * > entity:
2343
+ * > - domain:
2344
+ * > - switch
2345
+ * > ```
2346
+ */
2347
+ entity_id: PICK_ENTITY<"switch"> | PICK_ENTITY<"switch">[];
2348
+ }): Promise<void>;
2349
+ /**
2350
+ * ### Turn off
2351
+ *
2352
+ * > Turns a switch off.
2353
+ */
2354
+ turn_off(service_data: {
2355
+ /**
2356
+ * Assisted definition
2357
+ * > ```yaml
2358
+ * > entity:
2359
+ * > - domain:
2360
+ * > - switch
2361
+ * > ```
2362
+ */
2363
+ entity_id: PICK_ENTITY<"switch"> | PICK_ENTITY<"switch">[];
2364
+ }): Promise<void>;
2365
+ /**
2366
+ * ### Turn on
2367
+ *
2368
+ * > Turns a switch on.
2369
+ */
2370
+ turn_on(service_data: {
2371
+ /**
2372
+ * Assisted definition
2373
+ * > ```yaml
2374
+ * > entity:
2375
+ * > - domain:
2376
+ * > - switch
2377
+ * > ```
2378
+ */
2379
+ entity_id: PICK_ENTITY<"switch"> | PICK_ENTITY<"switch">[];
2380
+ }): Promise<void>;
2381
+ };
2382
+ // # MARK: synapse
2383
+ synapse: {
2384
+ /**
2385
+ * ### reload
2386
+ *
2387
+ * > Ask synapse application to re-send the entity list. Sent to all connected by default
2388
+ */
2389
+ reload(service_data?: {
2390
+ /**
2391
+ * ## app
2392
+ *
2393
+ * > The name of the app to target for the reload. If omitted, targets all apps.
2394
+ *
2395
+ * ### Example
2396
+ *
2397
+ * > ```json
2398
+ * > {
2399
+ * > "app": "home_automation"
2400
+ * > }
2401
+ * > ```
2402
+ *
2403
+ * ## Selector
2404
+ *
2405
+ * > ```yaml
2406
+ * >
2407
+ * > ```
2408
+ */
2409
+ app?: unknown;
2410
+ }): Promise<void>;
2411
+ };
2412
+ // # MARK: system_log
2413
+ system_log: {
2414
+ /**
2415
+ * ### Clear all
2416
+ *
2417
+ * > Clears all log entries.
2418
+ */
2419
+ clear(service_data: {}): Promise<void>;
2420
+ /**
2421
+ * ### Write
2422
+ *
2423
+ * > Write log entry.
2424
+ */
2425
+ write(service_data?: {
2426
+ /**
2427
+ * ## Level
2428
+ *
2429
+ * > Log level.
2430
+ *
2431
+ * ### Default
2432
+ *
2433
+ * > ```json
2434
+ * > "error"
2435
+ * > ```
2436
+ */
2437
+ level?: "debug" | "info" | "warning" | "error" | "critical";
2438
+ /**
2439
+ * ## Logger
2440
+ *
2441
+ * > Logger name under which to log the message. Defaults to `system_log.external`.
2442
+ *
2443
+ * ### Example
2444
+ *
2445
+ * > ```json
2446
+ * > {
2447
+ * > "logger": "mycomponent.myplatform"
2448
+ * > }
2449
+ * > ```
2450
+ */
2451
+ logger?: string;
2452
+ /**
2453
+ * ## Message
2454
+ *
2455
+ * > Message to log.
2456
+ *
2457
+ * ### Example
2458
+ *
2459
+ * > ```json
2460
+ * > {
2461
+ * > "message": "Something went wrong"
2462
+ * > }
2463
+ * > ```
2464
+ */
2465
+ message: string;
2466
+ }): Promise<void>;
2467
+ };
2468
+ // # MARK: todo
2469
+ todo: {
2470
+ /**
2471
+ * ### Add to-do list item
2472
+ *
2473
+ * > Add a new to-do list item.
2474
+ */
2475
+ add_item(service_data?: {
2476
+ /**
2477
+ * ## Description
2478
+ *
2479
+ * > A more complete description of the to-do item than provided by the item name.
2480
+ *
2481
+ * ### Example
2482
+ *
2483
+ * > ```json
2484
+ * > {
2485
+ * > "description": "A more complete description of the to-do item than that provided by the summary."
2486
+ * > }
2487
+ * > ```
2488
+ */
2489
+ description?: string;
2490
+ /**
2491
+ * ## Due date
2492
+ *
2493
+ * > The date the to-do item is expected to be completed.
2494
+ *
2495
+ * ### Example
2496
+ *
2497
+ * > ```json
2498
+ * > {
2499
+ * > "due_date": "2023-11-17"
2500
+ * > }
2501
+ * > ```
2502
+ *
2503
+ * ## Selector
2504
+ *
2505
+ * > ```yaml
2506
+ * > date: null
2507
+ * > ```
2508
+ */
2509
+ due_date?: unknown;
2510
+ /**
2511
+ * ## Due date and time
2512
+ *
2513
+ * > The date and time the to-do item is expected to be completed.
2514
+ *
2515
+ * ### Example
2516
+ *
2517
+ * > ```json
2518
+ * > {
2519
+ * > "due_datetime": "2023-11-17 13:30:00"
2520
+ * > }
2521
+ * > ```
2522
+ *
2523
+ * ## Selector
2524
+ *
2525
+ * > ```yaml
2526
+ * > datetime: null
2527
+ * > ```
2528
+ */
2529
+ due_datetime?: unknown;
2530
+ /**
2531
+ * ## Item name
2532
+ *
2533
+ * > The name that represents the to-do item.
2534
+ *
2535
+ * ### Example
2536
+ *
2537
+ * > ```json
2538
+ * > {
2539
+ * > "item": "Submit income tax return"
2540
+ * > }
2541
+ * > ```
2542
+ */
2543
+ item: string;
2544
+ /**
2545
+ * Assisted definition
2546
+ * > ```yaml
2547
+ * > entity:
2548
+ * > - domain:
2549
+ * > - todo
2550
+ * > supported_features:
2551
+ * > - 1
2552
+ * > ```
2553
+ */
2554
+ entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
2555
+ }): Promise<void>;
2556
+ /**
2557
+ * ### Get to-do list items
2558
+ *
2559
+ * > Get items on a to-do list.
2560
+ */
2561
+ get_items(service_data?: {
2562
+ /**
2563
+ * ## Status
2564
+ *
2565
+ * > Only return to-do items with the specified statuses. Returns not completed actions by default.
2566
+ *
2567
+ * ### Example
2568
+ *
2569
+ * > ```json
2570
+ * > {
2571
+ * > "status": "needs_action"
2572
+ * > }
2573
+ * > ```
2574
+ *
2575
+ * ### Default
2576
+ *
2577
+ * > ```json
2578
+ * > "needs_action"
2579
+ * > ```
2580
+ */
2581
+ status?: "needs_action" | "completed";
2582
+ /**
2583
+ * Assisted definition
2584
+ * > ```yaml
2585
+ * > entity:
2586
+ * > - domain:
2587
+ * > - todo
2588
+ * > ```
2589
+ */
2590
+ entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
2591
+ }): Promise<void>;
2592
+ /**
2593
+ * ### Remove all completed to-do list items
2594
+ *
2595
+ * > Remove all to-do list items that have been completed.
2596
+ */
2597
+ remove_completed_items(service_data: {
2598
+ /**
2599
+ * Assisted definition
2600
+ * > ```yaml
2601
+ * > entity:
2602
+ * > - domain:
2603
+ * > - todo
2604
+ * > supported_features:
2605
+ * > - 2
2606
+ * > ```
2607
+ */
2608
+ entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
2609
+ }): Promise<void>;
2610
+ /**
2611
+ * ### Remove a to-do list item
2612
+ *
2613
+ * > Remove an existing to-do list item by its name.
2614
+ */
2615
+ remove_item(service_data: {
2616
+ /**
2617
+ * ## Item name
2618
+ *
2619
+ * > The name for the to-do list items.
2620
+ */
2621
+ item: string;
2622
+ /**
2623
+ * Assisted definition
2624
+ * > ```yaml
2625
+ * > entity:
2626
+ * > - domain:
2627
+ * > - todo
2628
+ * > supported_features:
2629
+ * > - 2
2630
+ * > ```
2631
+ */
2632
+ entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
2633
+ }): Promise<void>;
2634
+ /**
2635
+ * ### Update to-do list item
2636
+ *
2637
+ * > Update an existing to-do list item based on its name.
2638
+ */
2639
+ update_item(service_data?: {
2640
+ /**
2641
+ * ## Description
2642
+ *
2643
+ * > A more complete description of the to-do item than provided by the item name.
2644
+ *
2645
+ * ### Example
2646
+ *
2647
+ * > ```json
2648
+ * > {
2649
+ * > "description": "A more complete description of the to-do item than that provided by the summary."
2650
+ * > }
2651
+ * > ```
2652
+ */
2653
+ description?: string;
2654
+ /**
2655
+ * ## Due date
2656
+ *
2657
+ * > The date the to-do item is expected to be completed.
2658
+ *
2659
+ * ### Example
2660
+ *
2661
+ * > ```json
2662
+ * > {
2663
+ * > "due_date": "2023-11-17"
2664
+ * > }
2665
+ * > ```
2666
+ *
2667
+ * ## Selector
2668
+ *
2669
+ * > ```yaml
2670
+ * > date: null
2671
+ * > ```
2672
+ */
2673
+ due_date?: unknown;
2674
+ /**
2675
+ * ## Due date and time
2676
+ *
2677
+ * > The date and time the to-do item is expected to be completed.
2678
+ *
2679
+ * ### Example
2680
+ *
2681
+ * > ```json
2682
+ * > {
2683
+ * > "due_datetime": "2023-11-17 13:30:00"
2684
+ * > }
2685
+ * > ```
2686
+ *
2687
+ * ## Selector
2688
+ *
2689
+ * > ```yaml
2690
+ * > datetime: null
2691
+ * > ```
2692
+ */
2693
+ due_datetime?: unknown;
2694
+ /**
2695
+ * ## Item name
2696
+ *
2697
+ * > The name for the to-do list item.
2698
+ *
2699
+ * ### Example
2700
+ *
2701
+ * > ```json
2702
+ * > {
2703
+ * > "item": "Submit income tax return"
2704
+ * > }
2705
+ * > ```
2706
+ */
2707
+ item: string;
2708
+ /**
2709
+ * ## Rename item
2710
+ *
2711
+ * > The new name of the to-do item
2712
+ *
2713
+ * ### Example
2714
+ *
2715
+ * > ```json
2716
+ * > {
2717
+ * > "rename": "Something else"
2718
+ * > }
2719
+ * > ```
2720
+ */
2721
+ rename?: string;
2722
+ /**
2723
+ * ## Set status
2724
+ *
2725
+ * > A status or confirmation of the to-do item.
2726
+ *
2727
+ * ### Example
2728
+ *
2729
+ * > ```json
2730
+ * > {
2731
+ * > "status": "needs_action"
2732
+ * > }
2733
+ * > ```
2734
+ */
2735
+ status?: "needs_action" | "completed";
2736
+ /**
2737
+ * Assisted definition
2738
+ * > ```yaml
2739
+ * > entity:
2740
+ * > - domain:
2741
+ * > - todo
2742
+ * > supported_features:
2743
+ * > - 4
2744
+ * > ```
2745
+ */
2746
+ entity_id: PICK_ENTITY<"todo"> | PICK_ENTITY<"todo">[];
2747
+ }): Promise<void>;
2748
+ };
2749
+ // # MARK: zone
2750
+ zone: {
2751
+ /**
2752
+ * ### Reload
2753
+ *
2754
+ * > Reloads zones from the YAML-configuration.
2755
+ */
2756
+ reload(service_data: {}): Promise<void>;
2757
+ };
2758
+ }
2759
+ }