@digital-alchemy/hass 0.2.0
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.
- package/LICENSE +21 -0
- package/dist/dynamic.d.ts +1126 -0
- package/dist/dynamic.js +153 -0
- package/dist/dynamic.js.map +1 -0
- package/dist/extensions/call-proxy.extension.d.ts +4 -0
- package/dist/extensions/call-proxy.extension.js +88 -0
- package/dist/extensions/call-proxy.extension.js.map +1 -0
- package/dist/extensions/config.extension.d.ts +2 -0
- package/dist/extensions/config.extension.js +53 -0
- package/dist/extensions/config.extension.js.map +1 -0
- package/dist/extensions/entity-manager.extension.d.ts +61 -0
- package/dist/extensions/entity-manager.extension.js +212 -0
- package/dist/extensions/entity-manager.extension.js.map +1 -0
- package/dist/extensions/fetch-api.extension.d.ts +29 -0
- package/dist/extensions/fetch-api.extension.js +174 -0
- package/dist/extensions/fetch-api.extension.js.map +1 -0
- package/dist/extensions/index.d.ts +6 -0
- package/dist/extensions/index.js +10 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/utilities.extension.d.ts +9 -0
- package/dist/extensions/utilities.extension.js +43 -0
- package/dist/extensions/utilities.extension.js.map +1 -0
- package/dist/extensions/websocket-api.extension.d.ts +39 -0
- package/dist/extensions/websocket-api.extension.js +363 -0
- package/dist/extensions/websocket-api.extension.js.map +1 -0
- package/dist/hass.module.d.ts +80 -0
- package/dist/hass.module.js +83 -0
- package/dist/hass.module.js.map +1 -0
- package/dist/helpers/backup.helper.d.ts +11 -0
- package/dist/helpers/backup.helper.js +3 -0
- package/dist/helpers/backup.helper.js.map +1 -0
- package/dist/helpers/constants.helper.d.ts +54 -0
- package/dist/helpers/constants.helper.js +63 -0
- package/dist/helpers/constants.helper.js.map +1 -0
- package/dist/helpers/entity-state.helper.d.ts +45 -0
- package/dist/helpers/entity-state.helper.js +9 -0
- package/dist/helpers/entity-state.helper.js.map +1 -0
- package/dist/helpers/fetch/calendar.d.ts +54 -0
- package/dist/helpers/fetch/calendar.js +3 -0
- package/dist/helpers/fetch/calendar.js.map +1 -0
- package/dist/helpers/fetch/configuration.d.ts +34 -0
- package/dist/helpers/fetch/configuration.js +3 -0
- package/dist/helpers/fetch/configuration.js.map +1 -0
- package/dist/helpers/fetch/index.d.ts +4 -0
- package/dist/helpers/fetch/index.js +8 -0
- package/dist/helpers/fetch/index.js.map +1 -0
- package/dist/helpers/fetch/server-log.d.ts +10 -0
- package/dist/helpers/fetch/server-log.js +20 -0
- package/dist/helpers/fetch/server-log.js.map +1 -0
- package/dist/helpers/fetch/service-list.d.ts +51 -0
- package/dist/helpers/fetch/service-list.js +3 -0
- package/dist/helpers/fetch/service-list.js.map +1 -0
- package/dist/helpers/index.d.ts +7 -0
- package/dist/helpers/index.js +11 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/metrics.helper.d.ts +13 -0
- package/dist/helpers/metrics.helper.js +30 -0
- package/dist/helpers/metrics.helper.js.map +1 -0
- package/dist/helpers/utility.helper.d.ts +53 -0
- package/dist/helpers/utility.helper.js +30 -0
- package/dist/helpers/utility.helper.js.map +1 -0
- package/dist/helpers/websocket.helper.d.ts +129 -0
- package/dist/helpers/websocket.helper.js +3 -0
- package/dist/helpers/websocket.helper.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,1126 @@
|
|
|
1
|
+
import { PICK_ENTITY } from "./helpers";
|
|
2
|
+
/**
|
|
3
|
+
* ## THIS FILE IS INTENDED TO BE REPLACED
|
|
4
|
+
*
|
|
5
|
+
* ! IF YOU STILL SEE THIS IN YOUR `node_modules`, run `npx type-writer`
|
|
6
|
+
*
|
|
7
|
+
* The purpose it to represent the configuration of Home Assistant
|
|
8
|
+
*
|
|
9
|
+
* - entities, with their available attributes & states
|
|
10
|
+
* - services, and what parameters they take
|
|
11
|
+
*
|
|
12
|
+
* This information is TYPES ONLY, and is used to add type safety to
|
|
13
|
+
* methods exported from this library through the use of utility types that
|
|
14
|
+
* take advantage of this information
|
|
15
|
+
*
|
|
16
|
+
* A post-install hook will regenerate these with real values.
|
|
17
|
+
*
|
|
18
|
+
* The service definition is the switch, light, scene domains from a previously generated file.
|
|
19
|
+
* These are required to make typescript happy for internal library definitions
|
|
20
|
+
*/
|
|
21
|
+
export declare const ENTITY_SETUP: {
|
|
22
|
+
readonly binary_sensor: {
|
|
23
|
+
readonly is_day: {
|
|
24
|
+
readonly attributes: {
|
|
25
|
+
readonly friendly_name: "Is day";
|
|
26
|
+
};
|
|
27
|
+
readonly context: {
|
|
28
|
+
readonly id: "01HNZ7RV5ZRHF4R6EVTX210Z82";
|
|
29
|
+
readonly parent_id: any;
|
|
30
|
+
readonly user_id: any;
|
|
31
|
+
};
|
|
32
|
+
readonly entity_id: "binary_sensor.is_day";
|
|
33
|
+
readonly last_changed: "2024-02-06T12:55:00.031067+00:00";
|
|
34
|
+
readonly last_updated: "2024-02-06T12:55:00.031067+00:00";
|
|
35
|
+
readonly state: "on";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly button: {
|
|
39
|
+
readonly click_me: {
|
|
40
|
+
readonly attributes: {
|
|
41
|
+
readonly friendly_name: "Click me";
|
|
42
|
+
};
|
|
43
|
+
readonly context: {
|
|
44
|
+
readonly id: "01HNZ7RV5ZRHF4R6EVTX210Z83";
|
|
45
|
+
readonly parent_id: any;
|
|
46
|
+
readonly user_id: any;
|
|
47
|
+
};
|
|
48
|
+
readonly entity_id: "button.click_me";
|
|
49
|
+
readonly last_changed: "2024-02-06T12:55:00.031068+00:00";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
readonly calendar: {
|
|
53
|
+
readonly personal: {
|
|
54
|
+
readonly attributes: {
|
|
55
|
+
readonly friendly_name: "Personal";
|
|
56
|
+
readonly offset_reached: false;
|
|
57
|
+
};
|
|
58
|
+
readonly context: {
|
|
59
|
+
readonly id: "01HJYK0H8P96SCF35ZVZGXKRT0";
|
|
60
|
+
readonly parent_id: any;
|
|
61
|
+
readonly user_id: any;
|
|
62
|
+
};
|
|
63
|
+
readonly entity_id: "calendar.personal";
|
|
64
|
+
readonly last_changed: "2023-12-31T00:00:06.145302+00:00";
|
|
65
|
+
readonly last_updated: "2023-12-31T00:05:06.454423+00:00";
|
|
66
|
+
readonly state: "off";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly light: {
|
|
70
|
+
readonly womp: {
|
|
71
|
+
readonly attributes: {
|
|
72
|
+
readonly brightness: 255;
|
|
73
|
+
readonly color_mode: "color_temp";
|
|
74
|
+
readonly color_temp: 253;
|
|
75
|
+
readonly color_temp_kelvin: 3952;
|
|
76
|
+
readonly dynamics: "none";
|
|
77
|
+
readonly friendly_name: "Womp";
|
|
78
|
+
readonly hs_color: readonly [26.835, 35.746];
|
|
79
|
+
readonly max_color_temp_kelvin: 6535;
|
|
80
|
+
readonly max_mireds: 500;
|
|
81
|
+
readonly min_color_temp_kelvin: 2000;
|
|
82
|
+
readonly min_mireds: 153;
|
|
83
|
+
readonly mode: "normal";
|
|
84
|
+
readonly rgb_color: readonly [255, 204, 163];
|
|
85
|
+
readonly supported_color_modes: readonly ["color_temp", "xy"];
|
|
86
|
+
readonly supported_features: 40;
|
|
87
|
+
readonly xy_color: readonly [0.424, 0.366];
|
|
88
|
+
};
|
|
89
|
+
readonly context: {
|
|
90
|
+
readonly id: "01HK0TW9610XX5C5EZWE6ZEWJ0";
|
|
91
|
+
readonly parent_id: any;
|
|
92
|
+
readonly user_id: "72b5dc1d14484f9bb54df2de3ab95773";
|
|
93
|
+
};
|
|
94
|
+
readonly entity_id: "light.womp";
|
|
95
|
+
readonly last_changed: "2023-12-31T16:23:21.270862+00:00";
|
|
96
|
+
readonly last_updated: "2023-12-31T21:01:05.179072+00:00";
|
|
97
|
+
readonly state: "on";
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
readonly scene: {
|
|
101
|
+
readonly bedroom_auto: {
|
|
102
|
+
readonly attributes: {
|
|
103
|
+
readonly friendly_name: "Bedroom Auto";
|
|
104
|
+
};
|
|
105
|
+
readonly context: {
|
|
106
|
+
readonly id: "01HK02X46S76A2C7JJMENBHF55";
|
|
107
|
+
readonly parent_id: any;
|
|
108
|
+
readonly user_id: "72b5dc1d14484f9bb54df2de3ab95773";
|
|
109
|
+
};
|
|
110
|
+
readonly entity_id: "scene.bedroom_auto";
|
|
111
|
+
readonly last_changed: "2023-12-31T14:02:06.428935+00:00";
|
|
112
|
+
readonly last_updated: "2023-12-31T14:02:06.428935+00:00";
|
|
113
|
+
readonly state: "2023-12-31T14:02:06.428760+00:00";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
readonly sensor: {
|
|
117
|
+
readonly loft_current_scene: {
|
|
118
|
+
readonly attributes: {
|
|
119
|
+
readonly friendly_name: "Loft current scene";
|
|
120
|
+
readonly managed_by: "home-automation";
|
|
121
|
+
readonly scene: "high";
|
|
122
|
+
};
|
|
123
|
+
readonly context: {
|
|
124
|
+
readonly id: "01HNZE7KCPMNXAK1N6G9MWC5M4";
|
|
125
|
+
readonly parent_id: any;
|
|
126
|
+
readonly user_id: any;
|
|
127
|
+
};
|
|
128
|
+
readonly entity_id: "sensor.loft_current_scene";
|
|
129
|
+
readonly last_changed: "2024-02-06T14:47:55.030369+00:00";
|
|
130
|
+
readonly last_updated: "2024-02-06T14:47:55.030369+00:00";
|
|
131
|
+
readonly state: "High";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly switch: {
|
|
135
|
+
readonly guest_mode: {
|
|
136
|
+
readonly attributes: {
|
|
137
|
+
readonly friendly_name: "Guest mode";
|
|
138
|
+
};
|
|
139
|
+
readonly context: {
|
|
140
|
+
readonly id: "01HK1AAJ4PW4SNPBFV35EDTJME";
|
|
141
|
+
readonly parent_id: any;
|
|
142
|
+
readonly user_id: "72b5dc1d14484f9bb54df2de3ab95773";
|
|
143
|
+
};
|
|
144
|
+
readonly entity_id: "switch.guest_mode";
|
|
145
|
+
readonly last_changed: "2024-01-01T01:25:47.375385+00:00";
|
|
146
|
+
readonly last_updated: "2024-01-01T01:31:01.142980+00:00";
|
|
147
|
+
readonly state: "off";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
export type iCallService = {
|
|
152
|
+
switch: {
|
|
153
|
+
/**
|
|
154
|
+
* ## Turn off
|
|
155
|
+
*
|
|
156
|
+
* Turns a switch off.*/
|
|
157
|
+
turn_off(service_data: {
|
|
158
|
+
entity_id: string | string[];
|
|
159
|
+
}): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* ## Turn on
|
|
162
|
+
*
|
|
163
|
+
* Turns a switch on.*/
|
|
164
|
+
turn_on(service_data: {
|
|
165
|
+
entity_id: string | string[];
|
|
166
|
+
}): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* ## Toggle
|
|
169
|
+
*
|
|
170
|
+
* Toggles a switch on/off.*/
|
|
171
|
+
toggle(service_data: {
|
|
172
|
+
entity_id: string | string[];
|
|
173
|
+
}): Promise<void>;
|
|
174
|
+
};
|
|
175
|
+
light: {
|
|
176
|
+
/**
|
|
177
|
+
* ## Turn on
|
|
178
|
+
*
|
|
179
|
+
* Turn on one or more lights and adjust properties of the light, even when they are turned on already.*/
|
|
180
|
+
turn_on(service_data: {
|
|
181
|
+
/**
|
|
182
|
+
* ## Transition
|
|
183
|
+
*
|
|
184
|
+
* Duration it takes to get to next state.
|
|
185
|
+
*
|
|
186
|
+
* @example undefined
|
|
187
|
+
*
|
|
188
|
+
* ## Selector
|
|
189
|
+
*
|
|
190
|
+
* ```yaml
|
|
191
|
+
* number:
|
|
192
|
+
min: 0
|
|
193
|
+
max: 300
|
|
194
|
+
unit_of_measurement: seconds
|
|
195
|
+
|
|
196
|
+
* ```*/
|
|
197
|
+
transition?: number;
|
|
198
|
+
/**
|
|
199
|
+
* ## Color
|
|
200
|
+
*
|
|
201
|
+
* The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
|
|
202
|
+
*
|
|
203
|
+
* @example undefined
|
|
204
|
+
*
|
|
205
|
+
* ## Selector
|
|
206
|
+
*
|
|
207
|
+
* ```yaml
|
|
208
|
+
* color_rgb: null
|
|
209
|
+
|
|
210
|
+
* ```*/
|
|
211
|
+
rgb_color?: unknown;
|
|
212
|
+
/**
|
|
213
|
+
* ## RGBW-color
|
|
214
|
+
*
|
|
215
|
+
* The color in RGBW format. A list of four integers between 0 and 255 representing the values of red, green, blue, and white.
|
|
216
|
+
*
|
|
217
|
+
* @example [255, 100, 100, 50]
|
|
218
|
+
*
|
|
219
|
+
* ## Selector
|
|
220
|
+
*
|
|
221
|
+
* ```yaml
|
|
222
|
+
* object: null
|
|
223
|
+
|
|
224
|
+
* ```*/
|
|
225
|
+
rgbw_color?: Record<string, unknown> | unknown[];
|
|
226
|
+
/**
|
|
227
|
+
* ## RGBWW-color
|
|
228
|
+
*
|
|
229
|
+
* 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.
|
|
230
|
+
*
|
|
231
|
+
* @example [255, 100, 100, 50, 70]
|
|
232
|
+
*
|
|
233
|
+
* ## Selector
|
|
234
|
+
*
|
|
235
|
+
* ```yaml
|
|
236
|
+
* object: null
|
|
237
|
+
|
|
238
|
+
* ```*/
|
|
239
|
+
rgbww_color?: Record<string, unknown> | unknown[];
|
|
240
|
+
/**
|
|
241
|
+
* ## Color name
|
|
242
|
+
*
|
|
243
|
+
* A human-readable color name.
|
|
244
|
+
*
|
|
245
|
+
* @example undefined
|
|
246
|
+
*
|
|
247
|
+
* ## Selector
|
|
248
|
+
*
|
|
249
|
+
* ```yaml
|
|
250
|
+
* select:
|
|
251
|
+
translation_key: color_name
|
|
252
|
+
options:
|
|
253
|
+
- homeassistant
|
|
254
|
+
- aliceblue
|
|
255
|
+
- antiquewhite
|
|
256
|
+
- aqua
|
|
257
|
+
- aquamarine
|
|
258
|
+
- azure
|
|
259
|
+
- beige
|
|
260
|
+
- bisque
|
|
261
|
+
- blanchedalmond
|
|
262
|
+
- blue
|
|
263
|
+
- blueviolet
|
|
264
|
+
- brown
|
|
265
|
+
- burlywood
|
|
266
|
+
- cadetblue
|
|
267
|
+
- chartreuse
|
|
268
|
+
- chocolate
|
|
269
|
+
- coral
|
|
270
|
+
- cornflowerblue
|
|
271
|
+
- cornsilk
|
|
272
|
+
- crimson
|
|
273
|
+
- cyan
|
|
274
|
+
- darkblue
|
|
275
|
+
- darkcyan
|
|
276
|
+
- darkgoldenrod
|
|
277
|
+
- darkgray
|
|
278
|
+
- darkgreen
|
|
279
|
+
- darkgrey
|
|
280
|
+
- darkkhaki
|
|
281
|
+
- darkmagenta
|
|
282
|
+
- darkolivegreen
|
|
283
|
+
- darkorange
|
|
284
|
+
- darkorchid
|
|
285
|
+
- darkred
|
|
286
|
+
- darksalmon
|
|
287
|
+
- darkseagreen
|
|
288
|
+
- darkslateblue
|
|
289
|
+
- darkslategray
|
|
290
|
+
- darkslategrey
|
|
291
|
+
- darkturquoise
|
|
292
|
+
- darkviolet
|
|
293
|
+
- deeppink
|
|
294
|
+
- deepskyblue
|
|
295
|
+
- dimgray
|
|
296
|
+
- dimgrey
|
|
297
|
+
- dodgerblue
|
|
298
|
+
- firebrick
|
|
299
|
+
- floralwhite
|
|
300
|
+
- forestgreen
|
|
301
|
+
- fuchsia
|
|
302
|
+
- gainsboro
|
|
303
|
+
- ghostwhite
|
|
304
|
+
- gold
|
|
305
|
+
- goldenrod
|
|
306
|
+
- gray
|
|
307
|
+
- green
|
|
308
|
+
- greenyellow
|
|
309
|
+
- grey
|
|
310
|
+
- honeydew
|
|
311
|
+
- hotpink
|
|
312
|
+
- indianred
|
|
313
|
+
- indigo
|
|
314
|
+
- ivory
|
|
315
|
+
- khaki
|
|
316
|
+
- lavender
|
|
317
|
+
- lavenderblush
|
|
318
|
+
- lawngreen
|
|
319
|
+
- lemonchiffon
|
|
320
|
+
- lightblue
|
|
321
|
+
- lightcoral
|
|
322
|
+
- lightcyan
|
|
323
|
+
- lightgoldenrodyellow
|
|
324
|
+
- lightgray
|
|
325
|
+
- lightgreen
|
|
326
|
+
- lightgrey
|
|
327
|
+
- lightpink
|
|
328
|
+
- lightsalmon
|
|
329
|
+
- lightseagreen
|
|
330
|
+
- lightskyblue
|
|
331
|
+
- lightslategray
|
|
332
|
+
- lightslategrey
|
|
333
|
+
- lightsteelblue
|
|
334
|
+
- lightyellow
|
|
335
|
+
- lime
|
|
336
|
+
- limegreen
|
|
337
|
+
- linen
|
|
338
|
+
- magenta
|
|
339
|
+
- maroon
|
|
340
|
+
- mediumaquamarine
|
|
341
|
+
- mediumblue
|
|
342
|
+
- mediumorchid
|
|
343
|
+
- mediumpurple
|
|
344
|
+
- mediumseagreen
|
|
345
|
+
- mediumslateblue
|
|
346
|
+
- mediumspringgreen
|
|
347
|
+
- mediumturquoise
|
|
348
|
+
- mediumvioletred
|
|
349
|
+
- midnightblue
|
|
350
|
+
- mintcream
|
|
351
|
+
- mistyrose
|
|
352
|
+
- moccasin
|
|
353
|
+
- navajowhite
|
|
354
|
+
- navy
|
|
355
|
+
- navyblue
|
|
356
|
+
- oldlace
|
|
357
|
+
- olive
|
|
358
|
+
- olivedrab
|
|
359
|
+
- orange
|
|
360
|
+
- orangered
|
|
361
|
+
- orchid
|
|
362
|
+
- palegoldenrod
|
|
363
|
+
- palegreen
|
|
364
|
+
- paleturquoise
|
|
365
|
+
- palevioletred
|
|
366
|
+
- papayawhip
|
|
367
|
+
- peachpuff
|
|
368
|
+
- peru
|
|
369
|
+
- pink
|
|
370
|
+
- plum
|
|
371
|
+
- powderblue
|
|
372
|
+
- purple
|
|
373
|
+
- red
|
|
374
|
+
- rosybrown
|
|
375
|
+
- royalblue
|
|
376
|
+
- saddlebrown
|
|
377
|
+
- salmon
|
|
378
|
+
- sandybrown
|
|
379
|
+
- seagreen
|
|
380
|
+
- seashell
|
|
381
|
+
- sienna
|
|
382
|
+
- silver
|
|
383
|
+
- skyblue
|
|
384
|
+
- slateblue
|
|
385
|
+
- slategray
|
|
386
|
+
- slategrey
|
|
387
|
+
- snow
|
|
388
|
+
- springgreen
|
|
389
|
+
- steelblue
|
|
390
|
+
- tan
|
|
391
|
+
- teal
|
|
392
|
+
- thistle
|
|
393
|
+
- tomato
|
|
394
|
+
- turquoise
|
|
395
|
+
- violet
|
|
396
|
+
- wheat
|
|
397
|
+
- white
|
|
398
|
+
- whitesmoke
|
|
399
|
+
- yellow
|
|
400
|
+
- yellowgreen
|
|
401
|
+
|
|
402
|
+
* ```*/
|
|
403
|
+
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";
|
|
404
|
+
/**
|
|
405
|
+
* ## Hue/Sat color
|
|
406
|
+
*
|
|
407
|
+
* Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.
|
|
408
|
+
*
|
|
409
|
+
* @example [300, 70]
|
|
410
|
+
*
|
|
411
|
+
* ## Selector
|
|
412
|
+
*
|
|
413
|
+
* ```yaml
|
|
414
|
+
* object: null
|
|
415
|
+
|
|
416
|
+
* ```*/
|
|
417
|
+
hs_color?: Record<string, unknown> | unknown[];
|
|
418
|
+
/**
|
|
419
|
+
* ## XY-color
|
|
420
|
+
*
|
|
421
|
+
* Color in XY-format. A list of two decimal numbers between 0 and 1.
|
|
422
|
+
*
|
|
423
|
+
* @example [0.52, 0.43]
|
|
424
|
+
*
|
|
425
|
+
* ## Selector
|
|
426
|
+
*
|
|
427
|
+
* ```yaml
|
|
428
|
+
* object: null
|
|
429
|
+
|
|
430
|
+
* ```*/
|
|
431
|
+
xy_color?: Record<string, unknown> | unknown[];
|
|
432
|
+
/**
|
|
433
|
+
* ## Color temperature
|
|
434
|
+
*
|
|
435
|
+
* Color temperature in mireds.
|
|
436
|
+
*
|
|
437
|
+
* @example undefined
|
|
438
|
+
*
|
|
439
|
+
* ## Selector
|
|
440
|
+
*
|
|
441
|
+
* ```yaml
|
|
442
|
+
* color_temp:
|
|
443
|
+
min_mireds: 153
|
|
444
|
+
max_mireds: 500
|
|
445
|
+
|
|
446
|
+
* ```*/
|
|
447
|
+
color_temp?: unknown;
|
|
448
|
+
/**
|
|
449
|
+
* ## Color temperature
|
|
450
|
+
*
|
|
451
|
+
* Color temperature in Kelvin.
|
|
452
|
+
*
|
|
453
|
+
* @example undefined
|
|
454
|
+
*
|
|
455
|
+
* ## Selector
|
|
456
|
+
*
|
|
457
|
+
* ```yaml
|
|
458
|
+
* number:
|
|
459
|
+
min: 2000
|
|
460
|
+
max: 6500
|
|
461
|
+
step: 100
|
|
462
|
+
unit_of_measurement: K
|
|
463
|
+
|
|
464
|
+
* ```*/
|
|
465
|
+
kelvin?: number;
|
|
466
|
+
/**
|
|
467
|
+
* ## Brightness value
|
|
468
|
+
*
|
|
469
|
+
* Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
|
|
470
|
+
*
|
|
471
|
+
* @example undefined
|
|
472
|
+
*
|
|
473
|
+
* ## Selector
|
|
474
|
+
*
|
|
475
|
+
* ```yaml
|
|
476
|
+
* number:
|
|
477
|
+
min: 0
|
|
478
|
+
max: 255
|
|
479
|
+
|
|
480
|
+
* ```*/
|
|
481
|
+
brightness?: number;
|
|
482
|
+
/**
|
|
483
|
+
* ## Brightness
|
|
484
|
+
*
|
|
485
|
+
* Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
|
|
486
|
+
*
|
|
487
|
+
* @example undefined
|
|
488
|
+
*
|
|
489
|
+
* ## Selector
|
|
490
|
+
*
|
|
491
|
+
* ```yaml
|
|
492
|
+
* number:
|
|
493
|
+
min: 0
|
|
494
|
+
max: 100
|
|
495
|
+
unit_of_measurement: '%'
|
|
496
|
+
|
|
497
|
+
* ```*/
|
|
498
|
+
brightness_pct?: number;
|
|
499
|
+
/**
|
|
500
|
+
* ## Brightness step value
|
|
501
|
+
*
|
|
502
|
+
* Change brightness by an amount.
|
|
503
|
+
*
|
|
504
|
+
* @example undefined
|
|
505
|
+
*
|
|
506
|
+
* ## Selector
|
|
507
|
+
*
|
|
508
|
+
* ```yaml
|
|
509
|
+
* number:
|
|
510
|
+
min: -225
|
|
511
|
+
max: 255
|
|
512
|
+
|
|
513
|
+
* ```*/
|
|
514
|
+
brightness_step?: number;
|
|
515
|
+
/**
|
|
516
|
+
* ## Brightness step
|
|
517
|
+
*
|
|
518
|
+
* Change brightness by a percentage.
|
|
519
|
+
*
|
|
520
|
+
* @example undefined
|
|
521
|
+
*
|
|
522
|
+
* ## Selector
|
|
523
|
+
*
|
|
524
|
+
* ```yaml
|
|
525
|
+
* number:
|
|
526
|
+
min: -100
|
|
527
|
+
max: 100
|
|
528
|
+
unit_of_measurement: '%'
|
|
529
|
+
|
|
530
|
+
* ```*/
|
|
531
|
+
brightness_step_pct?: number;
|
|
532
|
+
/**
|
|
533
|
+
* ## White
|
|
534
|
+
*
|
|
535
|
+
* Set the light to white mode.
|
|
536
|
+
*
|
|
537
|
+
* @example undefined
|
|
538
|
+
*
|
|
539
|
+
* ## Selector
|
|
540
|
+
*
|
|
541
|
+
* ```yaml
|
|
542
|
+
* constant:
|
|
543
|
+
value: true
|
|
544
|
+
label: Enabled
|
|
545
|
+
|
|
546
|
+
* ```*/
|
|
547
|
+
white?: unknown;
|
|
548
|
+
/**
|
|
549
|
+
* ## Profile
|
|
550
|
+
*
|
|
551
|
+
* Name of a light profile to use.
|
|
552
|
+
*
|
|
553
|
+
* @example relax
|
|
554
|
+
*
|
|
555
|
+
* ## Selector
|
|
556
|
+
*
|
|
557
|
+
* ```yaml
|
|
558
|
+
* text: null
|
|
559
|
+
|
|
560
|
+
* ```*/
|
|
561
|
+
profile?: string;
|
|
562
|
+
/**
|
|
563
|
+
* ## Flash
|
|
564
|
+
*
|
|
565
|
+
* Tell light to flash, can be either value short or long.
|
|
566
|
+
*
|
|
567
|
+
* @example undefined
|
|
568
|
+
*
|
|
569
|
+
* ## Selector
|
|
570
|
+
*
|
|
571
|
+
* ```yaml
|
|
572
|
+
* select:
|
|
573
|
+
options:
|
|
574
|
+
- label: Long
|
|
575
|
+
value: long
|
|
576
|
+
- label: Short
|
|
577
|
+
value: short
|
|
578
|
+
|
|
579
|
+
* ```*/
|
|
580
|
+
flash?: "long" | "short";
|
|
581
|
+
/**
|
|
582
|
+
* ## Effect
|
|
583
|
+
*
|
|
584
|
+
* Light effect.
|
|
585
|
+
*
|
|
586
|
+
* @example undefined
|
|
587
|
+
*
|
|
588
|
+
* ## Selector
|
|
589
|
+
*
|
|
590
|
+
* ```yaml
|
|
591
|
+
* text: null
|
|
592
|
+
|
|
593
|
+
* ```*/
|
|
594
|
+
effect?: string;
|
|
595
|
+
entity_id: string | string[];
|
|
596
|
+
}): Promise<void>;
|
|
597
|
+
/**
|
|
598
|
+
* ## Turn off
|
|
599
|
+
*
|
|
600
|
+
* Turn off one or more lights.*/
|
|
601
|
+
turn_off(service_data: {
|
|
602
|
+
/**
|
|
603
|
+
* ## Transition
|
|
604
|
+
*
|
|
605
|
+
* Duration it takes to get to next state.
|
|
606
|
+
*
|
|
607
|
+
* @example undefined
|
|
608
|
+
*
|
|
609
|
+
* ## Selector
|
|
610
|
+
*
|
|
611
|
+
* ```yaml
|
|
612
|
+
* number:
|
|
613
|
+
min: 0
|
|
614
|
+
max: 300
|
|
615
|
+
unit_of_measurement: seconds
|
|
616
|
+
|
|
617
|
+
* ```*/
|
|
618
|
+
transition?: number;
|
|
619
|
+
/**
|
|
620
|
+
* ## Flash
|
|
621
|
+
*
|
|
622
|
+
* Tell light to flash, can be either value short or long.
|
|
623
|
+
*
|
|
624
|
+
* @example undefined
|
|
625
|
+
*
|
|
626
|
+
* ## Selector
|
|
627
|
+
*
|
|
628
|
+
* ```yaml
|
|
629
|
+
* select:
|
|
630
|
+
options:
|
|
631
|
+
- label: Long
|
|
632
|
+
value: long
|
|
633
|
+
- label: Short
|
|
634
|
+
value: short
|
|
635
|
+
|
|
636
|
+
* ```*/
|
|
637
|
+
flash?: "long" | "short";
|
|
638
|
+
entity_id: string | string[];
|
|
639
|
+
}): Promise<void>;
|
|
640
|
+
/**
|
|
641
|
+
* ## Toggle
|
|
642
|
+
*
|
|
643
|
+
* Toggles one or more lights, from on to off, or, off to on, based on their current state.*/
|
|
644
|
+
toggle(service_data: {
|
|
645
|
+
/**
|
|
646
|
+
* ## Transition
|
|
647
|
+
*
|
|
648
|
+
* Duration it takes to get to next state.
|
|
649
|
+
*
|
|
650
|
+
* @example undefined
|
|
651
|
+
*
|
|
652
|
+
* ## Selector
|
|
653
|
+
*
|
|
654
|
+
* ```yaml
|
|
655
|
+
* number:
|
|
656
|
+
min: 0
|
|
657
|
+
max: 300
|
|
658
|
+
unit_of_measurement: seconds
|
|
659
|
+
|
|
660
|
+
* ```*/
|
|
661
|
+
transition?: number;
|
|
662
|
+
/**
|
|
663
|
+
* ## Color
|
|
664
|
+
*
|
|
665
|
+
* The color in RGB format. A list of three integers between 0 and 255 representing the values of red, green, and blue.
|
|
666
|
+
*
|
|
667
|
+
* @example [255, 100, 100]
|
|
668
|
+
*
|
|
669
|
+
* ## Selector
|
|
670
|
+
*
|
|
671
|
+
* ```yaml
|
|
672
|
+
* color_rgb: null
|
|
673
|
+
|
|
674
|
+
* ```*/
|
|
675
|
+
rgb_color?: unknown;
|
|
676
|
+
/**
|
|
677
|
+
* ## Color name
|
|
678
|
+
*
|
|
679
|
+
* A human-readable color name.
|
|
680
|
+
*
|
|
681
|
+
* @example undefined
|
|
682
|
+
*
|
|
683
|
+
* ## Selector
|
|
684
|
+
*
|
|
685
|
+
* ```yaml
|
|
686
|
+
* select:
|
|
687
|
+
translation_key: color_name
|
|
688
|
+
options:
|
|
689
|
+
- homeassistant
|
|
690
|
+
- aliceblue
|
|
691
|
+
- antiquewhite
|
|
692
|
+
- aqua
|
|
693
|
+
- aquamarine
|
|
694
|
+
- azure
|
|
695
|
+
- beige
|
|
696
|
+
- bisque
|
|
697
|
+
- blanchedalmond
|
|
698
|
+
- blue
|
|
699
|
+
- blueviolet
|
|
700
|
+
- brown
|
|
701
|
+
- burlywood
|
|
702
|
+
- cadetblue
|
|
703
|
+
- chartreuse
|
|
704
|
+
- chocolate
|
|
705
|
+
- coral
|
|
706
|
+
- cornflowerblue
|
|
707
|
+
- cornsilk
|
|
708
|
+
- crimson
|
|
709
|
+
- cyan
|
|
710
|
+
- darkblue
|
|
711
|
+
- darkcyan
|
|
712
|
+
- darkgoldenrod
|
|
713
|
+
- darkgray
|
|
714
|
+
- darkgreen
|
|
715
|
+
- darkgrey
|
|
716
|
+
- darkkhaki
|
|
717
|
+
- darkmagenta
|
|
718
|
+
- darkolivegreen
|
|
719
|
+
- darkorange
|
|
720
|
+
- darkorchid
|
|
721
|
+
- darkred
|
|
722
|
+
- darksalmon
|
|
723
|
+
- darkseagreen
|
|
724
|
+
- darkslateblue
|
|
725
|
+
- darkslategray
|
|
726
|
+
- darkslategrey
|
|
727
|
+
- darkturquoise
|
|
728
|
+
- darkviolet
|
|
729
|
+
- deeppink
|
|
730
|
+
- deepskyblue
|
|
731
|
+
- dimgray
|
|
732
|
+
- dimgrey
|
|
733
|
+
- dodgerblue
|
|
734
|
+
- firebrick
|
|
735
|
+
- floralwhite
|
|
736
|
+
- forestgreen
|
|
737
|
+
- fuchsia
|
|
738
|
+
- gainsboro
|
|
739
|
+
- ghostwhite
|
|
740
|
+
- gold
|
|
741
|
+
- goldenrod
|
|
742
|
+
- gray
|
|
743
|
+
- green
|
|
744
|
+
- greenyellow
|
|
745
|
+
- grey
|
|
746
|
+
- honeydew
|
|
747
|
+
- hotpink
|
|
748
|
+
- indianred
|
|
749
|
+
- indigo
|
|
750
|
+
- ivory
|
|
751
|
+
- khaki
|
|
752
|
+
- lavender
|
|
753
|
+
- lavenderblush
|
|
754
|
+
- lawngreen
|
|
755
|
+
- lemonchiffon
|
|
756
|
+
- lightblue
|
|
757
|
+
- lightcoral
|
|
758
|
+
- lightcyan
|
|
759
|
+
- lightgoldenrodyellow
|
|
760
|
+
- lightgray
|
|
761
|
+
- lightgreen
|
|
762
|
+
- lightgrey
|
|
763
|
+
- lightpink
|
|
764
|
+
- lightsalmon
|
|
765
|
+
- lightseagreen
|
|
766
|
+
- lightskyblue
|
|
767
|
+
- lightslategray
|
|
768
|
+
- lightslategrey
|
|
769
|
+
- lightsteelblue
|
|
770
|
+
- lightyellow
|
|
771
|
+
- lime
|
|
772
|
+
- limegreen
|
|
773
|
+
- linen
|
|
774
|
+
- magenta
|
|
775
|
+
- maroon
|
|
776
|
+
- mediumaquamarine
|
|
777
|
+
- mediumblue
|
|
778
|
+
- mediumorchid
|
|
779
|
+
- mediumpurple
|
|
780
|
+
- mediumseagreen
|
|
781
|
+
- mediumslateblue
|
|
782
|
+
- mediumspringgreen
|
|
783
|
+
- mediumturquoise
|
|
784
|
+
- mediumvioletred
|
|
785
|
+
- midnightblue
|
|
786
|
+
- mintcream
|
|
787
|
+
- mistyrose
|
|
788
|
+
- moccasin
|
|
789
|
+
- navajowhite
|
|
790
|
+
- navy
|
|
791
|
+
- navyblue
|
|
792
|
+
- oldlace
|
|
793
|
+
- olive
|
|
794
|
+
- olivedrab
|
|
795
|
+
- orange
|
|
796
|
+
- orangered
|
|
797
|
+
- orchid
|
|
798
|
+
- palegoldenrod
|
|
799
|
+
- palegreen
|
|
800
|
+
- paleturquoise
|
|
801
|
+
- palevioletred
|
|
802
|
+
- papayawhip
|
|
803
|
+
- peachpuff
|
|
804
|
+
- peru
|
|
805
|
+
- pink
|
|
806
|
+
- plum
|
|
807
|
+
- powderblue
|
|
808
|
+
- purple
|
|
809
|
+
- red
|
|
810
|
+
- rosybrown
|
|
811
|
+
- royalblue
|
|
812
|
+
- saddlebrown
|
|
813
|
+
- salmon
|
|
814
|
+
- sandybrown
|
|
815
|
+
- seagreen
|
|
816
|
+
- seashell
|
|
817
|
+
- sienna
|
|
818
|
+
- silver
|
|
819
|
+
- skyblue
|
|
820
|
+
- slateblue
|
|
821
|
+
- slategray
|
|
822
|
+
- slategrey
|
|
823
|
+
- snow
|
|
824
|
+
- springgreen
|
|
825
|
+
- steelblue
|
|
826
|
+
- tan
|
|
827
|
+
- teal
|
|
828
|
+
- thistle
|
|
829
|
+
- tomato
|
|
830
|
+
- turquoise
|
|
831
|
+
- violet
|
|
832
|
+
- wheat
|
|
833
|
+
- white
|
|
834
|
+
- whitesmoke
|
|
835
|
+
- yellow
|
|
836
|
+
- yellowgreen
|
|
837
|
+
|
|
838
|
+
* ```*/
|
|
839
|
+
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";
|
|
840
|
+
/**
|
|
841
|
+
* ## Hue/Sat color
|
|
842
|
+
*
|
|
843
|
+
* Color in hue/sat format. A list of two integers. Hue is 0-360 and Sat is 0-100.
|
|
844
|
+
*
|
|
845
|
+
* @example [300, 70]
|
|
846
|
+
*
|
|
847
|
+
* ## Selector
|
|
848
|
+
*
|
|
849
|
+
* ```yaml
|
|
850
|
+
* object: null
|
|
851
|
+
|
|
852
|
+
* ```*/
|
|
853
|
+
hs_color?: Record<string, unknown> | unknown[];
|
|
854
|
+
/**
|
|
855
|
+
* ## XY-color
|
|
856
|
+
*
|
|
857
|
+
* Color in XY-format. A list of two decimal numbers between 0 and 1.
|
|
858
|
+
*
|
|
859
|
+
* @example [0.52, 0.43]
|
|
860
|
+
*
|
|
861
|
+
* ## Selector
|
|
862
|
+
*
|
|
863
|
+
* ```yaml
|
|
864
|
+
* object: null
|
|
865
|
+
|
|
866
|
+
* ```*/
|
|
867
|
+
xy_color?: Record<string, unknown> | unknown[];
|
|
868
|
+
/**
|
|
869
|
+
* ## Color temperature
|
|
870
|
+
*
|
|
871
|
+
* Color temperature in mireds.
|
|
872
|
+
*
|
|
873
|
+
* @example undefined
|
|
874
|
+
*
|
|
875
|
+
* ## Selector
|
|
876
|
+
*
|
|
877
|
+
* ```yaml
|
|
878
|
+
* color_temp: null
|
|
879
|
+
|
|
880
|
+
* ```*/
|
|
881
|
+
color_temp?: unknown;
|
|
882
|
+
/**
|
|
883
|
+
* ## Color temperature
|
|
884
|
+
*
|
|
885
|
+
* Color temperature in Kelvin.
|
|
886
|
+
*
|
|
887
|
+
* @example undefined
|
|
888
|
+
*
|
|
889
|
+
* ## Selector
|
|
890
|
+
*
|
|
891
|
+
* ```yaml
|
|
892
|
+
* number:
|
|
893
|
+
min: 2000
|
|
894
|
+
max: 6500
|
|
895
|
+
step: 100
|
|
896
|
+
unit_of_measurement: K
|
|
897
|
+
|
|
898
|
+
* ```*/
|
|
899
|
+
kelvin?: number;
|
|
900
|
+
/**
|
|
901
|
+
* ## Brightness value
|
|
902
|
+
*
|
|
903
|
+
* Number indicating brightness, where 0 turns the light off, 1 is the minimum brightness, and 255 is the maximum brightness.
|
|
904
|
+
*
|
|
905
|
+
* @example undefined
|
|
906
|
+
*
|
|
907
|
+
* ## Selector
|
|
908
|
+
*
|
|
909
|
+
* ```yaml
|
|
910
|
+
* number:
|
|
911
|
+
min: 0
|
|
912
|
+
max: 255
|
|
913
|
+
|
|
914
|
+
* ```*/
|
|
915
|
+
brightness?: number;
|
|
916
|
+
/**
|
|
917
|
+
* ## Brightness
|
|
918
|
+
*
|
|
919
|
+
* Number indicating the percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness, and 100 is the maximum brightness.
|
|
920
|
+
*
|
|
921
|
+
* @example undefined
|
|
922
|
+
*
|
|
923
|
+
* ## Selector
|
|
924
|
+
*
|
|
925
|
+
* ```yaml
|
|
926
|
+
* number:
|
|
927
|
+
min: 0
|
|
928
|
+
max: 100
|
|
929
|
+
unit_of_measurement: '%'
|
|
930
|
+
|
|
931
|
+
* ```*/
|
|
932
|
+
brightness_pct?: number;
|
|
933
|
+
/**
|
|
934
|
+
* ## White
|
|
935
|
+
*
|
|
936
|
+
* Set the light to white mode.
|
|
937
|
+
*
|
|
938
|
+
* @example undefined
|
|
939
|
+
*
|
|
940
|
+
* ## Selector
|
|
941
|
+
*
|
|
942
|
+
* ```yaml
|
|
943
|
+
* constant:
|
|
944
|
+
value: true
|
|
945
|
+
label: Enabled
|
|
946
|
+
|
|
947
|
+
* ```*/
|
|
948
|
+
white?: unknown;
|
|
949
|
+
/**
|
|
950
|
+
* ## Profile
|
|
951
|
+
*
|
|
952
|
+
* Name of a light profile to use.
|
|
953
|
+
*
|
|
954
|
+
* @example relax
|
|
955
|
+
*
|
|
956
|
+
* ## Selector
|
|
957
|
+
*
|
|
958
|
+
* ```yaml
|
|
959
|
+
* text: null
|
|
960
|
+
|
|
961
|
+
* ```*/
|
|
962
|
+
profile?: string;
|
|
963
|
+
/**
|
|
964
|
+
* ## Flash
|
|
965
|
+
*
|
|
966
|
+
* Tell light to flash, can be either value short or long.
|
|
967
|
+
*
|
|
968
|
+
* @example undefined
|
|
969
|
+
*
|
|
970
|
+
* ## Selector
|
|
971
|
+
*
|
|
972
|
+
* ```yaml
|
|
973
|
+
* select:
|
|
974
|
+
options:
|
|
975
|
+
- label: Long
|
|
976
|
+
value: long
|
|
977
|
+
- label: Short
|
|
978
|
+
value: short
|
|
979
|
+
|
|
980
|
+
* ```*/
|
|
981
|
+
flash?: "long" | "short";
|
|
982
|
+
/**
|
|
983
|
+
* ## Effect
|
|
984
|
+
*
|
|
985
|
+
* Light effect.
|
|
986
|
+
*
|
|
987
|
+
* @example undefined
|
|
988
|
+
*
|
|
989
|
+
* ## Selector
|
|
990
|
+
*
|
|
991
|
+
* ```yaml
|
|
992
|
+
* text: null
|
|
993
|
+
|
|
994
|
+
* ```*/
|
|
995
|
+
effect?: string;
|
|
996
|
+
entity_id: string | string[];
|
|
997
|
+
}): Promise<void>;
|
|
998
|
+
};
|
|
999
|
+
scene: {
|
|
1000
|
+
/**
|
|
1001
|
+
* ## Reload
|
|
1002
|
+
*
|
|
1003
|
+
* Reloads the scenes from the YAML-configuration.*/
|
|
1004
|
+
reload(service_data: {}): Promise<void>;
|
|
1005
|
+
/**
|
|
1006
|
+
* ## Apply
|
|
1007
|
+
*
|
|
1008
|
+
* Activates a scene with configuration.*/
|
|
1009
|
+
apply(service_data: {
|
|
1010
|
+
/**
|
|
1011
|
+
* ## Entities state
|
|
1012
|
+
*
|
|
1013
|
+
* List of entities and their target state.
|
|
1014
|
+
*
|
|
1015
|
+
* @example light.kitchen: "on"
|
|
1016
|
+
light.ceiling:
|
|
1017
|
+
state: "on"
|
|
1018
|
+
brightness: 80
|
|
1019
|
+
|
|
1020
|
+
*
|
|
1021
|
+
* ## Selector
|
|
1022
|
+
*
|
|
1023
|
+
* ```yaml
|
|
1024
|
+
* object: null
|
|
1025
|
+
|
|
1026
|
+
* ```*/
|
|
1027
|
+
entities: Partial<Record<PICK_ENTITY, unknown>> | unknown[];
|
|
1028
|
+
/**
|
|
1029
|
+
* ## Transition
|
|
1030
|
+
*
|
|
1031
|
+
* Time it takes the devices to transition into the states defined in the scene.
|
|
1032
|
+
*
|
|
1033
|
+
* @example undefined
|
|
1034
|
+
*
|
|
1035
|
+
* ## Selector
|
|
1036
|
+
*
|
|
1037
|
+
* ```yaml
|
|
1038
|
+
* number:
|
|
1039
|
+
min: 0
|
|
1040
|
+
max: 300
|
|
1041
|
+
unit_of_measurement: seconds
|
|
1042
|
+
|
|
1043
|
+
* ```*/
|
|
1044
|
+
transition?: number;
|
|
1045
|
+
}): Promise<void>;
|
|
1046
|
+
/**
|
|
1047
|
+
* ## Create
|
|
1048
|
+
*
|
|
1049
|
+
* Creates a new scene.*/
|
|
1050
|
+
create(service_data: {
|
|
1051
|
+
/**
|
|
1052
|
+
* ## Scene entity ID
|
|
1053
|
+
*
|
|
1054
|
+
* The entity ID of the new scene.
|
|
1055
|
+
*
|
|
1056
|
+
* @example all_lights
|
|
1057
|
+
*
|
|
1058
|
+
* ## Selector
|
|
1059
|
+
*
|
|
1060
|
+
* ```yaml
|
|
1061
|
+
* text: null
|
|
1062
|
+
|
|
1063
|
+
* ```*/
|
|
1064
|
+
scene_id: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* ## Entities state
|
|
1067
|
+
*
|
|
1068
|
+
* List of entities and their target state. If your entities are already in the target state right now, use `snapshot_entities` instead.
|
|
1069
|
+
*
|
|
1070
|
+
* @example light.tv_back_light: "on"
|
|
1071
|
+
light.ceiling:
|
|
1072
|
+
state: "on"
|
|
1073
|
+
brightness: 200
|
|
1074
|
+
|
|
1075
|
+
*
|
|
1076
|
+
* ## Selector
|
|
1077
|
+
*
|
|
1078
|
+
* ```yaml
|
|
1079
|
+
* object: null
|
|
1080
|
+
|
|
1081
|
+
* ```*/
|
|
1082
|
+
entities?: Record<string, unknown> | unknown[];
|
|
1083
|
+
/**
|
|
1084
|
+
* ## Snapshot entities
|
|
1085
|
+
*
|
|
1086
|
+
* 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`.
|
|
1087
|
+
*
|
|
1088
|
+
* @example - light.ceiling
|
|
1089
|
+
- light.kitchen
|
|
1090
|
+
|
|
1091
|
+
*
|
|
1092
|
+
* ## Selector
|
|
1093
|
+
*
|
|
1094
|
+
* ```yaml
|
|
1095
|
+
* entity:
|
|
1096
|
+
multiple: true
|
|
1097
|
+
|
|
1098
|
+
* ```*/
|
|
1099
|
+
snapshot_entities?: string;
|
|
1100
|
+
}): Promise<void>;
|
|
1101
|
+
/**
|
|
1102
|
+
* ## Activate
|
|
1103
|
+
*
|
|
1104
|
+
* Activates a scene.*/
|
|
1105
|
+
turn_on(service_data: {
|
|
1106
|
+
/**
|
|
1107
|
+
* ## Transition
|
|
1108
|
+
*
|
|
1109
|
+
* Time it takes the devices to transition into the states defined in the scene.
|
|
1110
|
+
*
|
|
1111
|
+
* @example undefined
|
|
1112
|
+
*
|
|
1113
|
+
* ## Selector
|
|
1114
|
+
*
|
|
1115
|
+
* ```yaml
|
|
1116
|
+
* number:
|
|
1117
|
+
min: 0
|
|
1118
|
+
max: 300
|
|
1119
|
+
unit_of_measurement: seconds
|
|
1120
|
+
|
|
1121
|
+
* ```*/
|
|
1122
|
+
transition?: number;
|
|
1123
|
+
entity_id: string | string[];
|
|
1124
|
+
}): Promise<void>;
|
|
1125
|
+
};
|
|
1126
|
+
};
|