@nebulahome/integration-sdk 1.8.0 → 1.10.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/dist/schemas.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { k as JsonObject, l as TemplateValue } from "./chunks/node-index.js";
1
+ import { N as JsonObject, l as TemplateValue } from "./chunks/node-index.js";
2
2
  import { z } from "zod";
3
3
  //#region src/schemas.d.ts
4
4
  /** Each file's schema, by the name its JSON Schema is written under. */
@@ -250,6 +250,52 @@ export declare const BUNDLE_FILE_SCHEMAS: {
250
250
  equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
251
251
  }, z.core.$strict>>;
252
252
  isLive: z.ZodOptional<z.ZodBoolean>;
253
+ }, z.core.$strict>, z.ZodObject<{
254
+ type: z.ZodLiteral<"entity">;
255
+ domains: z.ZodOptional<z.ZodArray<z.ZodEnum<{
256
+ number: "number";
257
+ cover: "cover";
258
+ lock: "lock";
259
+ media_player: "media_player";
260
+ camera: "camera";
261
+ button: "button";
262
+ update: "update";
263
+ lawn_mower: "lawn_mower";
264
+ select: "select";
265
+ vacuum: "vacuum";
266
+ fan: "fan";
267
+ image: "image";
268
+ custom: "custom";
269
+ alias: "alias";
270
+ switch: "switch";
271
+ light: "light";
272
+ binary_sensor: "binary_sensor";
273
+ climate: "climate";
274
+ sensor: "sensor";
275
+ device_tracker: "device_tracker";
276
+ geo_location: "geo_location";
277
+ }>>>;
278
+ key: z.ZodString;
279
+ label: z.ZodString;
280
+ help: z.ZodOptional<z.ZodString>;
281
+ isRequired: z.ZodDefault<z.ZodBoolean>;
282
+ shownWhen: z.ZodOptional<z.ZodObject<{
283
+ key: z.ZodString;
284
+ equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
285
+ }, z.core.$strict>>;
286
+ isLive: z.ZodOptional<z.ZodBoolean>;
287
+ }, z.core.$strict>, z.ZodObject<{
288
+ type: z.ZodLiteral<"icon">;
289
+ default: z.ZodOptional<z.ZodString>;
290
+ key: z.ZodString;
291
+ label: z.ZodString;
292
+ help: z.ZodOptional<z.ZodString>;
293
+ isRequired: z.ZodDefault<z.ZodBoolean>;
294
+ shownWhen: z.ZodOptional<z.ZodObject<{
295
+ key: z.ZodString;
296
+ equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
297
+ }, z.core.$strict>>;
298
+ isLive: z.ZodOptional<z.ZodBoolean>;
253
299
  }, z.core.$strict>], "type">>>;
254
300
  }, z.core.$strict>;
255
301
  options: z.ZodDefault<z.ZodObject<{
@@ -348,6 +394,52 @@ export declare const BUNDLE_FILE_SCHEMAS: {
348
394
  equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
349
395
  }, z.core.$strict>>;
350
396
  isLive: z.ZodOptional<z.ZodBoolean>;
397
+ }, z.core.$strict>, z.ZodObject<{
398
+ type: z.ZodLiteral<"entity">;
399
+ domains: z.ZodOptional<z.ZodArray<z.ZodEnum<{
400
+ number: "number";
401
+ cover: "cover";
402
+ lock: "lock";
403
+ media_player: "media_player";
404
+ camera: "camera";
405
+ button: "button";
406
+ update: "update";
407
+ lawn_mower: "lawn_mower";
408
+ select: "select";
409
+ vacuum: "vacuum";
410
+ fan: "fan";
411
+ image: "image";
412
+ custom: "custom";
413
+ alias: "alias";
414
+ switch: "switch";
415
+ light: "light";
416
+ binary_sensor: "binary_sensor";
417
+ climate: "climate";
418
+ sensor: "sensor";
419
+ device_tracker: "device_tracker";
420
+ geo_location: "geo_location";
421
+ }>>>;
422
+ key: z.ZodString;
423
+ label: z.ZodString;
424
+ help: z.ZodOptional<z.ZodString>;
425
+ isRequired: z.ZodDefault<z.ZodBoolean>;
426
+ shownWhen: z.ZodOptional<z.ZodObject<{
427
+ key: z.ZodString;
428
+ equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
429
+ }, z.core.$strict>>;
430
+ isLive: z.ZodOptional<z.ZodBoolean>;
431
+ }, z.core.$strict>, z.ZodObject<{
432
+ type: z.ZodLiteral<"icon">;
433
+ default: z.ZodOptional<z.ZodString>;
434
+ key: z.ZodString;
435
+ label: z.ZodString;
436
+ help: z.ZodOptional<z.ZodString>;
437
+ isRequired: z.ZodDefault<z.ZodBoolean>;
438
+ shownWhen: z.ZodOptional<z.ZodObject<{
439
+ key: z.ZodString;
440
+ equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
441
+ }, z.core.$strict>>;
442
+ isLive: z.ZodOptional<z.ZodBoolean>;
351
443
  }, z.core.$strict>], "type">>>;
