-
Notifications
You must be signed in to change notification settings - Fork 1
/
supported-types.d.ts
2839 lines (2838 loc) · 99.3 KB
/
supported-types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// this is an auto generated file, do not change this manually
import { ServiceFunction, ServiceFunctionTypes } from "@hakit/core";
declare module "@hakit/core" {
export interface CustomSupportedServices<
T extends ServiceFunctionTypes = "target",
> {
persistentNotification: {
// Shows a notification on the **Notifications** panel.
create: ServiceFunction<
T,
{
// Message body of the notification. @example Please check your configuration.yaml.
message: string;
// Optional title of the notification. @example Test notification
title?: string;
// ID of the notification. This new notification will overwrite an existing notification with the same ID. @example 1234
notification_id?: string;
}
>;
// Removes a notification from the **Notifications** panel.
dismiss: ServiceFunction<
T,
{
// ID of the notification to be removed. @example 1234
notification_id: string;
}
>;
// Removes all notifications from the **Notifications** panel.
dismissAll: ServiceFunction<T, object>;
};
homeassistant: {
// Saves the persistent states immediately. Maintains the normal periodic saving interval.
savePersistentStates: ServiceFunction<T, object>;
// Generic service to turn devices off under any domain.
turnOff: ServiceFunction<T, object>;
// Generic service to turn devices on under any domain.
turnOn: ServiceFunction<T, object>;
// Generic service to toggle devices on/off under any domain.
toggle: ServiceFunction<T, object>;
// Stops Home Assistant.
stop: ServiceFunction<T, object>;
// Restarts Home Assistant.
restart: ServiceFunction<T, object>;
// Checks the Home Assistant YAML-configuration files for errors. Errors will be shown in the Home Assistant logs.
checkConfig: ServiceFunction<T, object>;
// Forces one or more entities to update its data.
updateEntity: ServiceFunction<T, object>;
// Reloads the core configuration from the YAML-configuration.
reloadCoreConfig: ServiceFunction<T, object>;
// Updates the Home Assistant location.
setLocation: ServiceFunction<
T,
{
// Latitude of your location. @example 32.87336
latitude: number;
// Longitude of your location. @example 117.22743
longitude: number;
// Elevation of your location. @example 120
elevation?: number;
}
>;
// Reloads Jinja2 templates found in the `custom_templates` folder in your config. New values will be applied on the next render of the template.
reloadCustomTemplates: ServiceFunction<T, object>;
// Reloads the specified config entry.
reloadConfigEntry: ServiceFunction<
T,
{
// The configuration entry ID of the entry to be reloaded. @example 8955375327824e14ba89e4b29cc3ec9a
entry_id?: string;
}
>;
// Reload all YAML configuration that can be reloaded without restarting Home Assistant.
reloadAll: ServiceFunction<T, object>;
};
systemLog: {
// Clears all log entries.
clear: ServiceFunction<T, object>;
// Write log entry.
write: ServiceFunction<
T,
{
// Message to log. @example Something went wrong
message: string;
// Log level.
level?: "debug" | "info" | "warning" | "error" | "critical";
// Logger name under which to log the message. Defaults to `system_log.external`. @example mycomponent.myplatform
logger?: string;
}
>;
};
logger: {
// Sets the default log level for integrations.
setDefaultLevel: ServiceFunction<
T,
{
// Default severity level for all integrations.
level?: "debug" | "info" | "warning" | "error" | "fatal" | "critical";
}
>;
// Sets the log level for one or more integrations.
setLevel: ServiceFunction<T, object>;
};
person: {
// Reloads persons from the YAML-configuration.
reload: ServiceFunction<T, object>;
};
frontend: {
// Sets the default theme Home Assistant uses. Can be overridden by a user.
setTheme: ServiceFunction<
T,
{
// Name of a theme. @example default
name: object;
// Theme mode.
mode?: "dark" | "light";
}
>;
// Reloads themes from the YAML-configuration.
reloadThemes: ServiceFunction<T, object>;
};
recorder: {
// Starts purge task - to clean up old data from your database.
purge: ServiceFunction<
T,
{
// 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.
keep_days?: number;
// Attempt to save disk space by rewriting the entire database file.
repack?: boolean;
// Applys `entity_id` and `event_type` filters in addition to time-based purge.
apply_filter?: boolean;
}
>;
// Starts a purge task to remove the data related to specific entities from your database.
purgeEntities: ServiceFunction<
T,
{
// List of domains for which the data needs to be removed from the recorder database. @example sun
domains?: object;
// List of glob patterns used to select the entities for which the data is to be removed from the recorder database. @example domain*.object_id*
entity_globs?: object;
// 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.
keep_days?: number;
}
>;
// Starts the recording of events and state changes.
enable: ServiceFunction<T, object>;
// Stops the recording of events and state changes.
disable: ServiceFunction<T, object>;
};
hassio: {
// Starts an add-on.
addonStart: ServiceFunction<
T,
{
// The add-on slug. @example core_ssh
addon: object;
}
>;
// Stops an add-on.
addonStop: ServiceFunction<
T,
{
// The add-on slug. @example core_ssh
addon: object;
}
>;
// Restarts an add-on.
addonRestart: ServiceFunction<
T,
{
// The add-on slug. @example core_ssh
addon: object;
}
>;
// Updates an add-on. This service should be used with caution since add-on updates can contain breaking changes. It is highly recommended that you review release notes/change logs before updating an add-on.
addonUpdate: ServiceFunction<
T,
{
// The add-on slug. @example core_ssh
addon: object;
}
>;
// Writes data to add-on stdin.
addonStdin: ServiceFunction<
T,
{
// The add-on slug. @example core_ssh
addon: object;
}
>;
// Powers off the host system.
hostShutdown: ServiceFunction<T, object>;
// Reboots the host system.
hostReboot: ServiceFunction<T, object>;
// Creates a full backup.
backupFull: ServiceFunction<
T,
{
// Optional (default = current date and time). @example Backup 1
name?: string;
// Password to protect the backup with. @example password
password?: string;
// Compresses the backup files.
compressed?: boolean;
// Name of a backup network storage to host backups. @example my_backup_mount
location?: object;
// Exclude the Home Assistant database file from backup
homeassistant_exclude_database?: boolean;
}
>;
// Creates a partial backup.
backupPartial: ServiceFunction<
T,
{
// Includes Home Assistant settings in the backup.
homeassistant?: boolean;
// Exclude the Home Assistant database file from backup
homeassistant_exclude_database?: boolean;
// List of add-ons to include in the backup. Use the name slug of the add-on. @example core_ssh,core_samba,core_mosquitto
addons?: object;
// List of directories to include in the backup. @example homeassistant,share
folders?: object;
// Optional (default = current date and time). @example Partial backup 1
name?: string;
// Password to protect the backup with. @example password
password?: string;
// Compresses the backup files.
compressed?: boolean;
// Name of a backup network storage to host backups. @example my_backup_mount
location?: object;
}
>;
// Restores from full backup.
restoreFull: ServiceFunction<
T,
{
// Slug of backup to restore from.
slug: string;
// Optional password. @example password
password?: string;
}
>;
// Restores from a partial backup.
restorePartial: ServiceFunction<
T,
{
// Slug of backup to restore from.
slug: string;
// Restores Home Assistant.
homeassistant?: boolean;
// List of directories to include in the backup. @example homeassistant,share
folders?: object;
// List of add-ons to include in the backup. Use the name slug of the add-on. @example core_ssh,core_samba,core_mosquitto
addons?: object;
// Optional password. @example password
password?: string;
}
>;
};
cloud: {
// Makes the instance UI accessible from outside of the local network by using Home Assistant Cloud.
remoteConnect: ServiceFunction<T, object>;
// 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.
remoteDisconnect: ServiceFunction<T, object>;
};
ffmpeg: {
// Sends a start command to a ffmpeg based sensor.
start: ServiceFunction<
T,
{
// Name of entity that will start. Platform dependent.
entity_id?: string;
}
>;
// Sends a stop command to a ffmpeg based sensor.
stop: ServiceFunction<
T,
{
// Name of entity that will stop. Platform dependent.
entity_id?: string;
}
>;
// Sends a restart command to a ffmpeg based sensor.
restart: ServiceFunction<
T,
{
// Name of entity that will restart. Platform dependent.
entity_id?: string;
}
>;
};
tts: {
// Say something using text-to-speech on a media player with google_translate.
googleTranslateSay: ServiceFunction<
T,
{
// undefined
entity_id: string;
// undefined @example My name is hanna
message: string;
// undefined
cache?: boolean;
// undefined @example ru
language?: string;
// undefined @example platform specific
options?: object;
}
>;
// Speaks something using text-to-speech on a media player.
speak: ServiceFunction<
T,
{
// Media players to play the message.
media_player_entity_id: string;
// The text you want to convert into speech so that you can listen to it on your device. @example My name is hanna
message: string;
// Stores this message locally so that when the text is requested again, the output can be produced more quickly.
cache?: boolean;
// Language to use for speech generation. @example ru
language?: string;
// A dictionary containing integration-specific options. @example platform specific
options?: object;
}
>;
// Removes all cached text-to-speech files and purges the memory.
clearCache: ServiceFunction<T, object>;
// Say something using text-to-speech on a media player with cloud.
cloudSay: ServiceFunction<
T,
{
// undefined
entity_id: string;
// undefined @example My name is hanna
message: string;
// undefined
cache?: boolean;
// undefined @example ru
language?: string;
// undefined @example platform specific
options?: object;
}
>;
};
update: {
// Installs an update for this device or service.
install: ServiceFunction<
T,
{
// The version to install. If omitted, the latest version will be installed. @example 1.0.0
version?: string;
// If supported by the integration, this creates a backup before starting the update .
backup?: boolean;
}
>;
// Marks currently available update as skipped.
skip: ServiceFunction<T, object>;
// Removes the skipped version marker from an update.
clearSkipped: ServiceFunction<T, object>;
};
historyStats: {
// Reloads history stats sensors from the YAML-configuration.
reload: ServiceFunction<T, object>;
};
mediaPlayer: {
// Turns on the power of the media player.
turnOn: ServiceFunction<T, object>;
// Turns off the power of the media player.
turnOff: ServiceFunction<T, object>;
// Toggles a media player on/off.
toggle: ServiceFunction<T, object>;
// Turns up the volume.
volumeUp: ServiceFunction<T, object>;
// Turns down the volume.
volumeDown: ServiceFunction<T, object>;
// Toggles play/pause.
mediaPlayPause: ServiceFunction<T, object>;
// Starts playing.
mediaPlay: ServiceFunction<T, object>;
// Pauses.
mediaPause: ServiceFunction<T, object>;
// Stops playing.
mediaStop: ServiceFunction<T, object>;
// Selects the next track.
mediaNextTrack: ServiceFunction<T, object>;
// Selects the previous track.
mediaPreviousTrack: ServiceFunction<T, object>;
// Clears the playlist.
clearPlaylist: ServiceFunction<T, object>;
// Sets the volume level.
volumeSet: ServiceFunction<
T,
{
// The volume. 0 is inaudible, 1 is the maximum volume.
volume_level: number;
}
>;
// Mutes or unmutes the media player.
volumeMute: ServiceFunction<
T,
{
// Defines whether or not it is muted.
is_volume_muted: boolean;
}
>;
// Allows you to go to a different part of the media that is currently playing.
mediaSeek: ServiceFunction<
T,
{
// Target position in the currently playing media. The format is platform dependent.
seek_position: number;
}
>;
// Groups media players together for synchronous playback. Only works on supported multiroom audio systems.
join: ServiceFunction<
T,
{
// The players which will be synced with the playback specified in `target`. @example - media_player.multiroom_player2 - media_player.multiroom_player3
group_members: string[];
}
>;
// Sends the media player the command to change input source.
selectSource: ServiceFunction<
T,
{
// Name of the source to switch to. Platform dependent. @example video1
source: string;
}
>;
// Selects a specific sound mode.
selectSoundMode: ServiceFunction<
T,
{
// Name of the sound mode to switch to. @example Music
sound_mode?: string;
}
>;
// Starts playing specified media.
playMedia: ServiceFunction<
T,
{
// The ID of the content to play. Platform dependent. @example https://home-assistant.io/images/cast/splash.png
media_content_id: string;
// The type of the content to play. Such as image, music, tv show, video, episode, channel, or playlist. @example music
media_content_type: string;
// If the content should be played now or be added to the queue.
enqueue?: "play" | "next" | "add" | "replace";
// If the media should be played as an announcement. @example true
announce?: boolean;
}
>;
// Playback mode that selects the media in randomized order.
shuffleSet: ServiceFunction<
T,
{
// Whether or not shuffle mode is enabled.
shuffle: boolean;
}
>;
// Removes the player from a group. Only works on platforms which support player groups.
unjoin: ServiceFunction<T, object>;
// Playback mode that plays the media in a loop.
repeatSet: ServiceFunction<
T,
{
// Repeat mode to set.
repeat: "off" | "all" | "one";
}
>;
};
conversation: {
// Launches a conversation from a transcribed text.
process: ServiceFunction<
T,
{
// Transcribed text input. @example Turn all lights on
text: string;
// Language of text. Defaults to server language. @example NL
language?: string;
// Conversation agent to process your request. The conversation agent is the brains of your assistant. It processes the incoming text commands. @example homeassistant
agent_id?: object;
}
>;
// Reloads the intent configuration.
reload: ServiceFunction<
T,
{
// Language to clear cached intents for. Defaults to server language. @example NL
language?: string;
// Conversation agent to reload. @example homeassistant
agent_id?: object;
}
>;
};
restCommand: {
//
assistantRelay: ServiceFunction<T, object>;
//
reload: ServiceFunction<T, object>;
};
localtuya: {
// Reload localtuya and reconnect to all devices.
reload: ServiceFunction<T, object>;
// Change the value of a datapoint (DP)
setDp: ServiceFunction<
T,
{
// Device ID of device to change datapoint value for @example 11100118278aab4de001
device_id?: object;
// Datapoint index @example 1
dp?: object;
// New value to set
value?: object;
}
>;
};
commandLine: {
// Reloads command line configuration from the YAML-configuration.
reload: ServiceFunction<T, object>;
};
light: {
// Turn on one or more lights and adjust properties of the light, even when they are turned on already.
turnOn: ServiceFunction<
T,
{
// Duration it takes to get to next state.
transition?: number;
// The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
rgb_color?: [number, number, number];
// The color in RGBW format. A list of four integers between 0 and 255 representing the values of red, green, blue, and white. @example [255, 100, 100, 50]
rgbw_color?: [number, number, number, number];
// 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. @example [255, 100, 100, 50, 70]
rgbww_color?: [number, number, number, number, number];
// A human-readable color name.
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";
// Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100. @example [300, 70]
hs_color?: [number, number];
// Color in XY-format. A list of two decimal numbers between 0 and 1. @example [0.52, 0.43]
xy_color?: object;
// Color temperature in mireds.
color_temp?: object;
// Color temperature in Kelvin.
kelvin?: object;
// Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
brightness?: number;
// Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
brightness_pct?: number;
// Change brightness by an amount.
brightness_step?: number;
// Change brightness by a percentage.
brightness_step_pct?: number;
// Set the light to white mode.
white?: object;
// Name of a light profile to use. @example relax
profile?: string;
// Tell light to flash, can be either value short or long.
flash?: "long" | "short";
// Light effect.
effect?: string;
}
>;
// Turn off one or more lights.
turnOff: ServiceFunction<
T,
{
// Duration it takes to get to next state.
transition?: number;
// Tell light to flash, can be either value short or long.
flash?: "long" | "short";
}
>;
// Toggles one or more lights, from on to off, or, off to on, based on their current state.
toggle: ServiceFunction<
T,
{
// Duration it takes to get to next state.
transition?: number;
// The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue. @example [255, 100, 100]
rgb_color?: [number, number, number];
// A human-readable color name.
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";
// Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100. @example [300, 70]
hs_color?: [number, number];
// Color in XY-format. A list of two decimal numbers between 0 and 1. @example [0.52, 0.43]
xy_color?: object;
// Color temperature in mireds.
color_temp?: object;
// Color temperature in Kelvin.
kelvin?: object;
// Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
brightness?: number;
// Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
brightness_pct?: number;
// Set the light to white mode.
white?: object;
// Name of a light profile to use. @example relax
profile?: string;
// Tell light to flash, can be either value short or long.
flash?: "long" | "short";
// Light effect.
effect?: string;
}
>;
};
cover: {
// Opens a cover.
openCover: ServiceFunction<T, object>;
// Closes a cover.
closeCover: ServiceFunction<T, object>;
// Moves a cover to a specific position.
setCoverPosition: ServiceFunction<
T,
{
// Target position.
position: number;
}
>;
// Stops the cover movement.
stopCover: ServiceFunction<T, object>;
// Toggles a cover open/closed.
toggle: ServiceFunction<T, object>;
// Tilts a cover open.
openCoverTilt: ServiceFunction<T, object>;
// Tilts a cover to close.
closeCoverTilt: ServiceFunction<T, object>;
// Stops a tilting cover movement.
stopCoverTilt: ServiceFunction<T, object>;
// Moves a cover tilt to a specific position.
setCoverTiltPosition: ServiceFunction<
T,
{
// Target tilt positition.
tilt_position: number;
}
>;
// Toggles a cover tilt open/closed.
toggleCoverTilt: ServiceFunction<T, object>;
};
logbook: {
// Creates a custom entry in the logbook.
log: ServiceFunction<
T,
{
// Custom name for an entity, can be referenced using an `entity_id`. @example Kitchen
name: string;
// Message of the logbook entry. @example is being used
message: string;
// Entity to reference in the logbook entry.
entity_id?: string;
// Determines which icon is used in the logbook entry. The icon illustrates the integration domain related to this logbook entry. @example light
domain?: string;
}
>;
};
group: {
// Reloads group configuration, entities, and notify services from YAML-configuration.
reload: ServiceFunction<T, object>;
// Creates/Updates a user group.
set: ServiceFunction<
T,
{
// Object ID of this group. This object ID is used as part of the entity ID. Entity ID format: [domain].[object_id]. @example test_group
object_id: string;
// Name of the group. @example My test group
name?: string;
// Name of the icon for the group. @example mdi:camera
icon?: object;
// List of all members in the group. Cannot be used in combination with `Add entities` or `Remove entities`. @example domain.entity_id1, domain.entity_id2
entities?: string;
// List of members to be added to the group. Cannot be used in combination with `Entities` or `Remove entities`. @example domain.entity_id1, domain.entity_id2
add_entities?: string;
// List of members to be removed from a group. Cannot be used in combination with `Entities` or `Add entities`. @example domain.entity_id1, domain.entity_id2
remove_entities?: string;
// Enable this option if the group should only be used when all entities are in state `on`.
all?: boolean;
}
>;
// Removes a group.
remove: ServiceFunction<
T,
{
// Object ID of this group. This object ID is used as part of the entity ID. Entity ID format: [domain].[object_id]. @example test_group
object_id: object;
}
>;
};
inputButton: {
// Reloads helpers from the YAML-configuration.
reload: ServiceFunction<T, object>;
// Mimics the physical button press on the device.
press: ServiceFunction<T, object>;
};
counter: {
// Increments a counter.
increment: ServiceFunction<T, object>;
// Decrements a counter.
decrement: ServiceFunction<T, object>;
// Resets a counter.
reset: ServiceFunction<T, object>;
// Sets the counter value.
setValue: ServiceFunction<
T,
{