@camstack/addon-export-hap 1.2.183 → 1.2.185

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.
@@ -49,7 +49,7 @@ let node_fs_promises = require("node:fs/promises");
49
49
  node_fs_promises = __toESM(node_fs_promises, 1);
50
50
  let node_events = require("node:events");
51
51
  let node_dgram = require("node:dgram");
52
- //#region ../types/dist/event-category-CT-hz5Rb.mjs
52
+ //#region ../types/dist/event-category-DmZDPDf_.mjs
53
53
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
54
54
  EventCategory["SystemBoot"] = "system.boot";
55
55
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -676,7 +676,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
676
676
  * (a track was promoted to a stationary-registry entry) or departs (the
677
677
  * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
678
678
  * the dedicated "Stationary" section — never the live event feed. Payload:
679
- * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
679
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
680
680
  */
681
681
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
682
682
  /**
@@ -814,6 +814,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
814
814
  */
815
815
  EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
816
816
  /**
817
+ * An action run started or ended. Emitted by the `actions` surface.
818
+ * Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
819
+ */
820
+ EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
821
+ /**
817
822
  * Progress update from a running model conversion job.
818
823
  * Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
819
824
  * Emitted by `addon-model-studio` on the converting node.
@@ -5492,7 +5497,7 @@ var ZodIssueCode = {
5492
5497
  var ZodFirstPartyTypeKind;
5493
5498
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5494
5499
  //#endregion
5495
- //#region ../types/dist/sleep-bykKrTgu.mjs
5500
+ //#region ../types/dist/sleep-Crlmu_tO.mjs
5496
5501
  /**
5497
5502
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5498
5503
  * window to float samples (D455).
@@ -8600,6 +8605,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
8600
8605
  /** Every capability name, so addon code can check a name without the schema graph. */
8601
8606
  var CAP_NAMES = Object.freeze([
8602
8607
  "accessories",
8608
+ "action-source",
8609
+ "actions",
8603
8610
  "addon-pages",
8604
8611
  "addon-pages-source",
8605
8612
  "addon-routes",
@@ -8673,6 +8680,7 @@ var CAP_NAMES = Object.freeze([
8673
8680
  "filesystem-browse",
8674
8681
  "flood",
8675
8682
  "gas",
8683
+ "group-active",
8676
8684
  "group-commands",
8677
8685
  "group-status",
8678
8686
  "heating-valve",
@@ -8695,6 +8703,7 @@ var CAP_NAMES = Object.freeze([
8695
8703
  "login-method",
8696
8704
  "media-player",
8697
8705
  "mesh-network",
8706
+ "meter",
8698
8707
  "metrics-provider",
8699
8708
  "model-convert",
8700
8709
  "model-distributor",
@@ -8786,11 +8795,11 @@ var CAP_NAMES = Object.freeze([
8786
8795
  Object.freeze({
8787
8796
  "air-quality-sensor": [
8788
8797
  {
8789
- "path": "co2Ppm",
8798
+ "path": "co2",
8790
8799
  "valueType": "number"
8791
8800
  },
8792
8801
  {
8793
- "path": "vocPpb",
8802
+ "path": "voc",
8794
8803
  "valueType": "number"
8795
8804
  },
8796
8805
  {
@@ -8840,7 +8849,7 @@ Object.freeze({
8840
8849
  }
8841
8850
  ],
8842
8851
  "ambient-light-sensor": [{
8843
- "path": "lux",
8852
+ "path": "illuminance",
8844
8853
  "valueType": "number"
8845
8854
  }],
8846
8855
  "audio-metrics": [
@@ -8901,7 +8910,7 @@ Object.freeze({
8901
8910
  ],
8902
8911
  "battery": [
8903
8912
  {
8904
- "path": "percentage",
8913
+ "path": "level",
8905
8914
  "valueType": "number"
8906
8915
  },
8907
8916
  {
@@ -8923,7 +8932,7 @@ Object.freeze({
8923
8932
  "valueType": "number"
8924
8933
  },
8925
8934
  {
8926
- "path": "volts",
8935
+ "path": "voltage",
8927
8936
  "valueType": "number"
8928
8937
  },
8929
8938
  {
@@ -8944,7 +8953,7 @@ Object.freeze({
8944
8953
  "valueType": "boolean"
8945
8954
  }],
8946
8955
  "brightness": [{
8947
- "path": "percentage",
8956
+ "path": "level",
8948
8957
  "valueType": "number"
8949
8958
  }],
8950
8959
  "broker": [{
@@ -9145,7 +9154,7 @@ Object.freeze({
9145
9154
  "valueType": "number"
9146
9155
  },
9147
9156
  {
9148
- "path": "mireds",
9157
+ "path": "colorTemperature",
9149
9158
  "valueType": "number"
9150
9159
  }
9151
9160
  ],
@@ -9324,15 +9333,15 @@ Object.freeze({
9324
9333
  "valueType": "string"
9325
9334
  },
9326
9335
  {
9327
- "path": "remainingSeconds",
9336
+ "path": "remaining",
9328
9337
  "valueType": "number"
9329
9338
  },
9330
9339
  {
9331
- "path": "delayedStartSeconds",
9340
+ "path": "delayedStart",
9332
9341
  "valueType": "number"
9333
9342
  },
9334
9343
  {
9335
- "path": "progressPercent",
9344
+ "path": "progress",
9336
9345
  "valueType": "number"
9337
9346
  },
9338
9347
  {
@@ -9446,7 +9455,7 @@ Object.freeze({
9446
9455
  ],
9447
9456
  "fan-control": [
9448
9457
  {
9449
- "path": "percentage",
9458
+ "path": "speed",
9450
9459
  "valueType": "number"
9451
9460
  },
9452
9461
  {
@@ -9493,6 +9502,10 @@ Object.freeze({
9493
9502
  "path": "detected",
9494
9503
  "valueType": "boolean"
9495
9504
  }],
9505
+ "group-active": [{
9506
+ "path": "active",
9507
+ "valueType": "boolean"
9508
+ }],
9496
9509
  "group-status": [
9497
9510
  {
9498
9511
  "path": "included",
@@ -9542,7 +9555,7 @@ Object.freeze({
9542
9555
  }
9543
9556
  ],
9544
9557
  "humidity-sensor": [{
9545
- "path": "percent",
9558
+ "path": "humidity",
9546
9559
  "valueType": "number"
9547
9560
  }],
9548
9561
  "image": [{
@@ -9652,7 +9665,7 @@ Object.freeze({
9652
9665
  "valueType": "number"
9653
9666
  },
9654
9667
  {
9655
- "path": "progressPercent",
9668
+ "path": "progress",
9656
9669
  "valueType": "number"
9657
9670
  },
9658
9671
  {
@@ -9731,11 +9744,11 @@ Object.freeze({
9731
9744
  "valueType": "string"
9732
9745
  },
9733
9746
  {
9734
- "path": "positionMs",
9747
+ "path": "position",
9735
9748
  "valueType": "number"
9736
9749
  },
9737
9750
  {
9738
- "path": "durationMs",
9751
+ "path": "duration",
9739
9752
  "valueType": "number"
9740
9753
  },
9741
9754
  {
@@ -9752,6 +9765,10 @@ Object.freeze({
9752
9765
  ]
9753
9766
  }
9754
9767
  ],
9768
+ "meter": [{
9769
+ "path": "value",
9770
+ "valueType": "number"
9771
+ }],
9755
9772
  "motion": [
9756
9773
  {
9757
9774
  "path": "detected",
@@ -9833,11 +9850,11 @@ Object.freeze({
9833
9850
  ]
9834
9851
  },
9835
9852
  {
9836
- "path": "signalPercent",
9853
+ "path": "signal",
9837
9854
  "valueType": "number"
9838
9855
  },
9839
9856
  {
9840
- "path": "rssiDbm",
9857
+ "path": "rssi",
9841
9858
  "valueType": "number"
9842
9859
  },
9843
9860
  {
@@ -9892,6 +9909,18 @@ Object.freeze({
9892
9909
  "path": "foodLevel",
9893
9910
  "valueType": "number"
9894
9911
  },
9912
+ {
9913
+ "path": "bowlFood",
9914
+ "valueType": "number"
9915
+ },
9916
+ {
9917
+ "path": "eating",
9918
+ "valueType": "boolean"
9919
+ },
9920
+ {
9921
+ "path": "supportsMarkRefilled",
9922
+ "valueType": "boolean"
9923
+ },
9895
9924
  {
9896
9925
  "path": "food1",
9897
9926
  "valueType": "number"
@@ -9956,23 +9985,23 @@ Object.freeze({
9956
9985
  ],
9957
9986
  "power-meter": [
9958
9987
  {
9959
- "path": "watts",
9988
+ "path": "power",
9960
9989
  "valueType": "number"
9961
9990
  },
9962
9991
  {
9963
- "path": "kwhTotal",
9992
+ "path": "energy",
9964
9993
  "valueType": "number"
9965
9994
  },
9966
9995
  {
9967
- "path": "volts",
9996
+ "path": "voltage",
9968
9997
  "valueType": "number"
9969
9998
  },
9970
9999
  {
9971
- "path": "amps",
10000
+ "path": "current",
9972
10001
  "valueType": "number"
9973
10002
  },
9974
10003
  {
9975
- "path": "va",
10004
+ "path": "apparentPower",
9976
10005
  "valueType": "number"
9977
10006
  },
9978
10007
  {
@@ -10000,14 +10029,10 @@ Object.freeze({
10000
10029
  {
10001
10030
  "path": "gps.accuracyMeters",
10002
10031
  "valueType": "number"
10003
- },
10004
- {
10005
- "path": "batteryPercent",
10006
- "valueType": "number"
10007
10032
  }
10008
10033
  ],
10009
10034
  "pressure-sensor": [{
10010
- "path": "hpa",
10035
+ "path": "pressure",
10011
10036
  "valueType": "number"
10012
10037
  }],
10013
10038
  "privacy-mask": [{
@@ -10321,7 +10346,7 @@ Object.freeze({
10321
10346
  "valueType": "boolean"
10322
10347
  }],
10323
10348
  "temperature-sensor": [{
10324
- "path": "celsius",
10349
+ "path": "temperature",
10325
10350
  "valueType": "number"
10326
10351
  }],
10327
10352
  "update": [
@@ -10369,7 +10394,7 @@ Object.freeze({
10369
10394
  "valueType": "string"
10370
10395
  },
10371
10396
  {
10372
- "path": "progressPercent",
10397
+ "path": "progress",
10373
10398
  "valueType": "number"
10374
10399
  },
10375
10400
  {
@@ -10854,7 +10879,7 @@ function errMsg$16(err) {
10854
10879
  return String(err);
10855
10880
  }
10856
10881
  //#endregion
10857
- //#region ../types/dist/composition-B2rw5L29.mjs
10882
+ //#region ../types/dist/composition-CZImLpOI.mjs
10858
10883
  var AUDIO_ENCODER_BY_CODEC = {
10859
10884
  opus: "libopus",
10860
10885
  aac: "aac",
@@ -11764,6 +11789,13 @@ var table = {
11764
11789
  apply: () => {
11765
11790
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11766
11791
  }
11792
+ },
11793
+ schmitt: {
11794
+ minArgs: 3,
11795
+ maxArgs: 5,
11796
+ apply: () => {
11797
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11798
+ }
11767
11799
  }
11768
11800
  };
11769
11801
  Object.freeze(Object.assign(Object.create(null), table));
@@ -12225,6 +12257,79 @@ var APPLIANCE_KINDS = [
12225
12257
  ];
12226
12258
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
12227
12259
  /**
12260
+ * Statistics and integrals over a history read (D944).
12261
+ *
12262
+ * Pure: the same points always give the same answer, so a restart recomputes
12263
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
12264
+ * never the mean of the samples. A hole with no held value is not integrated
12265
+ * as zero. A truncated read is not published.
12266
+ */
12267
+ var STATISTIC_STATS = [
12268
+ "min",
12269
+ "max",
12270
+ "mean",
12271
+ "sum",
12272
+ "count",
12273
+ "change"
12274
+ ];
12275
+ /**
12276
+ * The range a statistics or integral helper asks history for (D944).
12277
+ *
12278
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
12279
+ * or 25 hours across a DST change. A tier is eligible only when its retention
12280
+ * is strictly longer than the longest that range can be. Forever qualifies.
12281
+ * Equal to a tier's retention is a refusal, not a short answer.
12282
+ */
12283
+ var MINUTE_MS = 6e4;
12284
+ var HOUR_MS = 60 * MINUTE_MS;
12285
+ var DAY_MS = 24 * HOUR_MS;
12286
+ var ROLLING_SPANS = [
12287
+ "1h",
12288
+ "24h",
12289
+ "2d",
12290
+ "7d",
12291
+ "30d",
12292
+ "custom"
12293
+ ];
12294
+ var CALENDAR_PERIODS = [
12295
+ "today",
12296
+ "yesterday",
12297
+ "this-week",
12298
+ "this-month"
12299
+ ];
12300
+ var RESET_PERIODS = [
12301
+ "never",
12302
+ "daily",
12303
+ "weekly",
12304
+ "monthly"
12305
+ ];
12306
+ 5 * MINUTE_MS;
12307
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
12308
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
12309
+ var rollingWindowObject = object({
12310
+ kind: literal("rolling"),
12311
+ span: _enum(ROLLING_SPANS),
12312
+ customMinutes: number().int().min(5).optional()
12313
+ }).check((payload) => {
12314
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
12315
+ code: "custom",
12316
+ message: "a custom range needs a duration in minutes",
12317
+ path: ["customMinutes"],
12318
+ input: payload.value
12319
+ });
12320
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
12321
+ code: "custom",
12322
+ message: "only a custom range carries a duration",
12323
+ path: ["customMinutes"],
12324
+ input: payload.value
12325
+ });
12326
+ });
12327
+ var RollingWindowSchema = rollingWindowObject;
12328
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
12329
+ kind: literal("calendar"),
12330
+ period: _enum(CALENDAR_PERIODS)
12331
+ })]);
12332
+ /**
12228
12333
  * A composition source identity: `(addonId, stableId)`, never a numeric device
12229
12334
  * id. Split out so helper schemas can name it without a cycle through
12230
12335
  * `composition.ts` (D659).
@@ -12250,7 +12355,13 @@ var GROUP_TEMPLATE_IDS = [
12250
12355
  "occupancy",
12251
12356
  "binary",
12252
12357
  "switch",
12253
- "light"
12358
+ "light",
12359
+ "fan",
12360
+ "cover",
12361
+ "valve",
12362
+ "lock",
12363
+ "media-player",
12364
+ "climate"
12254
12365
  ];
12255
12366
  var NUMERIC_AGGREGATES = [
12256
12367
  "mean",
@@ -12280,22 +12391,73 @@ var HelperMemberSchema = object({
12280
12391
  cap: string().min(1),
12281
12392
  fieldPath: string().min(1)
12282
12393
  });
12283
- var HelperSpecSchema = discriminatedUnion("kind", [object({
12284
- kind: literal("group"),
12285
- templateId: GroupTemplateIdSchema,
12286
- aggregate: AggregateReducerSchema,
12287
- members: array(HelperMemberSchema).min(1).max(64),
12288
- /** Actuator groups only. Readings leave this unset. */
12289
- active: ActiveCriterionSchema.optional()
12290
- }), object({
12291
- kind: literal("appliance"),
12292
- templateId: literal(APPLIANCE_TEMPLATE_ID),
12293
- appliance: _enum(APPLIANCE_KINDS),
12294
- thresholdWatts: number().positive(),
12295
- startDwellMs: number().int().nonnegative(),
12296
- stopDwellMs: number().int().nonnegative(),
12297
- member: HelperMemberSchema
12298
- })]);
12394
+ var HelperSpecSchema = discriminatedUnion("kind", [
12395
+ object({
12396
+ kind: literal("group"),
12397
+ templateId: GroupTemplateIdSchema,
12398
+ aggregate: AggregateReducerSchema,
12399
+ members: array(HelperMemberSchema).min(1).max(64),
12400
+ /** Actuator groups only. Readings leave this unset. */
12401
+ active: ActiveCriterionSchema.optional()
12402
+ }),
12403
+ object({
12404
+ kind: literal("appliance"),
12405
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
12406
+ appliance: _enum(APPLIANCE_KINDS),
12407
+ thresholdWatts: number().positive(),
12408
+ startDwellMs: number().int().nonnegative(),
12409
+ stopDwellMs: number().int().nonnegative(),
12410
+ member: HelperMemberSchema
12411
+ }),
12412
+ object({
12413
+ kind: literal("statistic"),
12414
+ stat: _enum(STATISTIC_STATS),
12415
+ window: StatisticWindowSchema,
12416
+ source: HelperMemberSchema
12417
+ }),
12418
+ object({
12419
+ kind: literal("integral"),
12420
+ reset: _enum(RESET_PERIODS),
12421
+ output: _enum(["energy", "meter"]),
12422
+ source: HelperMemberSchema
12423
+ }),
12424
+ object({
12425
+ kind: literal("threshold"),
12426
+ source: HelperMemberSchema,
12427
+ high: number(),
12428
+ low: number(),
12429
+ onForMs: number().int().nonnegative(),
12430
+ offForMs: number().int().nonnegative()
12431
+ }),
12432
+ object({
12433
+ kind: literal("arithmetic"),
12434
+ op: _enum([
12435
+ "sum",
12436
+ "difference",
12437
+ "ratio"
12438
+ ]),
12439
+ inputs: array(HelperMemberSchema).min(2).max(64)
12440
+ }),
12441
+ object({
12442
+ kind: literal("expression"),
12443
+ expr: string().min(1),
12444
+ inputs: array(object({
12445
+ name: string().min(1),
12446
+ member: HelperMemberSchema
12447
+ })).min(1).max(64),
12448
+ output: _enum(["number", "boolean"])
12449
+ }),
12450
+ object({
12451
+ kind: literal("derivative"),
12452
+ window: RollingWindowSchema,
12453
+ per: _enum([
12454
+ "second",
12455
+ "minute",
12456
+ "hour"
12457
+ ]),
12458
+ source: HelperMemberSchema
12459
+ })
12460
+ ]);
12299
12461
  /** A composed device's stableId is this prefix plus the block id. */
12300
12462
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12301
12463
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -12356,6 +12518,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12356
12518
  "all"
12357
12519
  ]),
12358
12520
  reads: array(CompositionFieldReadSchema).min(1).max(64),
12521
+ /**
12522
+ * Set when the reads are an enum state, not a yes/no: the listed states
12523
+ * count as active (a cover is `open`). A state outside the list is inactive;
12524
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
12525
+ */
12526
+ activeWhen: array(string().min(1)).min(1).optional(),
12359
12527
  /** `value` is the reading; the others are the member counts. */
12360
12528
  publish: _enum([
12361
12529
  "value",
@@ -12369,6 +12537,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12369
12537
  "omit",
12370
12538
  "offline"
12371
12539
  ])
12540
+ }),
12541
+ object({
12542
+ kind: literal("series"),
12543
+ read: CompositionFieldReadSchema,
12544
+ /** `value` is the statistic or the integral. The others are the gap counts. */
12545
+ publish: _enum([
12546
+ "value",
12547
+ "included",
12548
+ "excluded",
12549
+ "total"
12550
+ ]),
12551
+ /**
12552
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
12553
+ * device unseeded until history answers, so a restart cannot publish 0.
12554
+ */
12555
+ empty: _enum([
12556
+ "null",
12557
+ "omit",
12558
+ "offline"
12559
+ ])
12372
12560
  })
12373
12561
  ]);
12374
12562
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -16030,6 +16218,14 @@ var AutomationConditionLeafSchema = object({
16030
16218
  array(union([string(), number()]))
16031
16219
  ])
16032
16220
  });
16221
+ var AutomationConditionStationaryPresentSchema = object({
16222
+ kind: literal("stationary-present"),
16223
+ deviceId: number().int().nonnegative(),
16224
+ /** Class names; a macro class matches every raw class that maps to it. */
16225
+ classes: array(string().min(1)).min(1).optional(),
16226
+ /** The parked object must be in at least one of these zones. */
16227
+ zones: array(string().min(1)).min(1).optional()
16228
+ });
16033
16229
  /**
16034
16230
  * The expression leaf, declared as a plain object rather than an intersection
16035
16231
  * with {@link ExpressionSourceSchema}: a discriminated union has to be able to
@@ -16063,7 +16259,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
16063
16259
  child: AutomationConditionSchema
16064
16260
  }),
16065
16261
  AutomationConditionLeafSchema,
16066
- AutomationConditionExpressionSchema
16262
+ AutomationConditionExpressionSchema,
16263
+ AutomationConditionStationaryPresentSchema
16067
16264
  ]));
16068
16265
  /**
16069
16266
  * What starts a run.
@@ -16104,7 +16301,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
16104
16301
  kind: literal("schedule"),
16105
16302
  cron: string().min(1).max(120)
16106
16303
  }),
16107
- object({ kind: literal("manual") })
16304
+ object({ kind: literal("manual") }),
16305
+ object({
16306
+ kind: literal("detection"),
16307
+ /** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
16308
+ * matches every raw class that maps to it; any other name matches
16309
+ * exactly. */
16310
+ classes: array(string().min(1)).min(1),
16311
+ deviceIds: array(number().int().nonnegative()).min(1),
16312
+ /** The track must have visited at least one of these zones. */
16313
+ zones: array(string().min(1)).min(1).optional(),
16314
+ /** Best-so-far confidence the track must reach. */
16315
+ minScore: number().min(0).max(1).optional()
16316
+ }),
16317
+ object({
16318
+ kind: literal("stationary"),
16319
+ deviceIds: array(number().int().nonnegative()).min(1),
16320
+ /** Class names; a macro class matches like the detection trigger. */
16321
+ classes: array(string().min(1)).min(1).optional(),
16322
+ /** The parked object must be in at least one of these zones. */
16323
+ zones: array(string().min(1)).min(1).optional(),
16324
+ /** `appeared`: it became parked. `departed`: the registry retired it.
16325
+ * The vocabulary of `PipelineAnalyticsStationaryChanged`. */
16326
+ phase: _enum(["appeared", "departed"])
16327
+ }),
16328
+ object({
16329
+ kind: literal("interval"),
16330
+ minutes: number().int().min(1).max(1440)
16331
+ })
16108
16332
  ]);
16109
16333
  /**
16110
16334
  * One action step.
@@ -16124,28 +16348,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
16124
16348
  * is called. The runner still receives a number and is untouched; the
16125
16349
  * resolution is the recipe's job, not the runner's.
16126
16350
  */
16351
+ var AutomationWaitStepSchema = object({
16352
+ kind: literal("wait"),
16353
+ seconds: number().min(0).max(300)
16354
+ });
16355
+ var AutomationCapStepSchema = object({
16356
+ kind: literal("cap"),
16357
+ /**
16358
+ * One device, several same-family devices (locks / climate family / …),
16359
+ * or `{ $var }` for the device that triggered the run. An array is
16360
+ * fan-out at codegen — each id gets the same cap.method call.
16361
+ */
16362
+ deviceId: union([
16363
+ number().int(),
16364
+ array(number().int()).min(1),
16365
+ object({ $var: string().min(1) })
16366
+ ]),
16367
+ cap: string().min(1),
16368
+ method: string().min(1),
16369
+ /** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
16370
+ * SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
16371
+ * the expression leaf. */
16372
+ args: record(string(), unknown()).optional()
16373
+ });
16374
+ /**
16375
+ * The steps an internal Action may contain: cap and wait, and nothing that can
16376
+ * call back into an Action — so an Action can never reach itself (no cycles).
16377
+ */
16378
+ var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
16127
16379
  var AutomationActionSchema = discriminatedUnion("kind", [
16380
+ AutomationWaitStepSchema,
16381
+ AutomationCapStepSchema,
16128
16382
  object({
16129
- kind: literal("wait"),
16130
- seconds: number().min(0).max(300)
16131
- }),
16132
- object({
16133
- kind: literal("cap"),
16134
- /**
16135
- * One device, several same-family devices (locks / climate family / …),
16136
- * or `{ $var }` for the device that triggered the run. An array is
16137
- * fan-out at codegen — each id gets the same cap.method call.
16138
- */
16139
- deviceId: union([
16140
- number().int(),
16141
- array(number().int()).min(1),
16142
- object({ $var: string().min(1) })
16143
- ]),
16144
- cap: string().min(1),
16145
- method: string().min(1),
16146
- /** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
16147
- * evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
16148
- args: record(string(), unknown()).optional()
16383
+ kind: literal("action"),
16384
+ /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
16385
+ actionId: string().min(1),
16386
+ /** Values for the action's declared variables; the others take their default. */
16387
+ variables: record(string(), union([
16388
+ string(),
16389
+ number(),
16390
+ boolean()
16391
+ ])).optional()
16149
16392
  }),
16150
16393
  object({
16151
16394
  kind: literal("code"),
@@ -16154,10 +16397,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
16154
16397
  code: string().min(1).max(2e4)
16155
16398
  })
16156
16399
  ]);
16400
+ /**
16401
+ * How a trigger that arrives while the automation is busy (or cooling down) is
16402
+ * handled. One of the automation's execution modes, never a property of its
16403
+ * actions. Absent means `single`.
16404
+ *
16405
+ * - `single` — drop the trigger while a run is in progress (traced + logged).
16406
+ * - `restart` — abort the run in progress (at its next step boundary), start fresh.
16407
+ * - `queued` — queue up to `max` triggers, drop the rest (traced).
16408
+ * - `parallel` — up to `max` runs at once, drop the rest (traced).
16409
+ * - `cooldown` — `single`, and no new run until `minutes` after the last run
16410
+ * STARTED; persisted across a restart. A manual trigger bypasses only this
16411
+ * wait, never the single/queued limits.
16412
+ */
16413
+ var AutomationRunModeSchema = discriminatedUnion("mode", [
16414
+ object({ mode: literal("single") }),
16415
+ object({ mode: literal("restart") }),
16416
+ object({
16417
+ mode: literal("queued"),
16418
+ max: number().int().min(1).max(10)
16419
+ }),
16420
+ object({
16421
+ mode: literal("parallel"),
16422
+ max: number().int().min(1).max(10)
16423
+ }),
16424
+ object({
16425
+ mode: literal("cooldown"),
16426
+ minutes: number().int().min(1).max(1440)
16427
+ })
16428
+ ]);
16157
16429
  var AutomationRecipeSchema = object({
16158
16430
  triggers: array(AutomationTriggerSchema),
16159
16431
  conditions: AutomationConditionSchema.optional(),
16160
- actions: array(AutomationActionSchema)
16432
+ actions: array(AutomationActionSchema),
16433
+ runMode: AutomationRunModeSchema.optional(),
16434
+ /** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
16435
+ keepTraces: number().int().min(1).max(100).optional()
16436
+ });
16437
+ new Set([
16438
+ {
16439
+ id: "person",
16440
+ name: "Person"
16441
+ },
16442
+ {
16443
+ id: "vehicle",
16444
+ name: "Vehicle"
16445
+ },
16446
+ {
16447
+ id: "animal",
16448
+ name: "Animal"
16449
+ },
16450
+ {
16451
+ id: "package",
16452
+ name: "Package"
16453
+ }
16454
+ ].map((l) => l.id));
16455
+ var COCO_TO_MACRO = {
16456
+ mapping: {
16457
+ person: "person",
16458
+ bicycle: "vehicle",
16459
+ car: "vehicle",
16460
+ motorcycle: "vehicle",
16461
+ airplane: "vehicle",
16462
+ bus: "vehicle",
16463
+ train: "vehicle",
16464
+ truck: "vehicle",
16465
+ boat: "vehicle",
16466
+ bird: "animal",
16467
+ cat: "animal",
16468
+ dog: "animal",
16469
+ horse: "animal",
16470
+ sheep: "animal",
16471
+ cow: "animal",
16472
+ elephant: "animal",
16473
+ bear: "animal",
16474
+ zebra: "animal",
16475
+ giraffe: "animal",
16476
+ suitcase: "package",
16477
+ backpack: "package",
16478
+ handbag: "package"
16479
+ },
16480
+ preserveOriginal: false
16481
+ };
16482
+ new Set(Object.values(COCO_TO_MACRO.mapping));
16483
+ /**
16484
+ * Run traces — what an automation (or, later, an Action run) DID, node by node,
16485
+ * so the editor can paint every block green or red with its reason.
16486
+ *
16487
+ * A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
16488
+ * every condition node (containers and leaves, including the ones a
16489
+ * short-circuit never reached), the run-mode verdict and every action step —
16490
+ * each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
16491
+ * for an Action run). Skipped
16492
+ * evaluations are traced too, and identical consecutive skips collapse into a
16493
+ * repeat count so a trigger that fails every 5 minutes cannot flush real runs.
16494
+ *
16495
+ * {@link AutomationStepTraceSchema} is deliberately free of automation
16496
+ * vocabulary so an Action run records the same step shape.
16497
+ */
16498
+ /** A value a trace may show: JSON primitives and short lists, nothing deeper. */
16499
+ var TraceValueSchema = union([
16500
+ string(),
16501
+ number(),
16502
+ boolean(),
16503
+ _null(),
16504
+ array(union([string(), number()]))
16505
+ ]);
16506
+ var AutomationRunOutcomeSchema = _enum([
16507
+ "ran",
16508
+ "skipped-trigger",
16509
+ "skipped-conditions",
16510
+ "skipped-cooldown",
16511
+ "skipped-overlap",
16512
+ "failed",
16513
+ "aborted"
16514
+ ]);
16515
+ /** `not-evaluated` = a short-circuit never reached the node. */
16516
+ var TraceNodeOutcomeSchema = _enum([
16517
+ "pass",
16518
+ "fail",
16519
+ "not-evaluated"
16520
+ ]);
16521
+ var AutomationTriggerTraceSchema = object({
16522
+ kind: string().min(1),
16523
+ outcome: _enum(["pass", "fail"]),
16524
+ /** Why an event was rejected ("class person not in [dog]") or what fired. */
16525
+ reason: string(),
16526
+ /** deviceId, className, trackId, score … — only what the trigger exposes. */
16527
+ vars: record(string(), TraceValueSchema)
16528
+ });
16529
+ var AutomationConditionTraceNodeSchema = object({
16530
+ /** `conditions` for the root, `conditions.<i>` for its i-th child, … */
16531
+ path: string().min(1),
16532
+ kind: _enum([
16533
+ "all",
16534
+ "any",
16535
+ "not",
16536
+ "condition",
16537
+ "expression",
16538
+ "stationary-present"
16539
+ ]),
16540
+ outcome: TraceNodeOutcomeSchema,
16541
+ reason: string(),
16542
+ deviceId: number().int().optional(),
16543
+ cap: string().optional(),
16544
+ fieldPath: string().optional(),
16545
+ operator: string().optional(),
16546
+ expected: TraceValueSchema.optional(),
16547
+ /** What the mirror held; `null` when it held nothing (unknown). */
16548
+ observed: TraceValueSchema.optional()
16549
+ });
16550
+ var AutomationRunVerdictSchema = object({
16551
+ mode: AutomationRunModeSchema,
16552
+ decision: _enum([
16553
+ "run",
16554
+ "queued",
16555
+ "restart",
16556
+ "drop",
16557
+ "cooldown",
16558
+ "bypass"
16559
+ ]),
16560
+ reason: string()
16561
+ });
16562
+ /** One executed (or not-run) step — shared by automations and Action runs. */
16563
+ var AutomationStepTraceSchema = object({
16564
+ /** `actions.<i>` */
16565
+ path: string().min(1),
16566
+ kind: string().min(1),
16567
+ cap: string().optional(),
16568
+ method: string().optional(),
16569
+ deviceId: number().int().optional(),
16570
+ startedAt: number().optional(),
16571
+ endedAt: number().optional(),
16572
+ outcome: _enum([
16573
+ "ok",
16574
+ "error",
16575
+ "not-run"
16576
+ ]),
16577
+ message: string().optional()
16578
+ });
16579
+ var AutomationRunTraceSchema = object({
16580
+ runId: string().min(1),
16581
+ startedAt: number(),
16582
+ endedAt: number(),
16583
+ trigger: AutomationTriggerTraceSchema,
16584
+ conditions: array(AutomationConditionTraceNodeSchema),
16585
+ verdict: AutomationRunVerdictSchema.optional(),
16586
+ steps: array(AutomationStepTraceSchema),
16587
+ outcome: AutomationRunOutcomeSchema,
16588
+ /** How many identical consecutive skips this trace stands for (>= 1). */
16589
+ repeat: number().int().min(1),
16590
+ /** When the latest of those repeats happened. */
16591
+ lastAt: number()
16592
+ });
16593
+ /**
16594
+ * What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
16595
+ * `action:<actionId>`): the cooldown stamp and the trace ring.
16596
+ */
16597
+ var AutomationStateDocSchema = object({
16598
+ version: literal(1),
16599
+ lastRunStartedAt: number().nullable(),
16600
+ traces: array(AutomationRunTraceSchema)
16601
+ });
16602
+ /**
16603
+ * Actions — named, runnable things an operator (or an automation) can start,
16604
+ * declared as LIST ENTRIES, never as devices.
16605
+ *
16606
+ * An entry is either **internal** (a short list of cap/wait steps kept in the
16607
+ * hub's `actions` record kind) or declared by an addon through the
16608
+ * `action-source` collection (a Home Assistant script, a scene …). The one
16609
+ * surface the UI and automations talk to is the `actions` cap; it keeps no
16610
+ * catalog of its own (D3) — every `list` asks the providers live.
16611
+ *
16612
+ * This file is the data half: the entry schema, the variables an entry may
16613
+ * declare, and the pure resolution of the values a run was given. It holds no
16614
+ * runtime.
16615
+ */
16616
+ /** What a variable's value is. `select` takes one of `options`. */
16617
+ var ActionVariableTypeSchema = _enum([
16618
+ "string",
16619
+ "number",
16620
+ "boolean",
16621
+ "select"
16622
+ ]);
16623
+ var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
16624
+ var ActionVariableValueSchema = union([
16625
+ string(),
16626
+ number(),
16627
+ boolean()
16628
+ ]);
16629
+ /**
16630
+ * One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
16631
+ * value) or `{{vars.name}}` (inside a string) in their args.
16632
+ */
16633
+ var ActionVariableSchema = object({
16634
+ name: string().regex(ACTION_VARIABLE_NAME_RE),
16635
+ label: string().min(1).max(120).optional(),
16636
+ type: ActionVariableTypeSchema,
16637
+ required: boolean().optional(),
16638
+ default: ActionVariableValueSchema.optional(),
16639
+ /** The allowed values of a `select`. */
16640
+ options: array(string().min(1)).min(1).optional()
16641
+ }).superRefine((v, ctx) => {
16642
+ if (v.type === "select" && v.options === void 0) ctx.addIssue({
16643
+ code: "custom",
16644
+ message: "a select variable needs options",
16645
+ path: ["options"]
16646
+ });
16647
+ if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
16648
+ code: "custom",
16649
+ message: variableValueError(v, v.default) ?? "invalid default",
16650
+ path: ["default"]
16651
+ });
16652
+ });
16653
+ /** Why `value` is not a legal value for the variable, or null when it is. */
16654
+ function variableValueError(variable, value) {
16655
+ switch (variable.type) {
16656
+ case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
16657
+ case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
16658
+ case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
16659
+ case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
16660
+ }
16661
+ }
16662
+ var ActionSourceKindSchema = _enum(["internal", "addon"]);
16663
+ function isInternalActionId(actionId) {
16664
+ return actionId.startsWith("internal:") && actionId.length > 9;
16665
+ }
16666
+ /** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
16667
+ function addonIdOfActionId(actionId) {
16668
+ if (isInternalActionId(actionId)) return null;
16669
+ const at = actionId.indexOf(":");
16670
+ return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
16671
+ }
16672
+ var ActionStatusSchema = object({
16673
+ isRunning: boolean(),
16674
+ /** Ms epoch the latest run STARTED; null when it never ran. */
16675
+ lastRunAt: number().nullable(),
16676
+ /** The latest run's failure; null on success or when it never ran. */
16677
+ lastError: string().nullable()
16678
+ });
16679
+ var ActionEntrySchema = object({
16680
+ /** `internal:<uuid>` or `<addonId>:<localId>`. */
16681
+ id: string().min(3),
16682
+ name: string().min(1).max(120),
16683
+ /** The addon that declared it; `core-blocks` for an internal one. */
16684
+ addonId: string().min(1),
16685
+ source: ActionSourceKindSchema,
16686
+ /** An addon-declared entry is edited where it was declared. */
16687
+ readOnly: boolean(),
16688
+ /** Internal only: cap and wait steps. No action-in-action, so no cycles. */
16689
+ steps: array(ActionStepSchema).min(1).max(50).optional(),
16690
+ variables: array(ActionVariableSchema).max(20).optional(),
16691
+ status: ActionStatusSchema
16692
+ }).superRefine((entry, ctx) => {
16693
+ if (entry.source === "internal") {
16694
+ if (!isInternalActionId(entry.id)) ctx.addIssue({
16695
+ code: "custom",
16696
+ message: "an internal action id is internal:<uuid>",
16697
+ path: ["id"]
16698
+ });
16699
+ return;
16700
+ }
16701
+ if (entry.steps !== void 0) ctx.addIssue({
16702
+ code: "custom",
16703
+ message: "only an internal action carries steps",
16704
+ path: ["steps"]
16705
+ });
16706
+ if (!entry.readOnly) ctx.addIssue({
16707
+ code: "custom",
16708
+ message: "an addon action is read-only here",
16709
+ path: ["readOnly"]
16710
+ });
16711
+ if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
16712
+ code: "custom",
16713
+ message: "an addon action id is <addonId>:<localId>",
16714
+ path: ["id"]
16715
+ });
16716
+ });
16717
+ /** What an operator writes for an internal action. */
16718
+ var ActionInputSchema = object({
16719
+ name: string().min(1).max(120),
16720
+ steps: array(ActionStepSchema).min(1).max(50),
16721
+ variables: array(ActionVariableSchema).max(20).optional()
16722
+ });
16723
+ /** Who started a run. Absent = the operator pressed it. */
16724
+ var ActionRunOriginSchema = object({
16725
+ /** The automation block whose step started it. */
16726
+ blockId: string().min(1).optional() });
16727
+ /** `started` = the caller did not ask to wait. */
16728
+ var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
16729
+ var ActionRunResultSchema = object({
16730
+ runId: string().min(1),
16731
+ outcome: ActionRunOutcomeSchema,
16732
+ /** Why it did not run, or what failed. */
16733
+ message: string().optional()
16734
+ });
16735
+ _enum([
16736
+ "not-found",
16737
+ "read-only",
16738
+ "invalid-variables",
16739
+ "invalid-steps",
16740
+ "not-linked",
16741
+ "busy"
16742
+ ]);
16743
+ object({
16744
+ actionId: string(),
16745
+ runId: string(),
16746
+ isRunning: boolean(),
16747
+ /** Set when the run ended. */
16748
+ outcome: AutomationRunOutcomeSchema.optional(),
16749
+ lastRunAt: number().nullable(),
16750
+ lastError: string().nullable()
16161
16751
  });
16162
16752
  /**
16163
16753
  * `addon-pages` — system-scoped singleton aggregator cap. Public-facing
@@ -17752,7 +18342,22 @@ var BrokerProviderInfoSchema = object({
17752
18342
  */
17753
18343
  interactiveConnectPath: string().min(1).optional(),
17754
18344
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17755
- interactiveDisconnectPath: string().min(1).optional()
18345
+ interactiveDisconnectPath: string().min(1).optional(),
18346
+ /**
18347
+ * The kind signs in through a server-held interactive session instead of
18348
+ * (or before) typed credentials. `basePath` is a hub-relative route set
18349
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
18350
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
18351
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
18352
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
18353
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
18354
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
18355
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
18356
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
18357
+ * offers it as the default path; the fields the session fills are
18358
+ * marked `filledBySignIn` in the kind's settings schema.
18359
+ */
18360
+ signIn: object({ basePath: string().min(1) }).optional()
17756
18361
  }))
17757
18362
  });
17758
18363
  var ListInputSchema = object({
@@ -18723,7 +19328,7 @@ var CompositionEventPlanSchema = object({
18723
19328
  stateField: string(),
18724
19329
  fieldKey: string()
18725
19330
  });
18726
- /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
19331
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
18727
19332
  var CompositionProblemSchema = object({
18728
19333
  code: _enum([
18729
19334
  "reserved-variant",
@@ -18751,7 +19356,8 @@ var CompositionProblemSchema = object({
18751
19356
  "native-capability-replace",
18752
19357
  "mixed-quantity",
18753
19358
  "helper-mismatch",
18754
- "member-constraint"
19359
+ "member-constraint",
19360
+ "retention"
18755
19361
  ]),
18756
19362
  path: string(),
18757
19363
  message: string()
@@ -18985,13 +19591,17 @@ Object.freeze({
18985
19591
  latchedAt: {
18986
19592
  kind: "fixed",
18987
19593
  result: ["number", "null"]
19594
+ },
19595
+ schmitt: {
19596
+ kind: "fixed",
19597
+ result: ["boolean", "null"]
18988
19598
  }
18989
19599
  });
18990
19600
  /**
18991
19601
  * One catalog row per base reading a group helper can build (D944 §3).
18992
19602
  * Data, not a form default written into the block.
18993
19603
  */
18994
- var NOW = {
19604
+ var NOW$2 = {
18995
19605
  fieldPath: "lastFetchedAt",
18996
19606
  expr: "now"
18997
19607
  };
@@ -19005,6 +19615,8 @@ function numeric(input) {
19005
19615
  family: "numeric",
19006
19616
  deviceType: DeviceType.Sensor,
19007
19617
  memberDeviceType: DeviceType.Sensor,
19618
+ memberDeviceTypes: [DeviceType.Sensor],
19619
+ activeWhen: void 0,
19008
19620
  commandCaps: [],
19009
19621
  baseUnit: baseUnitOf(input.quantity),
19010
19622
  aggregates: NUMERIC_AGGREGATES,
@@ -19020,6 +19632,8 @@ function binary(input) {
19020
19632
  family: "binary",
19021
19633
  deviceType: DeviceType.Sensor,
19022
19634
  memberDeviceType: DeviceType.Sensor,
19635
+ memberDeviceTypes: [DeviceType.Sensor],
19636
+ activeWhen: void 0,
19023
19637
  commandCaps: [],
19024
19638
  quantity: "none",
19025
19639
  baseUnit: void 0,
@@ -19033,73 +19647,73 @@ var GROUP_TEMPLATES = [
19033
19647
  summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
19034
19648
  role: DeviceRole.TemperatureSensor,
19035
19649
  outputCap: "temperature-sensor",
19036
- outputField: "celsius",
19650
+ outputField: "temperature",
19037
19651
  quantity: "temperature",
19038
19652
  defaultAggregate: "mean",
19039
19653
  empty: "null",
19040
- companions: [NOW]
19654
+ companions: [NOW$2]
19041
19655
  }),
19042
19656
  numeric({
19043
19657
  id: "humidity",
19044
19658
  summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
19045
19659
  role: DeviceRole.HumiditySensor,
19046
19660
  outputCap: "humidity-sensor",
19047
- outputField: "percent",
19661
+ outputField: "humidity",
19048
19662
  quantity: "humidity",
19049
19663
  defaultAggregate: "mean",
19050
19664
  empty: "null",
19051
- companions: [NOW]
19665
+ companions: [NOW$2]
19052
19666
  }),
19053
19667
  numeric({
19054
19668
  id: "pressure",
19055
19669
  summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
19056
19670
  role: DeviceRole.PressureSensor,
19057
19671
  outputCap: "pressure-sensor",
19058
- outputField: "hpa",
19672
+ outputField: "pressure",
19059
19673
  quantity: "pressure",
19060
19674
  defaultAggregate: "mean",
19061
19675
  empty: "null",
19062
- companions: [NOW]
19676
+ companions: [NOW$2]
19063
19677
  }),
19064
19678
  numeric({
19065
19679
  id: "illuminance",
19066
19680
  summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
19067
19681
  role: DeviceRole.AmbientLightSensor,
19068
19682
  outputCap: "ambient-light-sensor",
19069
- outputField: "lux",
19683
+ outputField: "illuminance",
19070
19684
  quantity: "illuminance",
19071
19685
  defaultAggregate: "mean",
19072
19686
  empty: "null",
19073
- companions: [NOW]
19687
+ companions: [NOW$2]
19074
19688
  }),
19075
19689
  numeric({
19076
19690
  id: "power",
19077
19691
  summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
19078
19692
  role: DeviceRole.PowerSensor,
19079
19693
  outputCap: "power-meter",
19080
- outputField: "watts",
19694
+ outputField: "power",
19081
19695
  quantity: "power",
19082
19696
  defaultAggregate: "sum",
19083
19697
  empty: "omit",
19084
- companions: [NOW]
19698
+ companions: [NOW$2]
19085
19699
  }),
19086
19700
  numeric({
19087
19701
  id: "energy",
19088
19702
  summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
19089
19703
  role: DeviceRole.EnergySensor,
19090
19704
  outputCap: "power-meter",
19091
- outputField: "kwhTotal",
19705
+ outputField: "energy",
19092
19706
  quantity: "energy",
19093
19707
  defaultAggregate: "sum",
19094
19708
  empty: "omit",
19095
- companions: [NOW]
19709
+ companions: [NOW$2]
19096
19710
  }),
19097
19711
  numeric({
19098
19712
  id: "battery",
19099
19713
  summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
19100
19714
  role: DeviceRole.BatterySensor,
19101
19715
  outputCap: "battery",
19102
- outputField: "percentage",
19716
+ outputField: "level",
19103
19717
  quantity: "percentage",
19104
19718
  defaultAggregate: "mean",
19105
19719
  empty: "null",
@@ -19127,7 +19741,7 @@ var GROUP_TEMPLATES = [
19127
19741
  quantity: "device",
19128
19742
  defaultAggregate: "mean",
19129
19743
  empty: "null",
19130
- companions: [NOW]
19744
+ companions: [NOW$2]
19131
19745
  }),
19132
19746
  binary({
19133
19747
  id: "motion",
@@ -19221,6 +19835,11 @@ var GROUP_TEMPLATES = [
19221
19835
  summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
19222
19836
  deviceType: DeviceType.Switch,
19223
19837
  outputCap: "switch",
19838
+ outputField: "on",
19839
+ member: {
19840
+ cap: "switch",
19841
+ fieldPath: "on"
19842
+ },
19224
19843
  commandCaps: ["switch"]
19225
19844
  }),
19226
19845
  actuator({
@@ -19228,34 +19847,136 @@ var GROUP_TEMPLATES = [
19228
19847
  summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
19229
19848
  deviceType: DeviceType.Light,
19230
19849
  outputCap: "switch",
19850
+ outputField: "on",
19851
+ member: {
19852
+ cap: "switch",
19853
+ fieldPath: "on"
19854
+ },
19231
19855
  commandCaps: [
19232
19856
  "switch",
19233
19857
  "brightness",
19234
19858
  "color"
19235
19859
  ]
19860
+ }),
19861
+ actuator({
19862
+ id: "fan",
19863
+ summary: "On when at least one fan is on, or when all of them are. Speed, preset, direction and oscillation are offered only when every fan has them. A command is not sent to a fan that lacks it.",
19864
+ deviceType: DeviceType.Fan,
19865
+ outputCap: "switch",
19866
+ outputField: "on",
19867
+ member: {
19868
+ cap: "switch",
19869
+ fieldPath: "on"
19870
+ },
19871
+ commandCaps: ["switch", "fan-control"]
19872
+ }),
19873
+ actuator({
19874
+ id: "cover",
19875
+ summary: "Open when at least one cover is open or part-open, or only when all of them are. Position and tilt are offered only when every cover has them. A cover that reports nothing is left out, never read as closed.",
19876
+ deviceType: DeviceType.Cover,
19877
+ outputCap: "group-active",
19878
+ outputField: "active",
19879
+ member: {
19880
+ cap: "cover",
19881
+ fieldPath: "state"
19882
+ },
19883
+ activeWhen: [
19884
+ "open",
19885
+ "opening",
19886
+ "stopped"
19887
+ ],
19888
+ commandCaps: ["cover"]
19889
+ }),
19890
+ actuator({
19891
+ id: "valve",
19892
+ summary: "Open when at least one valve is open or part-open, or only when all of them are. Position is offered only when every valve has it. A valve that reports nothing is left out, never read as closed.",
19893
+ deviceType: DeviceType.Valve,
19894
+ outputCap: "group-active",
19895
+ outputField: "active",
19896
+ member: {
19897
+ cap: "valve",
19898
+ fieldPath: "state"
19899
+ },
19900
+ activeWhen: [
19901
+ "open",
19902
+ "opening",
19903
+ "stopped"
19904
+ ],
19905
+ commandCaps: ["valve"]
19906
+ }),
19907
+ actuator({
19908
+ id: "lock",
19909
+ summary: "Locked when at least one lock is locked, or only when all of them are. A jammed or moving lock is not locked. Locking is one tap; unlocking the group needs a confirmation every time, and nothing is sent without it.",
19910
+ deviceType: DeviceType.Lock,
19911
+ outputCap: "group-active",
19912
+ outputField: "active",
19913
+ member: {
19914
+ cap: "lock-control",
19915
+ fieldPath: "state"
19916
+ },
19917
+ activeWhen: ["locked"],
19918
+ commandCaps: ["lock-control"]
19919
+ }),
19920
+ actuator({
19921
+ id: "media-player",
19922
+ summary: "Playing when at least one player is playing, or only when all of them are. Volume is offered only when every player has it. A player that reports nothing is left out, never read as stopped.",
19923
+ deviceType: DeviceType.MediaPlayer,
19924
+ outputCap: "group-active",
19925
+ outputField: "active",
19926
+ member: {
19927
+ cap: "media-player",
19928
+ fieldPath: "state"
19929
+ },
19930
+ activeWhen: ["playing", "buffering"],
19931
+ commandCaps: ["media-player"]
19932
+ }),
19933
+ actuator({
19934
+ id: "climate",
19935
+ summary: "Running when at least one thermostat or air conditioner is not off, or only when all of them are. Target temperature and fan are offered only when every device has them. A device that reports nothing is left out, never read as off.",
19936
+ deviceType: DeviceType.Thermostat,
19937
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19938
+ outputCap: "group-active",
19939
+ outputField: "active",
19940
+ member: {
19941
+ cap: "climate-control",
19942
+ fieldPath: "mode"
19943
+ },
19944
+ activeWhen: [
19945
+ "heat",
19946
+ "cool",
19947
+ "auto",
19948
+ "heat_cool",
19949
+ "fan_only",
19950
+ "dry"
19951
+ ],
19952
+ commandCaps: ["climate-control"]
19236
19953
  })
19237
19954
  ];
19238
19955
  function actuator(input) {
19239
19956
  return {
19240
- ...input,
19957
+ id: input.id,
19958
+ summary: input.summary,
19959
+ deviceType: input.deviceType,
19960
+ outputCap: input.outputCap,
19961
+ outputField: input.outputField,
19962
+ commandCaps: input.commandCaps,
19241
19963
  family: "actuator",
19242
19964
  role: void 0,
19243
19965
  memberDeviceType: input.deviceType,
19244
- outputField: "on",
19966
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19967
+ activeWhen: input.activeWhen,
19245
19968
  quantity: "none",
19246
19969
  baseUnit: void 0,
19247
19970
  aggregates: BINARY_AGGREGATES,
19248
19971
  defaultAggregate: "any",
19249
19972
  empty: "offline",
19250
- accept: [{
19251
- cap: "switch",
19252
- fieldPath: "on"
19253
- }],
19973
+ accept: [input.member],
19254
19974
  companions: [CHANGED]
19255
19975
  };
19256
19976
  }
19257
19977
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
19258
19978
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19979
+ DeviceType.Camera;
19259
19980
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
19260
19981
  /**
19261
19982
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -19570,7 +20291,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
19570
20291
  kind: "mutation",
19571
20292
  auth: "admin",
19572
20293
  access: "view"
19573
- });
20294
+ }), method(object({
20295
+ blockId: string().min(1),
20296
+ trace: AutomationRunTraceSchema.optional(),
20297
+ runStartedAt: number().optional(),
20298
+ keepTraces: number().int().min(1).max(100).optional()
20299
+ }), _void(), {
20300
+ kind: "mutation",
20301
+ auth: "admin"
20302
+ }), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
20303
+ traces: array(AutomationRunTraceSchema),
20304
+ lastError: string().nullable()
20305
+ }), { auth: "admin" });
19574
20306
  /**
19575
20307
  * `custom-model-registry` — collection cap exposing operator-registered
19576
20308
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -44351,7 +45083,7 @@ var NetworkAccessStatusSchema = object({
44351
45083
  });
44352
45084
  /**
44353
45085
  * Optional, richer endpoint shape returned by providers that expose
44354
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
45086
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44355
45087
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44356
45088
  * the originating provider config (mode + sourcePort) so the
44357
45089
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -44744,51 +45476,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
44744
45476
  kind: "mutation",
44745
45477
  auth: "admin"
44746
45478
  });
44747
- new Set([
44748
- {
44749
- id: "person",
44750
- name: "Person"
44751
- },
44752
- {
44753
- id: "vehicle",
44754
- name: "Vehicle"
44755
- },
44756
- {
44757
- id: "animal",
44758
- name: "Animal"
44759
- },
44760
- {
44761
- id: "package",
44762
- name: "Package"
44763
- }
44764
- ].map((l) => l.id));
44765
- var COCO_TO_MACRO = {
44766
- mapping: {
44767
- person: "person",
44768
- bicycle: "vehicle",
44769
- car: "vehicle",
44770
- motorcycle: "vehicle",
44771
- airplane: "vehicle",
44772
- bus: "vehicle",
44773
- train: "vehicle",
44774
- truck: "vehicle",
44775
- boat: "vehicle",
44776
- bird: "animal",
44777
- cat: "animal",
44778
- dog: "animal",
44779
- horse: "animal",
44780
- sheep: "animal",
44781
- cow: "animal",
44782
- elephant: "animal",
44783
- bear: "animal",
44784
- zebra: "animal",
44785
- giraffe: "animal",
44786
- suitcase: "package",
44787
- backpack: "package",
44788
- handbag: "package"
44789
- },
44790
- preserveOriginal: false
44791
- };
44792
45479
  var AUDIO_MACRO_LABELS = [
44793
45480
  {
44794
45481
  id: "speech",
@@ -46994,7 +47681,20 @@ var NcRuleInputSchema = object({
46994
47681
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46995
47682
  * path does not run Zod defaults.
46996
47683
  */
46997
- groupingSec: number().int().min(5).max(60).optional()
47684
+ groupingSec: number().int().min(5).max(60).optional(),
47685
+ /**
47686
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
47687
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
47688
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
47689
+ * same mark the Library writes, and records whose notification it was and
47690
+ * when. A channel with no buttons gets the same two choices as links.
47691
+ *
47692
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
47693
+ * cap path): absent and `false` both mean off, which is what every rule
47694
+ * authored before this field meant. An editor turns it off by writing
47695
+ * `false`, so it needs no `clear` key.
47696
+ */
47697
+ askVerdict: boolean().optional()
46998
47698
  });
46999
47699
  /**
47000
47700
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57405,9 +58105,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
57405
58105
  }), LogStreamEntrySchema, { kind: "subscription" });
57406
58106
  object({
57407
58107
  /** Carbon dioxide concentration in ppm. */
57408
- co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
58108
+ co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
57409
58109
  /** Total volatile organic compounds in ppb. */
57410
- vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
58110
+ voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
57411
58111
  /** Particulate matter ≤ 2.5 μm in µg/m³. */
57412
58112
  pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
57413
58113
  /** Particulate matter ≤ 10 μm in µg/m³. */
@@ -57424,7 +58124,7 @@ DeviceType.Sensor;
57424
58124
  */
57425
58125
  var AmbientLightSensorStatusSchema = object({
57426
58126
  /** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
57427
- lux: number().min(0).nullable().meta(readingMeta("illuminance", {
58127
+ illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
57428
58128
  precision: 0,
57429
58129
  label: "Illuminance"
57430
58130
  })),
@@ -57521,6 +58221,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
57521
58221
  * would produce more than `maxPoints` samples. */
57522
58222
  sampleEveryMs: number().int().positive().optional()
57523
58223
  }), AudioMetricsHistorySchema);
58224
+ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
58225
+ actionId: string().min(1),
58226
+ variables: record(string(), ActionVariableValueSchema).optional()
58227
+ }), _void(), {
58228
+ kind: "mutation",
58229
+ auth: "admin"
58230
+ }), method(object({ actionId: string().min(1) }), _void(), {
58231
+ kind: "mutation",
58232
+ auth: "admin"
58233
+ });
58234
+ /**
58235
+ * actions — the ONE surface for runnable actions, for the UI and for
58236
+ * automations. Provided by the core-blocks builtin on the hub.
58237
+ *
58238
+ * An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
58239
+ * steps, kept in the hub's `actions` record kind) or declared by an addon over
58240
+ * `action-source`. `list` asks every `action-source` provider LIVE and overlays
58241
+ * the run status from the hub's `runs` ledger; there is no catalog here to
58242
+ * drift (D3).
58243
+ *
58244
+ * **Permissions follow the camera, as linked devices do.** An action is linked
58245
+ * to cameras by the operator (`setLinks`, D356: nothing links itself). A
58246
+ * non-admin may `get` / `run` an action only through a camera they may see that
58247
+ * links it: they name the camera (`deviceId`, a top-level field so the scope
58248
+ * gate sees it) and the provider refuses an action that camera does not link.
58249
+ * An admin, and an in-process caller (an automation block), may run any action.
58250
+ * Every refusal is typed (`[not-linked] …`) and logged.
58251
+ *
58252
+ * A second `run` of an action that is already running is REFUSED — traced and
58253
+ * logged — never queued.
58254
+ */
58255
+ var ActionIdInput = object({ actionId: string().min(1) });
58256
+ var ActionLinksSchema = object({
58257
+ deviceId: number().int().nonnegative(),
58258
+ actionIds: array(string().min(1)).max(100)
58259
+ });
58260
+ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
58261
+ actionId: string().min(1),
58262
+ deviceId: number().int().nonnegative().optional()
58263
+ }), object({ action: ActionEntrySchema.nullable() }), {
58264
+ role: "viewer",
58265
+ auth: "protected",
58266
+ kind: "query",
58267
+ caller: "required"
58268
+ }), method(object({
58269
+ actionId: string().min(1),
58270
+ variables: record(string(), ActionVariableValueSchema).optional(),
58271
+ wait: boolean().optional(),
58272
+ origin: ActionRunOriginSchema.optional(),
58273
+ deviceId: number().int().nonnegative().optional()
58274
+ }), ActionRunResultSchema, {
58275
+ role: "viewer",
58276
+ auth: "protected",
58277
+ kind: "mutation",
58278
+ caller: "required"
58279
+ }), method(ActionIdInput, _void(), {
58280
+ kind: "mutation",
58281
+ auth: "admin"
58282
+ }), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
58283
+ kind: "mutation",
58284
+ auth: "admin"
58285
+ }), method(object({
58286
+ actionId: string().min(1),
58287
+ action: ActionInputSchema.partial()
58288
+ }), object({ action: ActionEntrySchema }), {
58289
+ kind: "mutation",
58290
+ auth: "admin"
58291
+ }), method(ActionIdInput, _void(), {
58292
+ kind: "mutation",
58293
+ auth: "admin"
58294
+ }), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
58295
+ role: "viewer",
58296
+ auth: "protected",
58297
+ kind: "query"
58298
+ }), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
58299
+ kind: "mutation",
58300
+ auth: "admin"
58301
+ });
57524
58302
  object({
57525
58303
  /** Whether the automation is currently enabled. Disabled automations
57526
58304
  * ignore their trigger block — manual `trigger` still works. */
@@ -57574,7 +58352,7 @@ var BatteryStatusSchema = object({
57574
58352
  * Consumers must SKIP a null rather than coerce it — `battery-band` already
57575
58353
  * declines to band a non-finite reading, which is the correct shape.
57576
58354
  */
57577
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
58355
+ level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
57578
58356
  /**
57579
58357
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
57580
58358
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -57584,7 +58362,7 @@ var BatteryStatusSchema = object({
57584
58362
  * `'unknown'` is the absence of an answer: the provider has not read the
57585
58363
  * power fields yet, or the firmware reported neither. Before it existed,
57586
58364
  * two unreadable fields produced `'none'`, and a camera nobody had reached
57587
- * was drawn "on battery alone" — the same D315 defect `percentage` closed
58365
+ * was drawn "on battery alone" — the same D315 defect `level` closed
57588
58366
  * by going nullable. Consumers SKIP it (no charger state published, no
57589
58367
  * glyph, no HomeKit ChargingState) rather than coerce it either way.
57590
58368
  */
@@ -57608,7 +58386,7 @@ var BatteryStatusSchema = object({
57608
58386
  * that only report charge. A second reading on this cap, not a second
57609
58387
  * `numeric-sensor` on the same device.
57610
58388
  */
57611
- volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
58389
+ voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
57612
58390
  /**
57613
58391
  * Ms epoch of the last time the device PROVED it was reachable — a
57614
58392
  * completed firmware round-trip, an observed wake, or an inbound push
@@ -57642,13 +58420,13 @@ var BatteryStatusSchema = object({
57642
58420
  /**
57643
58421
  * True when the source is a BINARY low-battery indicator (HA
57644
58422
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
57645
- * charge level — `percentage` is then a coarse stand-in (100 = normal,
58423
+ * charge level — `level` is then a coarse stand-in (100 = normal,
57646
58424
  * sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
57647
58425
  * misleading exact percentage. Absent/false → genuine 0–100 % reading.
57648
58426
  */
57649
58427
  binary: boolean().optional().meta({ label: "Binary indicator" })
57650
58428
  });
57651
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
58429
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
57652
58430
  method(object({
57653
58431
  deviceId: number(),
57654
58432
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -57668,19 +58446,19 @@ object({
57668
58446
  DeviceType.Sensor;
57669
58447
  object({
57670
58448
  /** Current level as 0..100 inclusive. Firmware-reported. */
57671
- percentage: number().min(0).max(100).meta(readingMeta("percentage")),
58449
+ level: number().min(0).max(100).meta(readingMeta("percentage")),
57672
58450
  /** Ms epoch of the last operator-driven change. Useful for UI freshness. */
57673
58451
  lastChangedAt: number()
57674
58452
  });
57675
58453
  DeviceType.Light, method(object({
57676
58454
  deviceId: number().int().nonnegative(),
57677
- percentage: number().min(0).max(100)
58455
+ level: number().min(0).max(100)
57678
58456
  }), _void(), {
57679
58457
  kind: "mutation",
57680
58458
  auth: "protected"
57681
58459
  }), object({
57682
58460
  deviceId: number(),
57683
- percentage: number().min(0).max(100),
58461
+ level: number().min(0).max(100),
57684
58462
  lastChangedAt: number()
57685
58463
  });
57686
58464
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
@@ -58185,11 +58963,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
58185
58963
  }),
58186
58964
  object({
58187
58965
  mode: literal("mired"),
58188
- mireds: number().int().min(50).max(1e3)
58966
+ colorTemperature: number().int().min(50).max(1e3)
58189
58967
  })
58190
58968
  ]);
58191
58969
  object({
58192
- /** Active color mode — which of `rgb` / `hsv` / `mireds` reflects
58970
+ /** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
58193
58971
  * the bulb's current state. */
58194
58972
  mode: _enum([
58195
58973
  "rgb",
@@ -58201,7 +58979,7 @@ object({
58201
58979
  /** Populated when `mode === 'hsv'`. */
58202
58980
  hsv: HsvTripletSchema.optional(),
58203
58981
  /** Populated when `mode === 'mired'`. */
58204
- mireds: number().int().optional().meta(readingMeta("colour-temperature")),
58982
+ colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
58205
58983
  /** Ms epoch of the last operator-driven change. */
58206
58984
  lastChangedAt: number()
58207
58985
  });
@@ -58220,7 +58998,7 @@ DeviceType.Light, method(object({
58220
58998
  ]),
58221
58999
  rgb: RgbTripletSchema.optional(),
58222
59000
  hsv: HsvTripletSchema.optional(),
58223
- mireds: number().int().optional(),
59001
+ colorTemperature: number().int().optional(),
58224
59002
  lastChangedAt: number()
58225
59003
  });
58226
59004
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
@@ -58658,11 +59436,11 @@ object({
58658
59436
  /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
58659
59437
  availablePrograms: array(string()),
58660
59438
  /** Seconds remaining on the active cycle, or null when not running / not known. */
58661
- remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
59439
+ remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58662
59440
  /** Seconds the delayed start is set to (time until the cycle starts), or null. */
58663
- delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
59441
+ delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58664
59442
  /** Cycle completion 0..100, or null when not applicable. */
58665
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59443
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58666
59444
  /** True when the door is reported open; null when the door state is not known. */
58667
59445
  doorOpen: boolean().nullable(),
58668
59446
  /** True when the door is latched (locked) during a cycle; null when not reported. */
@@ -59280,7 +60058,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
59280
60058
  object({
59281
60059
  /** Active speed as 0..100 inclusive. Null when the device has no
59282
60060
  * speed surface (single-speed fan). */
59283
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60061
+ speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59284
60062
  /** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
59285
60063
  * a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
59286
60064
  percentageStep: number().positive().optional().meta(readingMeta("percentage")),
@@ -59300,7 +60078,7 @@ object({
59300
60078
  });
59301
60079
  DeviceType.Fan, method(object({
59302
60080
  deviceId: number().int().nonnegative(),
59303
- percentage: number().min(0).max(100)
60081
+ speed: number().min(0).max(100)
59304
60082
  }), _void(), {
59305
60083
  kind: "mutation",
59306
60084
  auth: "protected"
@@ -59416,7 +60194,13 @@ results: array(object({
59416
60194
  /** Ms epoch of the attempt. */
59417
60195
  at: number()
59418
60196
  })) });
59419
- DeviceType.Switch, DeviceType.Light;
60197
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
60198
+ object({
60199
+ active: boolean().meta({ label: "Active" }),
60200
+ /** Ms epoch when the slice was last updated. */
60201
+ lastChangedAt: number()
60202
+ });
60203
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
59420
60204
  object({
59421
60205
  /** Members whose current value entered the aggregate. */
59422
60206
  included: number().int().nonnegative().meta(readingMeta("count", {
@@ -59434,7 +60218,7 @@ object({
59434
60218
  label: "Members"
59435
60219
  }))
59436
60220
  });
59437
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
60221
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
59438
60222
  object({
59439
60223
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59440
60224
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -59493,7 +60277,7 @@ DeviceType.Humidifier, method(object({
59493
60277
  */
59494
60278
  var HumiditySensorStatusSchema = object({
59495
60279
  /** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
59496
- percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
60280
+ humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
59497
60281
  precision: 0,
59498
60282
  label: "Humidity"
59499
60283
  })),
@@ -59936,7 +60720,7 @@ object({
59936
60720
  batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59937
60721
  /** 0..100 mowing-completion percentage of the current task, or null when no
59938
60722
  * task is active / progress is unavailable. */
59939
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60723
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59940
60724
  /** Current device/event code (dynamic — mostly status, sometimes an error),
59941
60725
  * or null when unknown. */
59942
60726
  currentCode: number().nullable().meta(readingMeta("none")),
@@ -60349,7 +61133,14 @@ DeviceType.Lock, method(object({
60349
61133
  auth: "protected"
60350
61134
  }), method(object({
60351
61135
  deviceId: number().int().nonnegative(),
60352
- code: string().min(1).optional()
61136
+ code: string().min(1).optional(),
61137
+ /**
61138
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61139
+ * with one call is refused unless the caller says it was confirmed. A
61140
+ * single lock ignores it. The refusal lives in the callee, so no
61141
+ * automation or API caller reaches the doors by skipping a dialog.
61142
+ */
61143
+ confirm: boolean().optional()
60353
61144
  }), _void(), {
60354
61145
  kind: "mutation",
60355
61146
  auth: "protected"
@@ -60357,6 +61148,11 @@ DeviceType.Lock, method(object({
60357
61148
  kind: "mutation",
60358
61149
  auth: "protected"
60359
61150
  });
61151
+ object({
61152
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61153
+ lastFetchedAt: number()
61154
+ });
61155
+ DeviceType.Sensor;
60360
61156
  /**
60361
61157
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
60362
61158
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
@@ -60414,10 +61210,10 @@ object({
60414
61210
  currentMedia: MediaInfoSchema.nullable(),
60415
61211
  /** Current playback position in ms. Null when not seekable or
60416
61212
  * nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
60417
- positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
61213
+ position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
60418
61214
  /** Total duration of the current media in ms. Null when unknown
60419
61215
  * (live stream) or nothing is playing. */
60420
- durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
61216
+ duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
60421
61217
  /** Shuffle toggle. Null when no shuffle surface.
60422
61218
  * Pair with `DeviceFeature.MediaPlayerShuffle`. */
60423
61219
  shuffle: boolean().nullable(),
@@ -60444,7 +61240,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
60444
61240
  auth: "protected"
60445
61241
  }), method(object({
60446
61242
  deviceId: number().int().nonnegative(),
60447
- positionMs: number().int().nonnegative()
61243
+ position: number().int().nonnegative()
60448
61244
  }), _void(), {
60449
61245
  kind: "mutation",
60450
61246
  auth: "protected"
@@ -61117,9 +61913,9 @@ var NetworkLinkStatusSchema = object({
61117
61913
  * one whose reading has not landed must not be drawn at 0 %. Consumers
61118
61914
  * SKIP a null rather than coerce it.
61119
61915
  */
61120
- signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61916
+ signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61121
61917
  /** Raw received signal strength in dBm, when the firmware reports one. */
61122
- rssiDbm: number().optional().meta(readingMeta("signal-level")),
61918
+ rssi: number().optional().meta(readingMeta("signal-level")),
61123
61919
  /** Network name of a wireless link, when the firmware reports it. */
61124
61920
  ssid: string().optional(),
61125
61921
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
@@ -61780,10 +62576,20 @@ var PetFeederDeviceStatusSchema = _enum([
61780
62576
  ]);
61781
62577
  var gramsPortion = number().int().min(4).max(200);
61782
62578
  object({
61783
- /** Food currently in the bowl (grams). Null when the device has not
61784
- * reported a reading yet. On dual-hopper models this is the combined
61785
- * bowl reading; per-hopper levels live in `food1`/`food2`. */
62579
+ /** Food in the TANK (hopper), as the feeder's own sensor reports it
62580
+ * (`state.food`). A coarse level code, not grams — `0` is empty. The
62581
+ * amount in the bowl is `bowlFood`. On dual-hopper models this is the
62582
+ * combined reading; per-hopper levels live in `food1`/`food2`. Null when
62583
+ * the device has not reported yet. */
61786
62584
  foodLevel: number().nullable().meta(readingMeta("none")),
62585
+ /** Food in the BOWL as the feeder reports it (`state.bowl`), in the
62586
+ * feeder's own units. Null when the model reports none. */
62587
+ bowlFood: number().nullable().meta(readingMeta("none")),
62588
+ /** True while the pet is eating (`state.eating`). */
62589
+ eating: boolean(),
62590
+ /** Whether `markFoodReplenished` does anything on this model. When false
62591
+ * the client must not offer it. */
62592
+ supportsMarkRefilled: boolean(),
61787
62593
  /** Hopper-1 food level (grams) on dual-hopper feeders; null on
61788
62594
  * single-hopper models. */
61789
62595
  food1: number().nullable().meta(readingMeta("none")),
@@ -61791,8 +62597,8 @@ object({
61791
62597
  * single-hopper models. */
61792
62598
  food2: number().nullable().meta(readingMeta("none")),
61793
62599
  /** Derived low-food flag — mirrors the HA `food_level` binary_sensor
61794
- * (`device_class: problem`, on = low). True when the bowl is empty /
61795
- * below the feeder's low threshold. */
62600
+ * (`device_class: problem`, on = low). True when the tank reports empty,
62601
+ * or, on a dual-hopper model, when EITHER hopper is empty. */
61796
62602
  lowFood: boolean(),
61797
62603
  /** Battery charge 0..100 (%). Null on mains-powered models or when the
61798
62604
  * device has no battery reading. */
@@ -62259,22 +63065,38 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
62259
63065
  auth: "admin"
62260
63066
  });
62261
63067
  object({
62262
- /** Instantaneous power draw in watts. */
62263
- watts: number().optional().meta(readingMeta("power", { label: "Power" })),
63068
+ /** Instantaneous power draw (watts). */
63069
+ power: number().optional().meta(readingMeta("power", { label: "Power" })),
62264
63070
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
62265
- kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
62266
- /** Voltage in volts. */
62267
- volts: number().optional().meta(readingMeta("voltage")),
63071
+ energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
63072
+ /** Voltage (volts). */
63073
+ voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
62268
63074
  /** Current in amperes. */
62269
- amps: number().optional().meta(readingMeta("current")),
63075
+ current: number().optional().meta(readingMeta("current", { label: "Current" })),
62270
63076
  /** Apparent power in volt-amperes. */
62271
- va: number().optional().meta(readingMeta("apparent-power")),
63077
+ apparentPower: number().optional().meta(readingMeta("apparent-power")),
62272
63078
  /** Power factor (0..1) if reported. */
62273
63079
  powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
62274
63080
  /** Ms epoch when the slice was last updated. */
62275
63081
  lastFetchedAt: number()
62276
63082
  });
62277
- DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
63083
+ [
63084
+ DeviceType.Sensor,
63085
+ DeviceType.Switch,
63086
+ DeviceType.Light,
63087
+ DeviceType.Fan,
63088
+ DeviceType.Climate,
63089
+ DeviceType.Thermostat,
63090
+ DeviceType.Humidifier,
63091
+ DeviceType.WaterHeater,
63092
+ DeviceType.MediaPlayer,
63093
+ DeviceType.Washer,
63094
+ DeviceType.Dryer,
63095
+ DeviceType.Dishwasher,
63096
+ DeviceType.Vacuum,
63097
+ DeviceType.LawnMower,
63098
+ DeviceType.PetFeeder
63099
+ ].filter((type) => type !== DeviceType.Sensor);
62278
63100
  /**
62279
63101
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
62280
63102
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -62307,16 +63129,13 @@ var PresenceStatusSchema = object({
62307
63129
  location: string().nullable(),
62308
63130
  /** GPS coordinates when available. Null otherwise. */
62309
63131
  gps: GpsLocationSchema.nullable(),
62310
- /** Optional battery level of the tracking device (0..100). Null
62311
- * when not reported. */
62312
- batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62313
63132
  /** Ms epoch when the slice was last updated. */
62314
63133
  lastChangedAt: number()
62315
63134
  });
62316
63135
  DeviceType.Presence;
62317
63136
  object({
62318
63137
  /** Current pressure in hPa. `null` when the sample was refused (D393). */
62319
- hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
63138
+ pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
62320
63139
  /** Ms epoch when the slice was last updated. */
62321
63140
  lastFetchedAt: number()
62322
63141
  });
@@ -64769,7 +65588,7 @@ object({
64769
65588
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
64770
65589
  lastChangedAt: number()
64771
65590
  });
64772
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
65591
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
64773
65592
  deviceId: number(),
64774
65593
  on: boolean()
64775
65594
  }), _void(), {
@@ -65340,7 +66159,7 @@ DeviceType.Sensor;
65340
66159
  */
65341
66160
  var TemperatureSensorStatusSchema = object({
65342
66161
  /** Current temperature in Celsius. `null` when the sample was refused (D393). */
65343
- celsius: number().nullable().meta(readingMeta("temperature", {
66162
+ temperature: number().nullable().meta(readingMeta("temperature", {
65344
66163
  precision: 1,
65345
66164
  label: "Temperature"
65346
66165
  })),
@@ -65604,7 +66423,7 @@ object({
65604
66423
  /** Speed tokens the hardware accepts — drives the UI selector. */
65605
66424
  availableFanSpeeds: array(string()),
65606
66425
  /** 0..100 cleaning-completion percentage of the current task, or null. */
65607
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
66426
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65608
66427
  /** Current error code (0 / null = no error). */
65609
66428
  errorCode: number().nullable().meta(readingMeta("none")),
65610
66429
  /** Human label for {@link errorCode}, or null when none / undecodable. */
@@ -66473,8 +67292,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
66473
67292
  kind: "mutation",
66474
67293
  auth: "admin"
66475
67294
  });
67295
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
66476
67296
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
66477
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
67297
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
66478
67298
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
66479
67299
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
66480
67300
  new Set(CAP_NAMES);
@@ -66544,6 +67364,104 @@ Object.freeze({
66544
67364
  access: "create",
66545
67365
  role: "admin"
66546
67366
  },
67367
+ "actions.create": {
67368
+ capName: "actions",
67369
+ capScope: "system",
67370
+ addonId: null,
67371
+ access: "create",
67372
+ role: "admin"
67373
+ },
67374
+ "actions.delete": {
67375
+ capName: "actions",
67376
+ capScope: "system",
67377
+ addonId: null,
67378
+ access: "delete",
67379
+ role: "admin"
67380
+ },
67381
+ "actions.get": {
67382
+ capName: "actions",
67383
+ capScope: "system",
67384
+ addonId: null,
67385
+ access: "view",
67386
+ role: "viewer"
67387
+ },
67388
+ "actions.getLinks": {
67389
+ capName: "actions",
67390
+ capScope: "system",
67391
+ addonId: null,
67392
+ access: "view",
67393
+ role: "admin"
67394
+ },
67395
+ "actions.getTraces": {
67396
+ capName: "actions",
67397
+ capScope: "system",
67398
+ addonId: null,
67399
+ access: "view",
67400
+ role: "admin"
67401
+ },
67402
+ "actions.list": {
67403
+ capName: "actions",
67404
+ capScope: "system",
67405
+ addonId: null,
67406
+ access: "view",
67407
+ role: "admin"
67408
+ },
67409
+ "actions.listForCamera": {
67410
+ capName: "actions",
67411
+ capScope: "system",
67412
+ addonId: null,
67413
+ access: "view",
67414
+ role: "viewer"
67415
+ },
67416
+ "actions.run": {
67417
+ capName: "actions",
67418
+ capScope: "system",
67419
+ addonId: null,
67420
+ access: "create",
67421
+ role: "viewer"
67422
+ },
67423
+ "actions.setLinks": {
67424
+ capName: "actions",
67425
+ capScope: "system",
67426
+ addonId: null,
67427
+ access: "create",
67428
+ role: "admin"
67429
+ },
67430
+ "actions.stop": {
67431
+ capName: "actions",
67432
+ capScope: "system",
67433
+ addonId: null,
67434
+ access: "create",
67435
+ role: "admin"
67436
+ },
67437
+ "actions.update": {
67438
+ capName: "actions",
67439
+ capScope: "system",
67440
+ addonId: null,
67441
+ access: "create",
67442
+ role: "admin"
67443
+ },
67444
+ "actionSource.listActions": {
67445
+ capName: "action-source",
67446
+ capScope: "system",
67447
+ addonId: null,
67448
+ access: "view",
67449
+ role: "admin"
67450
+ },
67451
+ "actionSource.runAction": {
67452
+ capName: "action-source",
67453
+ capScope: "system",
67454
+ addonId: null,
67455
+ access: "create",
67456
+ role: "admin"
67457
+ },
67458
+ "actionSource.stopAction": {
67459
+ capName: "action-source",
67460
+ capScope: "system",
67461
+ addonId: null,
67462
+ access: "create",
67463
+ role: "admin"
67464
+ },
66547
67465
  "addonPages.listPages": {
66548
67466
  capName: "addon-pages",
66549
67467
  capScope: "system",
@@ -67825,6 +68743,13 @@ Object.freeze({
67825
68743
  access: "view",
67826
68744
  role: "admin"
67827
68745
  },
68746
+ "coreBlocks.getAutomationRunState": {
68747
+ capName: "core-blocks",
68748
+ capScope: "system",
68749
+ addonId: null,
68750
+ access: "view",
68751
+ role: "admin"
68752
+ },
67828
68753
  "coreBlocks.getBlockSettings": {
67829
68754
  capName: "core-blocks",
67830
68755
  capScope: "system",
@@ -67846,6 +68771,13 @@ Object.freeze({
67846
68771
  access: "view",
67847
68772
  role: "admin"
67848
68773
  },
68774
+ "coreBlocks.getTraces": {
68775
+ capName: "core-blocks",
68776
+ capScope: "system",
68777
+ addonId: null,
68778
+ access: "view",
68779
+ role: "admin"
68780
+ },
67849
68781
  "coreBlocks.getTypeDefs": {
67850
68782
  capName: "core-blocks",
67851
68783
  capScope: "system",
@@ -67881,6 +68813,13 @@ Object.freeze({
67881
68813
  access: "create",
67882
68814
  role: "admin"
67883
68815
  },
68816
+ "coreBlocks.reportAutomationRun": {
68817
+ capName: "core-blocks",
68818
+ capScope: "system",
68819
+ addonId: null,
68820
+ access: "create",
68821
+ role: "admin"
68822
+ },
67884
68823
  "coreBlocks.restart": {
67885
68824
  capName: "core-blocks",
67886
68825
  capScope: "system",
@@ -69750,6 +70689,13 @@ Object.freeze({
69750
70689
  access: "view",
69751
70690
  role: "viewer"
69752
70691
  },
70692
+ "groupActive.getStatus": {
70693
+ capName: "group-active",
70694
+ capScope: "device",
70695
+ addonId: null,
70696
+ access: "view",
70697
+ role: "viewer"
70698
+ },
69753
70699
  "groupCommands.getStatus": {
69754
70700
  capName: "group-commands",
69755
70701
  capScope: "device",
@@ -70716,6 +71662,13 @@ Object.freeze({
70716
71662
  access: "create",
70717
71663
  role: "admin"
70718
71664
  },
71665
+ "meter.getStatus": {
71666
+ capName: "meter",
71667
+ capScope: "device",
71668
+ addonId: null,
71669
+ access: "view",
71670
+ role: "viewer"
71671
+ },
70719
71672
  "metricsProvider.collectSnapshot": {
70720
71673
  capName: "metrics-provider",
70721
71674
  capScope: "system",
@@ -76440,7 +77393,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76440
77393
  label: t("Full brightness", "Luminosità massima"),
76441
77394
  phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
76442
77395
  icon: "sun",
76443
- args: { percentage: 100 }
77396
+ args: { level: 100 }
76444
77397
  },
76445
77398
  {
76446
77399
  id: "brightness.half",
@@ -76448,7 +77401,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76448
77401
  label: t("Half brightness", "Luminosità a metà"),
76449
77402
  phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
76450
77403
  icon: "sun-dim",
76451
- args: { percentage: 50 }
77404
+ args: { level: 50 }
76452
77405
  },
76453
77406
  {
76454
77407
  id: "brightness.off",
@@ -76456,16 +77409,16 @@ var ACTUATOR_CAP_VOCABULARY = {
76456
77409
  label: t("Brightness off", "Luminosità a zero"),
76457
77410
  phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
76458
77411
  icon: "lightbulb-off",
76459
- args: { percentage: 0 }
77412
+ args: { level: 0 }
76460
77413
  },
76461
77414
  {
76462
77415
  id: "brightness.set",
76463
77416
  method: "setBrightness",
76464
77417
  label: t("Set brightness", "Imposta la luminosità"),
76465
- phrase: t("Set the brightness of {device} to {percentage}", "Imposta la luminosità di {device} a {percentage}"),
77418
+ phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
76466
77419
  icon: "sun-medium",
76467
77420
  openArgs: [{
76468
- key: "percentage",
77421
+ key: "level",
76469
77422
  label: PERCENT,
76470
77423
  offer: {
76471
77424
  kind: "number",
@@ -76479,13 +77432,13 @@ var ACTUATOR_CAP_VOCABULARY = {
76479
77432
  ],
76480
77433
  state: [{
76481
77434
  kind: "numeric",
76482
- field: "percentage",
77435
+ field: "level",
76483
77436
  quantity: t("the brightness", "la luminosità"),
76484
77437
  label: t("Brightness", "Luminosità"),
76485
77438
  unit: "%",
76486
77439
  icon: "sun"
76487
77440
  }],
76488
- events: { onBrightnessChanged: { notOperatorFacing: "the `percentage` state trigger reads the same change" } }
77441
+ events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
76489
77442
  },
76490
77443
  color: {
76491
77444
  scope: "device",
@@ -76499,7 +77452,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76499
77452
  icon: "sun",
76500
77453
  args: { color: {
76501
77454
  mode: "mired",
76502
- mireds: 370
77455
+ colorTemperature: 370
76503
77456
  } }
76504
77457
  },
76505
77458
  {
@@ -76510,7 +77463,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76510
77463
  icon: "snowflake",
76511
77464
  args: { color: {
76512
77465
  mode: "mired",
76513
- mireds: 200
77466
+ colorTemperature: 200
76514
77467
  } }
76515
77468
  },
76516
77469
  {
@@ -77124,7 +78077,7 @@ var ACTUATOR_CAP_VOCABULARY = {
77124
78077
  label: t("Fan off", "Ventilatore spento"),
77125
78078
  phrase: t("Stop {device}", "Ferma {device}"),
77126
78079
  icon: "power-off",
77127
- args: { percentage: 0 }
78080
+ args: { speed: 0 }
77128
78081
  },
77129
78082
  {
77130
78083
  id: "fan.full",
@@ -77132,16 +78085,16 @@ var ACTUATOR_CAP_VOCABULARY = {
77132
78085
  label: t("Fan full", "Ventilatore al massimo"),
77133
78086
  phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
77134
78087
  icon: "fan",
77135
- args: { percentage: 100 }
78088
+ args: { speed: 100 }
77136
78089
  },
77137
78090
  {
77138
78091
  id: "fan.speed",
77139
78092
  method: "setPercentage",
77140
78093
  label: t("Set speed", "Imposta la velocità"),
77141
- phrase: t("Set the speed of {device} to {percentage}", "Imposta la velocità di {device} al {percentage}"),
78094
+ phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
77142
78095
  icon: "fan",
77143
78096
  openArgs: [{
77144
- key: "percentage",
78097
+ key: "speed",
77145
78098
  label: t("Speed", "Velocità"),
77146
78099
  offer: {
77147
78100
  kind: "number",
@@ -77203,7 +78156,7 @@ var ACTUATOR_CAP_VOCABULARY = {
77203
78156
  ],
77204
78157
  state: [{
77205
78158
  kind: "numeric",
77206
- field: "percentage",
78159
+ field: "speed",
77207
78160
  quantity: t("the speed", "la velocità"),
77208
78161
  label: t("Speed", "Velocità"),
77209
78162
  unit: "%",
@@ -78001,7 +78954,7 @@ var APPLIANCE_CAP_VOCABULARY = {
78001
78954
  },
78002
78955
  {
78003
78956
  kind: "numeric",
78004
- field: "progressPercent",
78957
+ field: "progress",
78005
78958
  quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
78006
78959
  label: t("Progress", "Avanzamento"),
78007
78960
  unit: "%",
@@ -78359,10 +79312,10 @@ var APPLIANCE_CAP_VOCABULARY = {
78359
79312
  id: "media.seek",
78360
79313
  method: "seek",
78361
79314
  label: t("Seek", "Vai al punto"),
78362
- phrase: t("Move {device} to {positionMs}", "Porta {device} al punto {positionMs}"),
79315
+ phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
78363
79316
  icon: "fast-forward",
78364
79317
  openArgs: [{
78365
- key: "positionMs",
79318
+ key: "position",
78366
79319
  label: t("Position", "Posizione"),
78367
79320
  offer: {
78368
79321
  kind: "number",
@@ -79411,7 +80364,7 @@ var SENSOR_CAP_VOCABULARY = {
79411
80364
  state: [
79412
80365
  {
79413
80366
  kind: "numeric",
79414
- field: "co2Ppm",
80367
+ field: "co2",
79415
80368
  quantity: t("the CO₂", "la CO₂"),
79416
80369
  label: t("CO₂", "CO₂"),
79417
80370
  unit: "ppm",
@@ -79419,7 +80372,7 @@ var SENSOR_CAP_VOCABULARY = {
79419
80372
  },
79420
80373
  {
79421
80374
  kind: "numeric",
79422
- field: "vocPpb",
80375
+ field: "voc",
79423
80376
  quantity: t("the VOC level", "il livello di COV"),
79424
80377
  label: t("VOC", "COV"),
79425
80378
  unit: "ppb",
@@ -79455,7 +80408,7 @@ var SENSOR_CAP_VOCABULARY = {
79455
80408
  noun: t("Light level", "Luminosità ambiente"),
79456
80409
  state: [{
79457
80410
  kind: "numeric",
79458
- field: "lux",
80411
+ field: "illuminance",
79459
80412
  quantity: t("the light level", "la luminosità"),
79460
80413
  label: t("Illuminance", "Illuminamento"),
79461
80414
  unit: "lx",
@@ -79618,6 +80571,10 @@ var SENSOR_CAP_VOCABULARY = {
79618
80571
  icon: "flame"
79619
80572
  }]
79620
80573
  },
80574
+ "group-active": {
80575
+ scope: "device",
80576
+ noun: t("Group state", "Stato del gruppo")
80577
+ },
79621
80578
  "group-commands": {
79622
80579
  scope: "device",
79623
80580
  noun: t("Group command", "Comando di gruppo")
@@ -79654,7 +80611,7 @@ var SENSOR_CAP_VOCABULARY = {
79654
80611
  noun: t("Humidity", "Umidità"),
79655
80612
  state: [{
79656
80613
  kind: "numeric",
79657
- field: "percent",
80614
+ field: "humidity",
79658
80615
  quantity: t("the humidity", "l’umidità"),
79659
80616
  label: t("Humidity", "Umidità"),
79660
80617
  unit: "%",
@@ -79674,6 +80631,17 @@ var SENSOR_CAP_VOCABULARY = {
79674
80631
  }],
79675
80632
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
79676
80633
  },
80634
+ meter: {
80635
+ scope: "device",
80636
+ noun: t("Meter", "Contatore"),
80637
+ state: [{
80638
+ kind: "numeric",
80639
+ field: "value",
80640
+ quantity: t("the total", "il totale"),
80641
+ label: t("Total", "Totale"),
80642
+ icon: "gauge"
80643
+ }]
80644
+ },
79677
80645
  "numeric-sensor": {
79678
80646
  scope: "device",
79679
80647
  noun: t("Sensor", "Sensore"),
@@ -79691,7 +80659,7 @@ var SENSOR_CAP_VOCABULARY = {
79691
80659
  state: [
79692
80660
  {
79693
80661
  kind: "numeric",
79694
- field: "watts",
80662
+ field: "power",
79695
80663
  quantity: t("the power draw", "il consumo"),
79696
80664
  label: t("Power", "Potenza"),
79697
80665
  unit: "W",
@@ -79699,7 +80667,7 @@ var SENSOR_CAP_VOCABULARY = {
79699
80667
  },
79700
80668
  {
79701
80669
  kind: "numeric",
79702
- field: "kwhTotal",
80670
+ field: "energy",
79703
80671
  quantity: t("the energy used", "l’energia consumata"),
79704
80672
  label: t("Energy", "Energia"),
79705
80673
  unit: "kWh",
@@ -79707,7 +80675,7 @@ var SENSOR_CAP_VOCABULARY = {
79707
80675
  },
79708
80676
  {
79709
80677
  kind: "numeric",
79710
- field: "volts",
80678
+ field: "voltage",
79711
80679
  quantity: t("the voltage", "la tensione"),
79712
80680
  label: t("Voltage", "Tensione"),
79713
80681
  unit: "V",
@@ -79715,7 +80683,7 @@ var SENSOR_CAP_VOCABULARY = {
79715
80683
  },
79716
80684
  {
79717
80685
  kind: "numeric",
79718
- field: "amps",
80686
+ field: "current",
79719
80687
  quantity: t("the current", "la corrente"),
79720
80688
  label: t("Current", "Corrente"),
79721
80689
  unit: "A",
@@ -79732,13 +80700,6 @@ var SENSOR_CAP_VOCABULARY = {
79732
80700
  label: t("Where", "Posizione"),
79733
80701
  phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
79734
80702
  icon: "map-pin"
79735
- }, {
79736
- kind: "numeric",
79737
- field: "batteryPercent",
79738
- quantity: t("the phone battery", "la batteria del telefono"),
79739
- label: t("Battery", "Batteria"),
79740
- unit: "%",
79741
- icon: "battery"
79742
80703
  }]
79743
80704
  },
79744
80705
  "pressure-sensor": {
@@ -79746,7 +80707,7 @@ var SENSOR_CAP_VOCABULARY = {
79746
80707
  noun: t("Pressure", "Pressione"),
79747
80708
  state: [{
79748
80709
  kind: "numeric",
79749
- field: "hpa",
80710
+ field: "pressure",
79750
80711
  quantity: t("the pressure", "la pressione"),
79751
80712
  label: t("Pressure", "Pressione"),
79752
80713
  unit: "hPa",
@@ -79782,7 +80743,7 @@ var SENSOR_CAP_VOCABULARY = {
79782
80743
  noun: t("Temperature", "Temperatura"),
79783
80744
  state: [{
79784
80745
  kind: "numeric",
79785
- field: "celsius",
80746
+ field: "temperature",
79786
80747
  quantity: t("the temperature", "la temperatura"),
79787
80748
  label: t("Temperature", "Temperatura"),
79788
80749
  unit: "°C",
@@ -79853,7 +80814,7 @@ var SENSOR_CAP_VOCABULARY = {
79853
80814
  state: [
79854
80815
  {
79855
80816
  kind: "numeric",
79856
- field: "percentage",
80817
+ field: "level",
79857
80818
  quantity: t("the battery level", "il livello della batteria"),
79858
80819
  label: t("Battery", "Batteria"),
79859
80820
  unit: "%",
@@ -79895,7 +80856,7 @@ var SENSOR_CAP_VOCABULARY = {
79895
80856
  icon: "battery-charging"
79896
80857
  }
79897
80858
  ],
79898
- events: { onStatusChanged: { notOperatorFacing: "the percentage / sleeping / charging state triggers each read one field of this change" } },
80859
+ events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
79899
80860
  extraEvents: [{
79900
80861
  category: EventCategory.DeviceAwake,
79901
80862
  label: t("Woke up", "Risvegliato"),
@@ -79913,7 +80874,7 @@ var SENSOR_CAP_VOCABULARY = {
79913
80874
  noun: t("Network link", "Collegamento di rete"),
79914
80875
  state: [{
79915
80876
  kind: "numeric",
79916
- field: "signalPercent",
80877
+ field: "signal",
79917
80878
  quantity: t("the signal strength", "l’intensità del segnale"),
79918
80879
  label: t("Signal", "Segnale"),
79919
80880
  unit: "%",
@@ -80006,6 +80967,8 @@ var ML = "model and training machinery — no device action";
80006
80967
  var INTERNAL = "internal plumbing between addons — never operator-facing";
80007
80968
  /** Every system-scoped cap, with why it is not a device's vocabulary. */
80008
80969
  var SYSTEM_CAP_VOCABULARY = {
80970
+ "action-source": system(INTERNAL),
80971
+ actions: system("declared actions — run from the Actions page and from the cameras that link them"),
80009
80972
  "addon-pages": system(UI_PLUMBING),
80010
80973
  "addon-pages-source": system(UI_PLUMBING),
80011
80974
  "addon-routes": system(UI_PLUMBING),
@@ -80227,6 +81190,31 @@ Object.freeze({
80227
81190
  form: "single",
80228
81191
  optional: false
80229
81192
  }],
81193
+ "actions.get": [{
81194
+ name: "deviceId",
81195
+ form: "single",
81196
+ optional: true
81197
+ }],
81198
+ "actions.getLinks": [{
81199
+ name: "deviceId",
81200
+ form: "single",
81201
+ optional: false
81202
+ }],
81203
+ "actions.listForCamera": [{
81204
+ name: "deviceId",
81205
+ form: "single",
81206
+ optional: false
81207
+ }],
81208
+ "actions.run": [{
81209
+ name: "deviceId",
81210
+ form: "single",
81211
+ optional: true
81212
+ }],
81213
+ "actions.setLinks": [{
81214
+ name: "deviceId",
81215
+ form: "single",
81216
+ optional: false
81217
+ }],
80230
81218
  "addonSettings.getDeviceSettings": [{
80231
81219
  name: "deviceId",
80232
81220
  form: "single",
@@ -81178,6 +82166,11 @@ Object.freeze({
81178
82166
  form: "single",
81179
82167
  optional: false
81180
82168
  }],
82169
+ "groupActive.getStatus": [{
82170
+ name: "deviceId",
82171
+ form: "single",
82172
+ optional: false
82173
+ }],
81181
82174
  "groupCommands.getStatus": [{
81182
82175
  name: "deviceId",
81183
82176
  form: "single",
@@ -81388,6 +82381,11 @@ Object.freeze({
81388
82381
  form: "single",
81389
82382
  optional: false
81390
82383
  }],
82384
+ "meter.getStatus": [{
82385
+ name: "deviceId",
82386
+ form: "single",
82387
+ optional: false
82388
+ }],
81391
82389
  "motion.getStatus": [{
81392
82390
  name: "deviceId",
81393
82391
  form: "single",
@@ -82995,7 +83993,6 @@ Object.freeze({
82995
83993
  "network-access": "ingress",
82996
83994
  "smtp-provider": "email"
82997
83995
  });
82998
- DeviceType.Camera;
82999
83996
  /**
83000
83997
  * A saved Customize assignment (D936). The schema is the type: callers use
83001
83998
  * `z.infer`, they do not restate the shape.
@@ -84299,6 +85296,7 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
84299
85296
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
84300
85297
  DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
84301
85298
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
85299
+ String.raw`(?<=^|["'(\s>,\[{])`;
84302
85300
  var MB = 1024 * 1024;
84303
85301
  1024 * MB, 3072 * MB;
84304
85302
  process.platform, process.env["SystemRoot"];
@@ -133598,7 +134596,7 @@ function applyServiceLabel(service, name) {
133598
134596
  var LOW_BATTERY_THRESHOLD_PCT = 20;
133599
134597
  /**
133600
134598
  * Mapping:
133601
- * - `BatteryStatus.percentage` (0..100) → `Characteristic.BatteryLevel`
134599
+ * - `BatteryStatus.level` (0..100) → `Characteristic.BatteryLevel`
133602
134600
  * - `BatteryStatus.charging`:
133603
134601
  * `'none'` → `ChargingState.NOT_CHARGING`
133604
134602
  * `'dc' | 'solar'` → `ChargingState.CHARGING`
@@ -133606,12 +134604,12 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
133606
134604
  * either value would be a claim
133607
134605
  * - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
133608
134606
  */
133609
- var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
133610
- if (status.percentage === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
134607
+ var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ level: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
134608
+ if (status.level === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
133611
134609
  characteristic: import_dist.Characteristic.ChargingState,
133612
134610
  value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
133613
134611
  }];
133614
- const pct = Math.max(0, Math.min(100, Math.round(status.percentage)));
134612
+ const pct = Math.max(0, Math.min(100, Math.round(status.level)));
133615
134613
  return [
133616
134614
  {
133617
134615
  characteristic: import_dist.Characteristic.BatteryLevel,
@@ -133713,7 +134711,7 @@ async function buildChildSwitch(bctx, subtype, deviceType) {
133713
134711
  }
133714
134712
  if (useLightbulb) try {
133715
134713
  const status = await proxy.brightness?.getStatus({});
133716
- if (status && typeof status.percentage === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, status.percentage);
134714
+ if (status && typeof status.level === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, status.level);
133717
134715
  } catch (err) {
133718
134716
  log.debug("export-hap: child brightness.getStatus failed (non-fatal)", { meta: { error: errMsg$13(err) } });
133719
134717
  }
@@ -133732,7 +134730,7 @@ async function buildChildSwitch(bctx, subtype, deviceType) {
133732
134730
  const percentage = typeof value === "number" ? value : Number(value);
133733
134731
  if (!Number.isFinite(percentage)) return;
133734
134732
  try {
133735
- await proxy.brightness?.setBrightness({ percentage });
134733
+ await proxy.brightness?.setBrightness({ level: percentage });
133736
134734
  } catch (err) {
133737
134735
  log.warn("export-hap: child brightness.setBrightness failed", { meta: {
133738
134736
  percentage,
@@ -133749,7 +134747,7 @@ async function buildChildSwitch(bctx, subtype, deviceType) {
133749
134747
  }
133750
134748
  if (useLightbulb && proxy.state.brightness) {
133751
134749
  const unsubBrightness = proxy.state.brightness.subscribe((value) => {
133752
- if (value && typeof value.percentage === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, value.percentage);
134750
+ if (value && typeof value.level === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, value.level);
133753
134751
  });
133754
134752
  unsubscribes.push(unsubBrightness);
133755
134753
  }
@@ -134295,9 +135293,9 @@ var SENSOR_SPECS = {
134295
135293
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.TemperatureSensor, name, subtype),
134296
135294
  getStatus: (proxy) => proxy.temperatureSensor?.getStatus({}),
134297
135295
  subscribe: (proxy, onValue) => proxy.state.temperatureSensor?.subscribe(onValue) ?? null,
134298
- read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => status.celsius === null ? [] : [{
135296
+ read: reader(TemperatureSensorStatusSchema.pick({ temperature: true }), (status) => status.temperature === null ? [] : [{
134299
135297
  characteristic: import_dist.Characteristic.CurrentTemperature,
134300
- value: status.celsius
135298
+ value: status.temperature
134301
135299
  }])
134302
135300
  },
134303
135301
  "humidity-sensor": {
@@ -134305,9 +135303,9 @@ var SENSOR_SPECS = {
134305
135303
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.HumiditySensor, name, subtype),
134306
135304
  getStatus: (proxy) => proxy.humiditySensor?.getStatus({}),
134307
135305
  subscribe: (proxy, onValue) => proxy.state.humiditySensor?.subscribe(onValue) ?? null,
134308
- read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => status.percent === null ? [] : [{
135306
+ read: reader(HumiditySensorStatusSchema.pick({ humidity: true }), (status) => status.humidity === null ? [] : [{
134309
135307
  characteristic: import_dist.Characteristic.CurrentRelativeHumidity,
134310
- value: status.percent
135308
+ value: status.humidity
134311
135309
  }])
134312
135310
  },
134313
135311
  "ambient-light-sensor": {
@@ -134315,9 +135313,9 @@ var SENSOR_SPECS = {
134315
135313
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.LightSensor, name, subtype),
134316
135314
  getStatus: (proxy) => proxy.ambientLightSensor?.getStatus({}),
134317
135315
  subscribe: (proxy, onValue) => proxy.state.ambientLightSensor?.subscribe(onValue) ?? null,
134318
- read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => status.lux === null ? [] : [{
135316
+ read: reader(AmbientLightSensorStatusSchema.pick({ illuminance: true }), (status) => status.illuminance === null ? [] : [{
134319
135317
  characteristic: import_dist.Characteristic.CurrentAmbientLightLevel,
134320
- value: Math.max(MIN_LUX, status.lux)
135318
+ value: Math.max(MIN_LUX, status.illuminance)
134321
135319
  }])
134322
135320
  }
134323
135321
  };