352
444
  }, z.core.$strict>>;
353
445
  polling: z.ZodOptional<z.ZodObject<{
@@ -423,6 +515,9 @@ export declare const BUNDLE_FILE_SCHEMAS: {
423
515
  lawn_mower: "lawn_mower";
424
516
  select: "select";
425
517
  vacuum: "vacuum";
518
+ fan: "fan";
519
+ device_tracker: "device_tracker";
520
+ geo_location: "geo_location";
426
521
  image: "image";
427
522
  custom: "custom";
428
523
  alias: "alias";
@@ -433,17 +528,8 @@ export declare const BUNDLE_FILE_SCHEMAS: {
433
528
  capabilities: z.ZodRecord<z.ZodEnum<{
434
529
  number: "number";
435
530
  custom: "custom";
436
- image: "image";
437
- level: "level";
438
- on_off: "on_off";
439
- color_hs: "color_hs";
440
- color_temp: "color_temp";
441
531
  cover: "cover";
442
532
  lock: "lock";
443
- thermostat: "thermostat";
444
- sensor_numeric: "sensor_numeric";
445
- sensor_binary: "sensor_binary";
446
- sensor_text: "sensor_text";
447
533
  media_player: "media_player";
448
534
  camera: "camera";
449
535
  button: "button";
@@ -451,6 +537,18 @@ export declare const BUNDLE_FILE_SCHEMAS: {
451
537
  lawn_mower: "lawn_mower";
452
538
  select: "select";
453
539
  vacuum: "vacuum";
540
+ fan: "fan";
541
+ image: "image";
542
+ level: "level";
543
+ on_off: "on_off";
544
+ color_hs: "color_hs";
545
+ color_temp: "color_temp";
546
+ effect: "effect";
547
+ thermostat: "thermostat";
548
+ sensor_numeric: "sensor_numeric";
549
+ sensor_binary: "sensor_binary";
550
+ sensor_text: "sensor_text";
551
+ location: "location";
454
552
  }> & z.core.$partial, z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
455
553
  state: z.ZodRecord<z.ZodEnum<{
456
554
  number: "number";
@@ -458,6 +556,7 @@ export declare const BUNDLE_FILE_SCHEMAS: {
458
556
  level: "level";
459
557
  color_hs: "color_hs";
460
558
  color_temp: "color_temp";
559
+ effect: "effect";
461
560
  cover: "cover";
462
561
  lock: "lock";
463
562
  thermostat: "thermostat";
@@ -471,6 +570,8 @@ export declare const BUNDLE_FILE_SCHEMAS: {
471
570
  lawn_mower: "lawn_mower";
472
571
  select: "select";
473
572
  vacuum: "vacuum";
573
+ fan: "fan";
574
+ location: "location";
474
575
  image: "image";
475
576
  custom: "custom";
476
577
  }> & z.core.$partial, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -591,8 +692,8 @@ export declare const BUNDLE_FILE_SCHEMAS: {
591
692
  }, z.core.$strict>>;
592
693
  bluetoothProxy: z.ZodOptional<z.ZodObject<{
593
694
  modes: z.ZodArray<z.ZodEnum<{
594
- passive: "passive";
595
695
  active: "active";
696
+ passive: "passive";
596
697
  }>>;
597
698
  }, z.core.$strict>>;
598
699
  }, z.core.$strict>;
@@ -1039,6 +1140,52 @@ export declare const BUNDLE_FILE_SCHEMAS: {
1039
1140
  equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
1040
1141
  }, z.core.$strict>>;
1041
1142
  isLive: z.ZodOptional<z.ZodBoolean>;
1143
+ }, z.core.$strict>, z.ZodObject<{
1144
+ type: z.ZodLiteral<"entity">;
1145
+ domains: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1146
+ number: "number";
1147
+ cover: "cover";
1148
+ lock: "lock";
1149
+ media_player: "media_player";
1150
+ camera: "camera";
1151
+ button: "button";
1152
+ update: "update";
1153
+ lawn_mower: "lawn_mower";
1154
+ select: "select";
1155
+ vacuum: "vacuum";
1156
+ fan: "fan";
1157
+ image: "image";
1158
+ custom: "custom";
1159
+ alias: "alias";
1160
+ switch: "switch";
1161
+ light: "light";
1162
+ binary_sensor: "binary_sensor";
1163
+ climate: "climate";
1164
+ sensor: "sensor";
1165
+ device_tracker: "device_tracker";
1166
+ geo_location: "geo_location";
1167
+ }>>>;
1168
+ key: z.ZodString;
1169
+ label: z.ZodString;
1170
+ help: z.ZodOptional<z.ZodString>;
1171
+ isRequired: z.ZodDefault<z.ZodBoolean>;
1172
+ shownWhen: z.ZodOptional<z.ZodObject<{
1173
+ key: z.ZodString;
1174
+ equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
1175
+ }, z.core.$strict>>;
1176
+ isLive: z.ZodOptional<z.ZodBoolean>;
1177
+ }, z.core.$strict>, z.ZodObject<{
1178
+ type: z.ZodLiteral<"icon">;
1179
+ default: z.ZodOptional<z.ZodString>;
1180
+ key: z.ZodString;
1181
+ label: z.ZodString;
1182
+ help: z.ZodOptional<z.ZodString>;
1183
+ isRequired: z.ZodDefault<z.ZodBoolean>;
1184
+ shownWhen: z.ZodOptional<z.ZodObject<{
1185
+ key: z.ZodString;
1186
+ equals: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
1187
+ }, z.core.$strict>>;
1188
+ isLive: z.ZodOptional<z.ZodBoolean>;
1042
1189
  }, z.core.$strict>], "type">>>;
1043
1190
  }, z.core.$strict>;
1044
1191
  identity: z.ZodString;
@@ -1050,8 +1197,8 @@ export declare const BUNDLE_FILE_SCHEMAS: {
1050
1197
  port: z.ZodDefault<z.ZodInt>;
1051
1198
  unitId: z.ZodDefault<z.ZodInt>;
1052
1199
  wordOrder: z.ZodDefault<z.ZodEnum<{
1053
- high: "high";
1054
1200
  low: "low";
1201
+ high: "high";
1055
1202
  }>>;
1056
1203
  pollSeconds: z.ZodDefault<z.ZodInt>;
1057
1204
  entities: z.ZodArray<z.ZodObject<{
@@ -1060,22 +1207,22 @@ export declare const BUNDLE_FILE_SCHEMAS: {
1060
1207
  icon: z.ZodOptional<z.ZodString>;
1061
1208
  domain: z.ZodEnum<{
1062
1209
  number: "number";
1063
- button: "button";
1064
- select: "select";
1065
- switch: "switch";
1066
1210
  light: "light";
1067
- binary_sensor: "binary_sensor";
1211
+ switch: "switch";
1068
1212
  sensor: "sensor";
1213
+ binary_sensor: "binary_sensor";
1214
+ button: "button";
1215
+ select: "select";
1069
1216
  }>;
1070
1217
  capabilities: z.ZodRecord<z.ZodEnum<{
1071
1218
  number: "number";
1219
+ button: "button";
1220
+ select: "select";
1072
1221
  level: "level";
1073
1222
  on_off: "on_off";
1074
1223
  sensor_numeric: "sensor_numeric";
1075
1224
  sensor_binary: "sensor_binary";
1076
1225
  sensor_text: "sensor_text";
1077
- button: "button";
1078
- select: "select";
1079
1226
  }> & z.core.$partial, z.ZodObject<{
1080
1227
  read: z.ZodOptional<z.ZodObject<{
1081
1228
  function: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as CapabilityName, C as TransportRequest, D as BluetoothAdvert, E as EntityId, O as BluetoothAdvertInput, S as Discovered, T as SerialLine, _ as UdpPeer, a as LoadedListenSource, b as Integration, c as SightingIdentity, d as BundleSdk, f as ManagedSocketClose, g as PlatformServices, h as ManagedUdpSocketOptions, i as LoadedDiscovery, j as CapabilityState, k as JsonObject, m as ManagedSocketOptions, n as LoadedAccount, o as LoadedVendor, p as ManagedSocketHeaders, r as LoadedBundle, s as Association, t as BundleFailure, u as BluetoothScannerOptions, v as Claim, w as TransportSubscription, x as ReportedState, y as DeviceDescriptor } from "./chunks/node-index.js";
1
+ import { A as EntityId, C as ReportedState, D as SerialLine, E as TransportSubscription, M as CapabilityState, N as JsonObject, O as BluetoothAdvert, S as PastReadings, T as TransportRequest, _ as UdpPeer, a as LoadedListenSource, b as HistoryRange, c as SightingIdentity, d as BundleSdk, f as ManagedSocketClose, g as PlatformServices, h as ManagedUdpSocketOptions, i as LoadedDiscovery, j as CapabilityName, k as BluetoothAdvertInput, m as ManagedSocketOptions, n as LoadedAccount, o as LoadedVendor, p as ManagedSocketHeaders, r as LoadedBundle, s as Association, t as BundleFailure, u as BluetoothScannerOptions, v as Claim, w as Discovered, x as Integration, y as DeviceDescriptor } from "./chunks/node-index.js";
2
2
  //#region src/testing/fake-sdk.d.ts
3
3
  /** The levels a bundle may log at. */
4
4
  type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
@@ -219,6 +219,21 @@ type DriverHarness = {
219
219
  * @returns Every request the command made; the last one unanswered when `answers` ran out.
220
220
  */
221
221
  converse: (entityId: string, capability: CapabilityName, command: JsonObject, answers: readonly unknown[]) => TransportRequest[];
222
+ /**
223
+ * Imports a device's past, as the hub does once it is added, for a driver with `history`: the
224
+ * request the transport would be sent, and the readings the driver reads from its answer. No
225
+ * state changes.
226
+ *
227
+ * @param range - From when and until when, ISO 8601.
228
+ * @param answer - What the transport answers the request.
229
+ * @param deviceKey - Which device; the one added last when not said.
230
+ * @returns The request, and the readings of each entity.
231
+ * @throws {Error} When the driver imports no past.
232
+ */
233
+ importHistory: (range: HistoryRange, answer: unknown, deviceKey?: string) => {
234
+ request: TransportRequest;
235
+ readings: PastReadings[];
236
+ };
222
237
  /**
223
238
  * The last state an entity reported.
224
239
  *
package/dist/testing.js CHANGED
@@ -183,6 +183,24 @@ function driverHarness(driver, settings = {}) {
183
183
  return requests;
184
184
  },
185
185
  /**
186
+ * Imports a device's past.
187
+ *
188
+ * @param range - From when and until when.
189
+ * @param answer - The transport's answer.
190
+ * @param deviceKey - Which device.
191
+ * @returns The request and the readings.
192
+ * @throws {Error} When the driver imports no past, or no device was added.
193
+ */
194
+ importHistory: (range, answer, deviceKey) => {
195
+ const { history } = integration;
196
+ if (history === void 0) throw new Error(`${integration.id} imports no past: it has no history`);
197
+ const context = contextFor(deviceOf(deviceKey));
198
+ return {
199
+ request: history.request(range, context),
200
+ readings: history.toReadings(answer, context)
201
+ };
202
+ },
203
+ /**
186
204
  * The last state an entity reported.
187
205
  *
188
206
  * @param entityId - The entity.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebulahome/integration-sdk",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Write a NebulaHome integration: check it, build it, test it and release it for the platform.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -62,10 +62,10 @@
62
62
  "tsdown": "^0.23.0",
63
63
  "typescript": "^6.0.3",
64
64
  "vitest": "^4.1.11",
65
- "@nebulahome/package-runtime": "2026.10.0-alpha.40",
66
- "@nebulahome/contracts": "2026.10.0-alpha.40",
67
- "@nebulahome/tsconfig": "2026.10.0-alpha.40",
68
- "@nebulahome/eslint-config": "2026.10.0-alpha.40"
65
+ "@nebulahome/contracts": "2026.10.0-alpha.69",
66
+ "@nebulahome/eslint-config": "2026.10.0-alpha.69",
67
+ "@nebulahome/package-runtime": "2026.10.0-alpha.69",
68
+ "@nebulahome/tsconfig": "2026.10.0-alpha.69"
69
69
  },
70
70
  "scripts": {
71
71
  "build": "tsdown && node scripts/build-schemas.js",
@@ -566,6 +566,173 @@
566
566
  "type"
567
567
  ],
568
568
  "additionalProperties": false
569
+ },
570
+ {
571
+ "type": "object",
572
+ "properties": {
573
+ "key": {
574
+ "type": "string",
575
+ "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
576
+ },
577
+ "label": {
578
+ "type": "string",
579
+ "minLength": 1,
580
+ "maxLength": 64
581
+ },
582
+ "help": {
583
+ "type": "string",
584
+ "maxLength": 256
585
+ },
586
+ "isRequired": {
587
+ "default": false,
588
+ "type": "boolean"
589
+ },
590
+ "shownWhen": {
591
+ "type": "object",
592
+ "properties": {
593
+ "key": {
594
+ "type": "string",
595
+ "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
596
+ },
597
+ "equals": {
598
+ "minItems": 1,
599
+ "maxItems": 64,
600
+ "type": "array",
601
+ "items": {
602
+ "anyOf": [
603
+ {
604
+ "type": "string",
605
+ "minLength": 1,
606
+ "maxLength": 64
607
+ },
608
+ {
609
+ "type": "boolean"
610
+ }
611
+ ]
612
+ }
613
+ }
614
+ },
615
+ "required": [
616
+ "key",
617
+ "equals"
618
+ ],
619
+ "additionalProperties": false
620
+ },
621
+ "isLive": {
622
+ "type": "boolean"
623
+ },
624
+ "type": {
625
+ "type": "string",
626
+ "const": "entity"
627
+ },
628
+ "domains": {
629
+ "minItems": 1,
630
+ "maxItems": 21,
631
+ "type": "array",
632
+ "items": {
633
+ "type": "string",
634
+ "enum": [
635
+ "light",
636
+ "switch",
637
+ "sensor",
638
+ "binary_sensor",
639
+ "cover",
640
+ "lock",
641
+ "climate",
642
+ "media_player",
643
+ "camera",
644
+ "button",
645
+ "update",
646
+ "lawn_mower",
647
+ "select",
648
+ "number",
649
+ "vacuum",
650
+ "fan",
651
+ "device_tracker",
652
+ "geo_location",
653
+ "image",
654
+ "custom",
655
+ "alias"
656
+ ]
657
+ }
658
+ }
659
+ },
660
+ "required": [
661
+ "key",
662
+ "label",
663
+ "type"
664
+ ],
665
+ "additionalProperties": false
666
+ },
667
+ {
668
+ "type": "object",
669
+ "properties": {
670
+ "key": {
671
+ "type": "string",
672
+ "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
673
+ },
674
+ "label": {
675
+ "type": "string",
676
+ "minLength": 1,
677
+ "maxLength": 64
678
+ },
679
+ "help": {
680
+ "type": "string",
681
+ "maxLength": 256
682
+ },
683
+ "isRequired": {
684
+ "default": false,
685
+ "type": "boolean"
686
+ },
687
+ "shownWhen": {
688
+ "type": "object",
689
+ "properties": {
690
+ "key": {
691
+ "type": "string",
692
+ "pattern": "^[a-z][A-Za-z0-9]{0,63}$"
693
+ },
694
+ "equals": {
695
+ "minItems": 1,
696
+ "maxItems": 64,
697
+ "type": "array",
698
+ "items": {
699
+ "anyOf": [
700
+ {
701
+ "type": "string",
702
+ "minLength": 1,
703
+ "maxLength": 64
704
+ },
705
+ {
706
+ "type": "boolean"
707
+ }
708
+ ]
709
+ }
710
+ }
711
+ },
712
+ "required": [
713
+ "key",
714
+ "equals"
715
+ ],
716
+ "additionalProperties": false
717
+ },
718
+ "isLive": {
719
+ "type": "boolean"
720
+ },
721
+ "type": {
722
+ "type": "string",
723
+ "const": "icon"
724
+ },
725
+ "default": {
726
+ "type": "string",
727
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
728
+ }
729
+ },
730
+ "required": [
731
+ "key",
732
+ "label",
733
+ "type"
734
+ ],
735
+ "additionalProperties": false
569
736
  }
570
737
  ]
571
738
  }
@@ -372,6 +372,9 @@
372
372
  "select",
373
373
  "number",
374
374
  "vacuum",
375
+ "fan",
376
+ "device_tracker",
377
+ "geo_location",
375
378
  "image",
376
379
  "custom",
377
380
  "alias"
@@ -399,6 +402,7 @@
399
402
  "level",
400
403
  "color_hs",
401
404
  "color_temp",
405
+ "effect",
402
406
  "cover",
403
407
  "lock",
404
408
  "thermostat",
@@ -413,6 +417,8 @@
413
417
  "select",
414
418
  "number",
415
419
  "vacuum",
420
+ "fan",
421
+ "location",
416
422
  "image",
417
423
  "custom"
418
424
  ]
@@ -436,6 +442,7 @@
436
442
  "level",
437
443
  "color_hs",
438
444
  "color_temp",
445
+ "effect",
439
446
  "cover",
440
447
  "lock",
441
448
  "thermostat",
@@ -450,6 +457,8 @@
450
457
  "select",
451
458
  "number",
452
459
  "vacuum",
460
+ "fan",
461
+ "location",
453
462
  "image",
454
463
  "custom"
455
464
  ]
@@ -863,7 +872,7 @@
863
872
  "type": "object",
864
873
  "propertyNames": {
865
874
  "type": "string",
866
- "pattern": "^(?:on_off|level|color_hs|color_temp|cover|lock|thermostat|sensor_numeric|sensor_binary|sensor_text|media_player|camera|button|update|lawn_mower|select|number|vacuum|image|custom)[.][a-z][a-z0-9_]*$"
875
+ "pattern": "^(?:on_off|level|color_hs|color_temp|effect|cover|lock|thermostat|sensor_numeric|sensor_binary|sensor_text|media_player|camera|button|update|lawn_mower|select|number|vacuum|fan|location|image|custom)[.][a-z][a-z0-9_]*$"
867
876
  },
868
877
  "additionalProperties": {
869
878
  "type": "object",