@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.
@@ -39,7 +39,7 @@ var __copyProps = (to, from, except, desc) => {
39
39
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-CT-hz5Rb.mjs
42
+ //#region ../types/dist/event-category-DmZDPDf_.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -666,7 +666,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
666
666
  * (a track was promoted to a stationary-registry entry) or departs (the
667
667
  * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
668
668
  * the dedicated "Stationary" section — never the live event feed. Payload:
669
- * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
669
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
670
670
  */
671
671
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
672
672
  /**
@@ -804,6 +804,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
804
804
  */
805
805
  EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
806
806
  /**
807
+ * An action run started or ended. Emitted by the `actions` surface.
808
+ * Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
809
+ */
810
+ EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
811
+ /**
807
812
  * Progress update from a running model conversion job.
808
813
  * Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
809
814
  * Emitted by `addon-model-studio` on the converting node.
@@ -5482,7 +5487,7 @@ var ZodIssueCode = {
5482
5487
  var ZodFirstPartyTypeKind;
5483
5488
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5484
5489
  //#endregion
5485
- //#region ../types/dist/sleep-bykKrTgu.mjs
5490
+ //#region ../types/dist/sleep-Crlmu_tO.mjs
5486
5491
  /**
5487
5492
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5488
5493
  * window to float samples (D455).
@@ -8590,6 +8595,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
8590
8595
  /** Every capability name, so addon code can check a name without the schema graph. */
8591
8596
  var CAP_NAMES = Object.freeze([
8592
8597
  "accessories",
8598
+ "action-source",
8599
+ "actions",
8593
8600
  "addon-pages",
8594
8601
  "addon-pages-source",
8595
8602
  "addon-routes",
@@ -8663,6 +8670,7 @@ var CAP_NAMES = Object.freeze([
8663
8670
  "filesystem-browse",
8664
8671
  "flood",
8665
8672
  "gas",
8673
+ "group-active",
8666
8674
  "group-commands",
8667
8675
  "group-status",
8668
8676
  "heating-valve",
@@ -8685,6 +8693,7 @@ var CAP_NAMES = Object.freeze([
8685
8693
  "login-method",
8686
8694
  "media-player",
8687
8695
  "mesh-network",
8696
+ "meter",
8688
8697
  "metrics-provider",
8689
8698
  "model-convert",
8690
8699
  "model-distributor",
@@ -8776,11 +8785,11 @@ var CAP_NAMES = Object.freeze([
8776
8785
  Object.freeze({
8777
8786
  "air-quality-sensor": [
8778
8787
  {
8779
- "path": "co2Ppm",
8788
+ "path": "co2",
8780
8789
  "valueType": "number"
8781
8790
  },
8782
8791
  {
8783
- "path": "vocPpb",
8792
+ "path": "voc",
8784
8793
  "valueType": "number"
8785
8794
  },
8786
8795
  {
@@ -8830,7 +8839,7 @@ Object.freeze({
8830
8839
  }
8831
8840
  ],
8832
8841
  "ambient-light-sensor": [{
8833
- "path": "lux",
8842
+ "path": "illuminance",
8834
8843
  "valueType": "number"
8835
8844
  }],
8836
8845
  "audio-metrics": [
@@ -8891,7 +8900,7 @@ Object.freeze({
8891
8900
  ],
8892
8901
  "battery": [
8893
8902
  {
8894
- "path": "percentage",
8903
+ "path": "level",
8895
8904
  "valueType": "number"
8896
8905
  },
8897
8906
  {
@@ -8913,7 +8922,7 @@ Object.freeze({
8913
8922
  "valueType": "number"
8914
8923
  },
8915
8924
  {
8916
- "path": "volts",
8925
+ "path": "voltage",
8917
8926
  "valueType": "number"
8918
8927
  },
8919
8928
  {
@@ -8934,7 +8943,7 @@ Object.freeze({
8934
8943
  "valueType": "boolean"
8935
8944
  }],
8936
8945
  "brightness": [{
8937
- "path": "percentage",
8946
+ "path": "level",
8938
8947
  "valueType": "number"
8939
8948
  }],
8940
8949
  "broker": [{
@@ -9135,7 +9144,7 @@ Object.freeze({
9135
9144
  "valueType": "number"
9136
9145
  },
9137
9146
  {
9138
- "path": "mireds",
9147
+ "path": "colorTemperature",
9139
9148
  "valueType": "number"
9140
9149
  }
9141
9150
  ],
@@ -9314,15 +9323,15 @@ Object.freeze({
9314
9323
  "valueType": "string"
9315
9324
  },
9316
9325
  {
9317
- "path": "remainingSeconds",
9326
+ "path": "remaining",
9318
9327
  "valueType": "number"
9319
9328
  },
9320
9329
  {
9321
- "path": "delayedStartSeconds",
9330
+ "path": "delayedStart",
9322
9331
  "valueType": "number"
9323
9332
  },
9324
9333
  {
9325
- "path": "progressPercent",
9334
+ "path": "progress",
9326
9335
  "valueType": "number"
9327
9336
  },
9328
9337
  {
@@ -9436,7 +9445,7 @@ Object.freeze({
9436
9445
  ],
9437
9446
  "fan-control": [
9438
9447
  {
9439
- "path": "percentage",
9448
+ "path": "speed",
9440
9449
  "valueType": "number"
9441
9450
  },
9442
9451
  {
@@ -9483,6 +9492,10 @@ Object.freeze({
9483
9492
  "path": "detected",
9484
9493
  "valueType": "boolean"
9485
9494
  }],
9495
+ "group-active": [{
9496
+ "path": "active",
9497
+ "valueType": "boolean"
9498
+ }],
9486
9499
  "group-status": [
9487
9500
  {
9488
9501
  "path": "included",
@@ -9532,7 +9545,7 @@ Object.freeze({
9532
9545
  }
9533
9546
  ],
9534
9547
  "humidity-sensor": [{
9535
- "path": "percent",
9548
+ "path": "humidity",
9536
9549
  "valueType": "number"
9537
9550
  }],
9538
9551
  "image": [{
@@ -9642,7 +9655,7 @@ Object.freeze({
9642
9655
  "valueType": "number"
9643
9656
  },
9644
9657
  {
9645
- "path": "progressPercent",
9658
+ "path": "progress",
9646
9659
  "valueType": "number"
9647
9660
  },
9648
9661
  {
@@ -9721,11 +9734,11 @@ Object.freeze({
9721
9734
  "valueType": "string"
9722
9735
  },
9723
9736
  {
9724
- "path": "positionMs",
9737
+ "path": "position",
9725
9738
  "valueType": "number"
9726
9739
  },
9727
9740
  {
9728
- "path": "durationMs",
9741
+ "path": "duration",
9729
9742
  "valueType": "number"
9730
9743
  },
9731
9744
  {
@@ -9742,6 +9755,10 @@ Object.freeze({
9742
9755
  ]
9743
9756
  }
9744
9757
  ],
9758
+ "meter": [{
9759
+ "path": "value",
9760
+ "valueType": "number"
9761
+ }],
9745
9762
  "motion": [
9746
9763
  {
9747
9764
  "path": "detected",
@@ -9823,11 +9840,11 @@ Object.freeze({
9823
9840
  ]
9824
9841
  },
9825
9842
  {
9826
- "path": "signalPercent",
9843
+ "path": "signal",
9827
9844
  "valueType": "number"
9828
9845
  },
9829
9846
  {
9830
- "path": "rssiDbm",
9847
+ "path": "rssi",
9831
9848
  "valueType": "number"
9832
9849
  },
9833
9850
  {
@@ -9882,6 +9899,18 @@ Object.freeze({
9882
9899
  "path": "foodLevel",
9883
9900
  "valueType": "number"
9884
9901
  },
9902
+ {
9903
+ "path": "bowlFood",
9904
+ "valueType": "number"
9905
+ },
9906
+ {
9907
+ "path": "eating",
9908
+ "valueType": "boolean"
9909
+ },
9910
+ {
9911
+ "path": "supportsMarkRefilled",
9912
+ "valueType": "boolean"
9913
+ },
9885
9914
  {
9886
9915
  "path": "food1",
9887
9916
  "valueType": "number"
@@ -9946,23 +9975,23 @@ Object.freeze({
9946
9975
  ],
9947
9976
  "power-meter": [
9948
9977
  {
9949
- "path": "watts",
9978
+ "path": "power",
9950
9979
  "valueType": "number"
9951
9980
  },
9952
9981
  {
9953
- "path": "kwhTotal",
9982
+ "path": "energy",
9954
9983
  "valueType": "number"
9955
9984
  },
9956
9985
  {
9957
- "path": "volts",
9986
+ "path": "voltage",
9958
9987
  "valueType": "number"
9959
9988
  },
9960
9989
  {
9961
- "path": "amps",
9990
+ "path": "current",
9962
9991
  "valueType": "number"
9963
9992
  },
9964
9993
  {
9965
- "path": "va",
9994
+ "path": "apparentPower",
9966
9995
  "valueType": "number"
9967
9996
  },
9968
9997
  {
@@ -9990,14 +10019,10 @@ Object.freeze({
9990
10019
  {
9991
10020
  "path": "gps.accuracyMeters",
9992
10021
  "valueType": "number"
9993
- },
9994
- {
9995
- "path": "batteryPercent",
9996
- "valueType": "number"
9997
10022
  }
9998
10023
  ],
9999
10024
  "pressure-sensor": [{
10000
- "path": "hpa",
10025
+ "path": "pressure",
10001
10026
  "valueType": "number"
10002
10027
  }],
10003
10028
  "privacy-mask": [{
@@ -10311,7 +10336,7 @@ Object.freeze({
10311
10336
  "valueType": "boolean"
10312
10337
  }],
10313
10338
  "temperature-sensor": [{
10314
- "path": "celsius",
10339
+ "path": "temperature",
10315
10340
  "valueType": "number"
10316
10341
  }],
10317
10342
  "update": [
@@ -10359,7 +10384,7 @@ Object.freeze({
10359
10384
  "valueType": "string"
10360
10385
  },
10361
10386
  {
10362
- "path": "progressPercent",
10387
+ "path": "progress",
10363
10388
  "valueType": "number"
10364
10389
  },
10365
10390
  {
@@ -10844,7 +10869,7 @@ function errMsg$16(err) {
10844
10869
  return String(err);
10845
10870
  }
10846
10871
  //#endregion
10847
- //#region ../types/dist/composition-B2rw5L29.mjs
10872
+ //#region ../types/dist/composition-CZImLpOI.mjs
10848
10873
  var AUDIO_ENCODER_BY_CODEC = {
10849
10874
  opus: "libopus",
10850
10875
  aac: "aac",
@@ -11754,6 +11779,13 @@ var table = {
11754
11779
  apply: () => {
11755
11780
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11756
11781
  }
11782
+ },
11783
+ schmitt: {
11784
+ minArgs: 3,
11785
+ maxArgs: 5,
11786
+ apply: () => {
11787
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11788
+ }
11757
11789
  }
11758
11790
  };
11759
11791
  Object.freeze(Object.assign(Object.create(null), table));
@@ -12215,6 +12247,79 @@ var APPLIANCE_KINDS = [
12215
12247
  ];
12216
12248
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
12217
12249
  /**
12250
+ * Statistics and integrals over a history read (D944).
12251
+ *
12252
+ * Pure: the same points always give the same answer, so a restart recomputes
12253
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
12254
+ * never the mean of the samples. A hole with no held value is not integrated
12255
+ * as zero. A truncated read is not published.
12256
+ */
12257
+ var STATISTIC_STATS = [
12258
+ "min",
12259
+ "max",
12260
+ "mean",
12261
+ "sum",
12262
+ "count",
12263
+ "change"
12264
+ ];
12265
+ /**
12266
+ * The range a statistics or integral helper asks history for (D944).
12267
+ *
12268
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
12269
+ * or 25 hours across a DST change. A tier is eligible only when its retention
12270
+ * is strictly longer than the longest that range can be. Forever qualifies.
12271
+ * Equal to a tier's retention is a refusal, not a short answer.
12272
+ */
12273
+ var MINUTE_MS = 6e4;
12274
+ var HOUR_MS = 60 * MINUTE_MS;
12275
+ var DAY_MS = 24 * HOUR_MS;
12276
+ var ROLLING_SPANS = [
12277
+ "1h",
12278
+ "24h",
12279
+ "2d",
12280
+ "7d",
12281
+ "30d",
12282
+ "custom"
12283
+ ];
12284
+ var CALENDAR_PERIODS = [
12285
+ "today",
12286
+ "yesterday",
12287
+ "this-week",
12288
+ "this-month"
12289
+ ];
12290
+ var RESET_PERIODS = [
12291
+ "never",
12292
+ "daily",
12293
+ "weekly",
12294
+ "monthly"
12295
+ ];
12296
+ 5 * MINUTE_MS;
12297
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
12298
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
12299
+ var rollingWindowObject = object({
12300
+ kind: literal("rolling"),
12301
+ span: _enum(ROLLING_SPANS),
12302
+ customMinutes: number().int().min(5).optional()
12303
+ }).check((payload) => {
12304
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
12305
+ code: "custom",
12306
+ message: "a custom range needs a duration in minutes",
12307
+ path: ["customMinutes"],
12308
+ input: payload.value
12309
+ });
12310
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
12311
+ code: "custom",
12312
+ message: "only a custom range carries a duration",
12313
+ path: ["customMinutes"],
12314
+ input: payload.value
12315
+ });
12316
+ });
12317
+ var RollingWindowSchema = rollingWindowObject;
12318
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
12319
+ kind: literal("calendar"),
12320
+ period: _enum(CALENDAR_PERIODS)
12321
+ })]);
12322
+ /**
12218
12323
  * A composition source identity: `(addonId, stableId)`, never a numeric device
12219
12324
  * id. Split out so helper schemas can name it without a cycle through
12220
12325
  * `composition.ts` (D659).
@@ -12240,7 +12345,13 @@ var GROUP_TEMPLATE_IDS = [
12240
12345
  "occupancy",
12241
12346
  "binary",
12242
12347
  "switch",
12243
- "light"
12348
+ "light",
12349
+ "fan",
12350
+ "cover",
12351
+ "valve",
12352
+ "lock",
12353
+ "media-player",
12354
+ "climate"
12244
12355
  ];
12245
12356
  var NUMERIC_AGGREGATES = [
12246
12357
  "mean",
@@ -12270,22 +12381,73 @@ var HelperMemberSchema = object({
12270
12381
  cap: string().min(1),
12271
12382
  fieldPath: string().min(1)
12272
12383
  });
12273
- var HelperSpecSchema = discriminatedUnion("kind", [object({
12274
- kind: literal("group"),
12275
- templateId: GroupTemplateIdSchema,
12276
- aggregate: AggregateReducerSchema,
12277
- members: array(HelperMemberSchema).min(1).max(64),
12278
- /** Actuator groups only. Readings leave this unset. */
12279
- active: ActiveCriterionSchema.optional()
12280
- }), object({
12281
- kind: literal("appliance"),
12282
- templateId: literal(APPLIANCE_TEMPLATE_ID),
12283
- appliance: _enum(APPLIANCE_KINDS),
12284
- thresholdWatts: number().positive(),
12285
- startDwellMs: number().int().nonnegative(),
12286
- stopDwellMs: number().int().nonnegative(),
12287
- member: HelperMemberSchema
12288
- })]);
12384
+ var HelperSpecSchema = discriminatedUnion("kind", [
12385
+ object({
12386
+ kind: literal("group"),
12387
+ templateId: GroupTemplateIdSchema,
12388
+ aggregate: AggregateReducerSchema,
12389
+ members: array(HelperMemberSchema).min(1).max(64),
12390
+ /** Actuator groups only. Readings leave this unset. */
12391
+ active: ActiveCriterionSchema.optional()
12392
+ }),
12393
+ object({
12394
+ kind: literal("appliance"),
12395
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
12396
+ appliance: _enum(APPLIANCE_KINDS),
12397
+ thresholdWatts: number().positive(),
12398
+ startDwellMs: number().int().nonnegative(),
12399
+ stopDwellMs: number().int().nonnegative(),
12400
+ member: HelperMemberSchema
12401
+ }),
12402
+ object({
12403
+ kind: literal("statistic"),
12404
+ stat: _enum(STATISTIC_STATS),
12405
+ window: StatisticWindowSchema,
12406
+ source: HelperMemberSchema
12407
+ }),
12408
+ object({
12409
+ kind: literal("integral"),
12410
+ reset: _enum(RESET_PERIODS),
12411
+ output: _enum(["energy", "meter"]),
12412
+ source: HelperMemberSchema
12413
+ }),
12414
+ object({
12415
+ kind: literal("threshold"),
12416
+ source: HelperMemberSchema,
12417
+ high: number(),
12418
+ low: number(),
12419
+ onForMs: number().int().nonnegative(),
12420
+ offForMs: number().int().nonnegative()
12421
+ }),
12422
+ object({
12423
+ kind: literal("arithmetic"),
12424
+ op: _enum([
12425
+ "sum",
12426
+ "difference",
12427
+ "ratio"
12428
+ ]),
12429
+ inputs: array(HelperMemberSchema).min(2).max(64)
12430
+ }),
12431
+ object({
12432
+ kind: literal("expression"),
12433
+ expr: string().min(1),
12434
+ inputs: array(object({
12435
+ name: string().min(1),
12436
+ member: HelperMemberSchema
12437
+ })).min(1).max(64),
12438
+ output: _enum(["number", "boolean"])
12439
+ }),
12440
+ object({
12441
+ kind: literal("derivative"),
12442
+ window: RollingWindowSchema,
12443
+ per: _enum([
12444
+ "second",
12445
+ "minute",
12446
+ "hour"
12447
+ ]),
12448
+ source: HelperMemberSchema
12449
+ })
12450
+ ]);
12289
12451
  /** A composed device's stableId is this prefix plus the block id. */
12290
12452
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12291
12453
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -12346,6 +12508,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12346
12508
  "all"
12347
12509
  ]),
12348
12510
  reads: array(CompositionFieldReadSchema).min(1).max(64),
12511
+ /**
12512
+ * Set when the reads are an enum state, not a yes/no: the listed states
12513
+ * count as active (a cover is `open`). A state outside the list is inactive;
12514
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
12515
+ */
12516
+ activeWhen: array(string().min(1)).min(1).optional(),
12349
12517
  /** `value` is the reading; the others are the member counts. */
12350
12518
  publish: _enum([
12351
12519
  "value",
@@ -12359,6 +12527,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12359
12527
  "omit",
12360
12528
  "offline"
12361
12529
  ])
12530
+ }),
12531
+ object({
12532
+ kind: literal("series"),
12533
+ read: CompositionFieldReadSchema,
12534
+ /** `value` is the statistic or the integral. The others are the gap counts. */
12535
+ publish: _enum([
12536
+ "value",
12537
+ "included",
12538
+ "excluded",
12539
+ "total"
12540
+ ]),
12541
+ /**
12542
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
12543
+ * device unseeded until history answers, so a restart cannot publish 0.
12544
+ */
12545
+ empty: _enum([
12546
+ "null",
12547
+ "omit",
12548
+ "offline"
12549
+ ])
12362
12550
  })
12363
12551
  ]);
12364
12552
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -16020,6 +16208,14 @@ var AutomationConditionLeafSchema = object({
16020
16208
  array(union([string(), number()]))
16021
16209
  ])
16022
16210
  });
16211
+ var AutomationConditionStationaryPresentSchema = object({
16212
+ kind: literal("stationary-present"),
16213
+ deviceId: number().int().nonnegative(),
16214
+ /** Class names; a macro class matches every raw class that maps to it. */
16215
+ classes: array(string().min(1)).min(1).optional(),
16216
+ /** The parked object must be in at least one of these zones. */
16217
+ zones: array(string().min(1)).min(1).optional()
16218
+ });
16023
16219
  /**
16024
16220
  * The expression leaf, declared as a plain object rather than an intersection
16025
16221
  * with {@link ExpressionSourceSchema}: a discriminated union has to be able to
@@ -16053,7 +16249,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
16053
16249
  child: AutomationConditionSchema
16054
16250
  }),
16055
16251
  AutomationConditionLeafSchema,
16056
- AutomationConditionExpressionSchema
16252
+ AutomationConditionExpressionSchema,
16253
+ AutomationConditionStationaryPresentSchema
16057
16254
  ]));
16058
16255
  /**
16059
16256
  * What starts a run.
@@ -16094,7 +16291,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
16094
16291
  kind: literal("schedule"),
16095
16292
  cron: string().min(1).max(120)
16096
16293
  }),
16097
- object({ kind: literal("manual") })
16294
+ object({ kind: literal("manual") }),
16295
+ object({
16296
+ kind: literal("detection"),
16297
+ /** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
16298
+ * matches every raw class that maps to it; any other name matches
16299
+ * exactly. */
16300
+ classes: array(string().min(1)).min(1),
16301
+ deviceIds: array(number().int().nonnegative()).min(1),
16302
+ /** The track must have visited at least one of these zones. */
16303
+ zones: array(string().min(1)).min(1).optional(),
16304
+ /** Best-so-far confidence the track must reach. */
16305
+ minScore: number().min(0).max(1).optional()
16306
+ }),
16307
+ object({
16308
+ kind: literal("stationary"),
16309
+ deviceIds: array(number().int().nonnegative()).min(1),
16310
+ /** Class names; a macro class matches like the detection trigger. */
16311
+ classes: array(string().min(1)).min(1).optional(),
16312
+ /** The parked object must be in at least one of these zones. */
16313
+ zones: array(string().min(1)).min(1).optional(),
16314
+ /** `appeared`: it became parked. `departed`: the registry retired it.
16315
+ * The vocabulary of `PipelineAnalyticsStationaryChanged`. */
16316
+ phase: _enum(["appeared", "departed"])
16317
+ }),
16318
+ object({
16319
+ kind: literal("interval"),
16320
+ minutes: number().int().min(1).max(1440)
16321
+ })
16098
16322
  ]);
16099
16323
  /**
16100
16324
  * One action step.
@@ -16114,28 +16338,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
16114
16338
  * is called. The runner still receives a number and is untouched; the
16115
16339
  * resolution is the recipe's job, not the runner's.
16116
16340
  */
16341
+ var AutomationWaitStepSchema = object({
16342
+ kind: literal("wait"),
16343
+ seconds: number().min(0).max(300)
16344
+ });
16345
+ var AutomationCapStepSchema = object({
16346
+ kind: literal("cap"),
16347
+ /**
16348
+ * One device, several same-family devices (locks / climate family / …),
16349
+ * or `{ $var }` for the device that triggered the run. An array is
16350
+ * fan-out at codegen — each id gets the same cap.method call.
16351
+ */
16352
+ deviceId: union([
16353
+ number().int(),
16354
+ array(number().int()).min(1),
16355
+ object({ $var: string().min(1) })
16356
+ ]),
16357
+ cap: string().min(1),
16358
+ method: string().min(1),
16359
+ /** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
16360
+ * SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
16361
+ * the expression leaf. */
16362
+ args: record(string(), unknown()).optional()
16363
+ });
16364
+ /**
16365
+ * The steps an internal Action may contain: cap and wait, and nothing that can
16366
+ * call back into an Action — so an Action can never reach itself (no cycles).
16367
+ */
16368
+ var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
16117
16369
  var AutomationActionSchema = discriminatedUnion("kind", [
16370
+ AutomationWaitStepSchema,
16371
+ AutomationCapStepSchema,
16118
16372
  object({
16119
- kind: literal("wait"),
16120
- seconds: number().min(0).max(300)
16121
- }),
16122
- object({
16123
- kind: literal("cap"),
16124
- /**
16125
- * One device, several same-family devices (locks / climate family / …),
16126
- * or `{ $var }` for the device that triggered the run. An array is
16127
- * fan-out at codegen — each id gets the same cap.method call.
16128
- */
16129
- deviceId: union([
16130
- number().int(),
16131
- array(number().int()).min(1),
16132
- object({ $var: string().min(1) })
16133
- ]),
16134
- cap: string().min(1),
16135
- method: string().min(1),
16136
- /** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
16137
- * evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
16138
- args: record(string(), unknown()).optional()
16373
+ kind: literal("action"),
16374
+ /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
16375
+ actionId: string().min(1),
16376
+ /** Values for the action's declared variables; the others take their default. */
16377
+ variables: record(string(), union([
16378
+ string(),
16379
+ number(),
16380
+ boolean()
16381
+ ])).optional()
16139
16382
  }),
16140
16383
  object({
16141
16384
  kind: literal("code"),
@@ -16144,10 +16387,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
16144
16387
  code: string().min(1).max(2e4)
16145
16388
  })
16146
16389
  ]);
16390
+ /**
16391
+ * How a trigger that arrives while the automation is busy (or cooling down) is
16392
+ * handled. One of the automation's execution modes, never a property of its
16393
+ * actions. Absent means `single`.
16394
+ *
16395
+ * - `single` — drop the trigger while a run is in progress (traced + logged).
16396
+ * - `restart` — abort the run in progress (at its next step boundary), start fresh.
16397
+ * - `queued` — queue up to `max` triggers, drop the rest (traced).
16398
+ * - `parallel` — up to `max` runs at once, drop the rest (traced).
16399
+ * - `cooldown` — `single`, and no new run until `minutes` after the last run
16400
+ * STARTED; persisted across a restart. A manual trigger bypasses only this
16401
+ * wait, never the single/queued limits.
16402
+ */
16403
+ var AutomationRunModeSchema = discriminatedUnion("mode", [
16404
+ object({ mode: literal("single") }),
16405
+ object({ mode: literal("restart") }),
16406
+ object({
16407
+ mode: literal("queued"),
16408
+ max: number().int().min(1).max(10)
16409
+ }),
16410
+ object({
16411
+ mode: literal("parallel"),
16412
+ max: number().int().min(1).max(10)
16413
+ }),
16414
+ object({
16415
+ mode: literal("cooldown"),
16416
+ minutes: number().int().min(1).max(1440)
16417
+ })
16418
+ ]);
16147
16419
  var AutomationRecipeSchema = object({
16148
16420
  triggers: array(AutomationTriggerSchema),
16149
16421
  conditions: AutomationConditionSchema.optional(),
16150
- actions: array(AutomationActionSchema)
16422
+ actions: array(AutomationActionSchema),
16423
+ runMode: AutomationRunModeSchema.optional(),
16424
+ /** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
16425
+ keepTraces: number().int().min(1).max(100).optional()
16426
+ });
16427
+ new Set([
16428
+ {
16429
+ id: "person",
16430
+ name: "Person"
16431
+ },
16432
+ {
16433
+ id: "vehicle",
16434
+ name: "Vehicle"
16435
+ },
16436
+ {
16437
+ id: "animal",
16438
+ name: "Animal"
16439
+ },
16440
+ {
16441
+ id: "package",
16442
+ name: "Package"
16443
+ }
16444
+ ].map((l) => l.id));
16445
+ var COCO_TO_MACRO = {
16446
+ mapping: {
16447
+ person: "person",
16448
+ bicycle: "vehicle",
16449
+ car: "vehicle",
16450
+ motorcycle: "vehicle",
16451
+ airplane: "vehicle",
16452
+ bus: "vehicle",
16453
+ train: "vehicle",
16454
+ truck: "vehicle",
16455
+ boat: "vehicle",
16456
+ bird: "animal",
16457
+ cat: "animal",
16458
+ dog: "animal",
16459
+ horse: "animal",
16460
+ sheep: "animal",
16461
+ cow: "animal",
16462
+ elephant: "animal",
16463
+ bear: "animal",
16464
+ zebra: "animal",
16465
+ giraffe: "animal",
16466
+ suitcase: "package",
16467
+ backpack: "package",
16468
+ handbag: "package"
16469
+ },
16470
+ preserveOriginal: false
16471
+ };
16472
+ new Set(Object.values(COCO_TO_MACRO.mapping));
16473
+ /**
16474
+ * Run traces — what an automation (or, later, an Action run) DID, node by node,
16475
+ * so the editor can paint every block green or red with its reason.
16476
+ *
16477
+ * A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
16478
+ * every condition node (containers and leaves, including the ones a
16479
+ * short-circuit never reached), the run-mode verdict and every action step —
16480
+ * each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
16481
+ * for an Action run). Skipped
16482
+ * evaluations are traced too, and identical consecutive skips collapse into a
16483
+ * repeat count so a trigger that fails every 5 minutes cannot flush real runs.
16484
+ *
16485
+ * {@link AutomationStepTraceSchema} is deliberately free of automation
16486
+ * vocabulary so an Action run records the same step shape.
16487
+ */
16488
+ /** A value a trace may show: JSON primitives and short lists, nothing deeper. */
16489
+ var TraceValueSchema = union([
16490
+ string(),
16491
+ number(),
16492
+ boolean(),
16493
+ _null(),
16494
+ array(union([string(), number()]))
16495
+ ]);
16496
+ var AutomationRunOutcomeSchema = _enum([
16497
+ "ran",
16498
+ "skipped-trigger",
16499
+ "skipped-conditions",
16500
+ "skipped-cooldown",
16501
+ "skipped-overlap",
16502
+ "failed",
16503
+ "aborted"
16504
+ ]);
16505
+ /** `not-evaluated` = a short-circuit never reached the node. */
16506
+ var TraceNodeOutcomeSchema = _enum([
16507
+ "pass",
16508
+ "fail",
16509
+ "not-evaluated"
16510
+ ]);
16511
+ var AutomationTriggerTraceSchema = object({
16512
+ kind: string().min(1),
16513
+ outcome: _enum(["pass", "fail"]),
16514
+ /** Why an event was rejected ("class person not in [dog]") or what fired. */
16515
+ reason: string(),
16516
+ /** deviceId, className, trackId, score … — only what the trigger exposes. */
16517
+ vars: record(string(), TraceValueSchema)
16518
+ });
16519
+ var AutomationConditionTraceNodeSchema = object({
16520
+ /** `conditions` for the root, `conditions.<i>` for its i-th child, … */
16521
+ path: string().min(1),
16522
+ kind: _enum([
16523
+ "all",
16524
+ "any",
16525
+ "not",
16526
+ "condition",
16527
+ "expression",
16528
+ "stationary-present"
16529
+ ]),
16530
+ outcome: TraceNodeOutcomeSchema,
16531
+ reason: string(),
16532
+ deviceId: number().int().optional(),
16533
+ cap: string().optional(),
16534
+ fieldPath: string().optional(),
16535
+ operator: string().optional(),
16536
+ expected: TraceValueSchema.optional(),
16537
+ /** What the mirror held; `null` when it held nothing (unknown). */
16538
+ observed: TraceValueSchema.optional()
16539
+ });
16540
+ var AutomationRunVerdictSchema = object({
16541
+ mode: AutomationRunModeSchema,
16542
+ decision: _enum([
16543
+ "run",
16544
+ "queued",
16545
+ "restart",
16546
+ "drop",
16547
+ "cooldown",
16548
+ "bypass"
16549
+ ]),
16550
+ reason: string()
16551
+ });
16552
+ /** One executed (or not-run) step — shared by automations and Action runs. */
16553
+ var AutomationStepTraceSchema = object({
16554
+ /** `actions.<i>` */
16555
+ path: string().min(1),
16556
+ kind: string().min(1),
16557
+ cap: string().optional(),
16558
+ method: string().optional(),
16559
+ deviceId: number().int().optional(),
16560
+ startedAt: number().optional(),
16561
+ endedAt: number().optional(),
16562
+ outcome: _enum([
16563
+ "ok",
16564
+ "error",
16565
+ "not-run"
16566
+ ]),
16567
+ message: string().optional()
16568
+ });
16569
+ var AutomationRunTraceSchema = object({
16570
+ runId: string().min(1),
16571
+ startedAt: number(),
16572
+ endedAt: number(),
16573
+ trigger: AutomationTriggerTraceSchema,
16574
+ conditions: array(AutomationConditionTraceNodeSchema),
16575
+ verdict: AutomationRunVerdictSchema.optional(),
16576
+ steps: array(AutomationStepTraceSchema),
16577
+ outcome: AutomationRunOutcomeSchema,
16578
+ /** How many identical consecutive skips this trace stands for (>= 1). */
16579
+ repeat: number().int().min(1),
16580
+ /** When the latest of those repeats happened. */
16581
+ lastAt: number()
16582
+ });
16583
+ /**
16584
+ * What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
16585
+ * `action:<actionId>`): the cooldown stamp and the trace ring.
16586
+ */
16587
+ var AutomationStateDocSchema = object({
16588
+ version: literal(1),
16589
+ lastRunStartedAt: number().nullable(),
16590
+ traces: array(AutomationRunTraceSchema)
16591
+ });
16592
+ /**
16593
+ * Actions — named, runnable things an operator (or an automation) can start,
16594
+ * declared as LIST ENTRIES, never as devices.
16595
+ *
16596
+ * An entry is either **internal** (a short list of cap/wait steps kept in the
16597
+ * hub's `actions` record kind) or declared by an addon through the
16598
+ * `action-source` collection (a Home Assistant script, a scene …). The one
16599
+ * surface the UI and automations talk to is the `actions` cap; it keeps no
16600
+ * catalog of its own (D3) — every `list` asks the providers live.
16601
+ *
16602
+ * This file is the data half: the entry schema, the variables an entry may
16603
+ * declare, and the pure resolution of the values a run was given. It holds no
16604
+ * runtime.
16605
+ */
16606
+ /** What a variable's value is. `select` takes one of `options`. */
16607
+ var ActionVariableTypeSchema = _enum([
16608
+ "string",
16609
+ "number",
16610
+ "boolean",
16611
+ "select"
16612
+ ]);
16613
+ var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
16614
+ var ActionVariableValueSchema = union([
16615
+ string(),
16616
+ number(),
16617
+ boolean()
16618
+ ]);
16619
+ /**
16620
+ * One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
16621
+ * value) or `{{vars.name}}` (inside a string) in their args.
16622
+ */
16623
+ var ActionVariableSchema = object({
16624
+ name: string().regex(ACTION_VARIABLE_NAME_RE),
16625
+ label: string().min(1).max(120).optional(),
16626
+ type: ActionVariableTypeSchema,
16627
+ required: boolean().optional(),
16628
+ default: ActionVariableValueSchema.optional(),
16629
+ /** The allowed values of a `select`. */
16630
+ options: array(string().min(1)).min(1).optional()
16631
+ }).superRefine((v, ctx) => {
16632
+ if (v.type === "select" && v.options === void 0) ctx.addIssue({
16633
+ code: "custom",
16634
+ message: "a select variable needs options",
16635
+ path: ["options"]
16636
+ });
16637
+ if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
16638
+ code: "custom",
16639
+ message: variableValueError(v, v.default) ?? "invalid default",
16640
+ path: ["default"]
16641
+ });
16642
+ });
16643
+ /** Why `value` is not a legal value for the variable, or null when it is. */
16644
+ function variableValueError(variable, value) {
16645
+ switch (variable.type) {
16646
+ case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
16647
+ case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
16648
+ case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
16649
+ case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
16650
+ }
16651
+ }
16652
+ var ActionSourceKindSchema = _enum(["internal", "addon"]);
16653
+ function isInternalActionId(actionId) {
16654
+ return actionId.startsWith("internal:") && actionId.length > 9;
16655
+ }
16656
+ /** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
16657
+ function addonIdOfActionId(actionId) {
16658
+ if (isInternalActionId(actionId)) return null;
16659
+ const at = actionId.indexOf(":");
16660
+ return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
16661
+ }
16662
+ var ActionStatusSchema = object({
16663
+ isRunning: boolean(),
16664
+ /** Ms epoch the latest run STARTED; null when it never ran. */
16665
+ lastRunAt: number().nullable(),
16666
+ /** The latest run's failure; null on success or when it never ran. */
16667
+ lastError: string().nullable()
16668
+ });
16669
+ var ActionEntrySchema = object({
16670
+ /** `internal:<uuid>` or `<addonId>:<localId>`. */
16671
+ id: string().min(3),
16672
+ name: string().min(1).max(120),
16673
+ /** The addon that declared it; `core-blocks` for an internal one. */
16674
+ addonId: string().min(1),
16675
+ source: ActionSourceKindSchema,
16676
+ /** An addon-declared entry is edited where it was declared. */
16677
+ readOnly: boolean(),
16678
+ /** Internal only: cap and wait steps. No action-in-action, so no cycles. */
16679
+ steps: array(ActionStepSchema).min(1).max(50).optional(),
16680
+ variables: array(ActionVariableSchema).max(20).optional(),
16681
+ status: ActionStatusSchema
16682
+ }).superRefine((entry, ctx) => {
16683
+ if (entry.source === "internal") {
16684
+ if (!isInternalActionId(entry.id)) ctx.addIssue({
16685
+ code: "custom",
16686
+ message: "an internal action id is internal:<uuid>",
16687
+ path: ["id"]
16688
+ });
16689
+ return;
16690
+ }
16691
+ if (entry.steps !== void 0) ctx.addIssue({
16692
+ code: "custom",
16693
+ message: "only an internal action carries steps",
16694
+ path: ["steps"]
16695
+ });
16696
+ if (!entry.readOnly) ctx.addIssue({
16697
+ code: "custom",
16698
+ message: "an addon action is read-only here",
16699
+ path: ["readOnly"]
16700
+ });
16701
+ if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
16702
+ code: "custom",
16703
+ message: "an addon action id is <addonId>:<localId>",
16704
+ path: ["id"]
16705
+ });
16706
+ });
16707
+ /** What an operator writes for an internal action. */
16708
+ var ActionInputSchema = object({
16709
+ name: string().min(1).max(120),
16710
+ steps: array(ActionStepSchema).min(1).max(50),
16711
+ variables: array(ActionVariableSchema).max(20).optional()
16712
+ });
16713
+ /** Who started a run. Absent = the operator pressed it. */
16714
+ var ActionRunOriginSchema = object({
16715
+ /** The automation block whose step started it. */
16716
+ blockId: string().min(1).optional() });
16717
+ /** `started` = the caller did not ask to wait. */
16718
+ var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
16719
+ var ActionRunResultSchema = object({
16720
+ runId: string().min(1),
16721
+ outcome: ActionRunOutcomeSchema,
16722
+ /** Why it did not run, or what failed. */
16723
+ message: string().optional()
16724
+ });
16725
+ _enum([
16726
+ "not-found",
16727
+ "read-only",
16728
+ "invalid-variables",
16729
+ "invalid-steps",
16730
+ "not-linked",
16731
+ "busy"
16732
+ ]);
16733
+ object({
16734
+ actionId: string(),
16735
+ runId: string(),
16736
+ isRunning: boolean(),
16737
+ /** Set when the run ended. */
16738
+ outcome: AutomationRunOutcomeSchema.optional(),
16739
+ lastRunAt: number().nullable(),
16740
+ lastError: string().nullable()
16151
16741
  });
16152
16742
  /**
16153
16743
  * `addon-pages` — system-scoped singleton aggregator cap. Public-facing
@@ -17742,7 +18332,22 @@ var BrokerProviderInfoSchema = object({
17742
18332
  */
17743
18333
  interactiveConnectPath: string().min(1).optional(),
17744
18334
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17745
- interactiveDisconnectPath: string().min(1).optional()
18335
+ interactiveDisconnectPath: string().min(1).optional(),
18336
+ /**
18337
+ * The kind signs in through a server-held interactive session instead of
18338
+ * (or before) typed credentials. `basePath` is a hub-relative route set
18339
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
18340
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
18341
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
18342
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
18343
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
18344
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
18345
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
18346
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
18347
+ * offers it as the default path; the fields the session fills are
18348
+ * marked `filledBySignIn` in the kind's settings schema.
18349
+ */
18350
+ signIn: object({ basePath: string().min(1) }).optional()
17746
18351
  }))
17747
18352
  });
17748
18353
  var ListInputSchema = object({
@@ -18713,7 +19318,7 @@ var CompositionEventPlanSchema = object({
18713
19318
  stateField: string(),
18714
19319
  fieldKey: string()
18715
19320
  });
18716
- /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
19321
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
18717
19322
  var CompositionProblemSchema = object({
18718
19323
  code: _enum([
18719
19324
  "reserved-variant",
@@ -18741,7 +19346,8 @@ var CompositionProblemSchema = object({
18741
19346
  "native-capability-replace",
18742
19347
  "mixed-quantity",
18743
19348
  "helper-mismatch",
18744
- "member-constraint"
19349
+ "member-constraint",
19350
+ "retention"
18745
19351
  ]),
18746
19352
  path: string(),
18747
19353
  message: string()
@@ -18975,13 +19581,17 @@ Object.freeze({
18975
19581
  latchedAt: {
18976
19582
  kind: "fixed",
18977
19583
  result: ["number", "null"]
19584
+ },
19585
+ schmitt: {
19586
+ kind: "fixed",
19587
+ result: ["boolean", "null"]
18978
19588
  }
18979
19589
  });
18980
19590
  /**
18981
19591
  * One catalog row per base reading a group helper can build (D944 §3).
18982
19592
  * Data, not a form default written into the block.
18983
19593
  */
18984
- var NOW = {
19594
+ var NOW$2 = {
18985
19595
  fieldPath: "lastFetchedAt",
18986
19596
  expr: "now"
18987
19597
  };
@@ -18995,6 +19605,8 @@ function numeric(input) {
18995
19605
  family: "numeric",
18996
19606
  deviceType: DeviceType.Sensor,
18997
19607
  memberDeviceType: DeviceType.Sensor,
19608
+ memberDeviceTypes: [DeviceType.Sensor],
19609
+ activeWhen: void 0,
18998
19610
  commandCaps: [],
18999
19611
  baseUnit: baseUnitOf(input.quantity),
19000
19612
  aggregates: NUMERIC_AGGREGATES,
@@ -19010,6 +19622,8 @@ function binary(input) {
19010
19622
  family: "binary",
19011
19623
  deviceType: DeviceType.Sensor,
19012
19624
  memberDeviceType: DeviceType.Sensor,
19625
+ memberDeviceTypes: [DeviceType.Sensor],
19626
+ activeWhen: void 0,
19013
19627
  commandCaps: [],
19014
19628
  quantity: "none",
19015
19629
  baseUnit: void 0,
@@ -19023,73 +19637,73 @@ var GROUP_TEMPLATES = [
19023
19637
  summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
19024
19638
  role: DeviceRole.TemperatureSensor,
19025
19639
  outputCap: "temperature-sensor",
19026
- outputField: "celsius",
19640
+ outputField: "temperature",
19027
19641
  quantity: "temperature",
19028
19642
  defaultAggregate: "mean",
19029
19643
  empty: "null",
19030
- companions: [NOW]
19644
+ companions: [NOW$2]
19031
19645
  }),
19032
19646
  numeric({
19033
19647
  id: "humidity",
19034
19648
  summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
19035
19649
  role: DeviceRole.HumiditySensor,
19036
19650
  outputCap: "humidity-sensor",
19037
- outputField: "percent",
19651
+ outputField: "humidity",
19038
19652
  quantity: "humidity",
19039
19653
  defaultAggregate: "mean",
19040
19654
  empty: "null",
19041
- companions: [NOW]
19655
+ companions: [NOW$2]
19042
19656
  }),
19043
19657
  numeric({
19044
19658
  id: "pressure",
19045
19659
  summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
19046
19660
  role: DeviceRole.PressureSensor,
19047
19661
  outputCap: "pressure-sensor",
19048
- outputField: "hpa",
19662
+ outputField: "pressure",
19049
19663
  quantity: "pressure",
19050
19664
  defaultAggregate: "mean",
19051
19665
  empty: "null",
19052
- companions: [NOW]
19666
+ companions: [NOW$2]
19053
19667
  }),
19054
19668
  numeric({
19055
19669
  id: "illuminance",
19056
19670
  summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
19057
19671
  role: DeviceRole.AmbientLightSensor,
19058
19672
  outputCap: "ambient-light-sensor",
19059
- outputField: "lux",
19673
+ outputField: "illuminance",
19060
19674
  quantity: "illuminance",
19061
19675
  defaultAggregate: "mean",
19062
19676
  empty: "null",
19063
- companions: [NOW]
19677
+ companions: [NOW$2]
19064
19678
  }),
19065
19679
  numeric({
19066
19680
  id: "power",
19067
19681
  summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
19068
19682
  role: DeviceRole.PowerSensor,
19069
19683
  outputCap: "power-meter",
19070
- outputField: "watts",
19684
+ outputField: "power",
19071
19685
  quantity: "power",
19072
19686
  defaultAggregate: "sum",
19073
19687
  empty: "omit",
19074
- companions: [NOW]
19688
+ companions: [NOW$2]
19075
19689
  }),
19076
19690
  numeric({
19077
19691
  id: "energy",
19078
19692
  summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
19079
19693
  role: DeviceRole.EnergySensor,
19080
19694
  outputCap: "power-meter",
19081
- outputField: "kwhTotal",
19695
+ outputField: "energy",
19082
19696
  quantity: "energy",
19083
19697
  defaultAggregate: "sum",
19084
19698
  empty: "omit",
19085
- companions: [NOW]
19699
+ companions: [NOW$2]
19086
19700
  }),
19087
19701
  numeric({
19088
19702
  id: "battery",
19089
19703
  summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
19090
19704
  role: DeviceRole.BatterySensor,
19091
19705
  outputCap: "battery",
19092
- outputField: "percentage",
19706
+ outputField: "level",
19093
19707
  quantity: "percentage",
19094
19708
  defaultAggregate: "mean",
19095
19709
  empty: "null",
@@ -19117,7 +19731,7 @@ var GROUP_TEMPLATES = [
19117
19731
  quantity: "device",
19118
19732
  defaultAggregate: "mean",
19119
19733
  empty: "null",
19120
- companions: [NOW]
19734
+ companions: [NOW$2]
19121
19735
  }),
19122
19736
  binary({
19123
19737
  id: "motion",
@@ -19211,6 +19825,11 @@ var GROUP_TEMPLATES = [
19211
19825
  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.",
19212
19826
  deviceType: DeviceType.Switch,
19213
19827
  outputCap: "switch",
19828
+ outputField: "on",
19829
+ member: {
19830
+ cap: "switch",
19831
+ fieldPath: "on"
19832
+ },
19214
19833
  commandCaps: ["switch"]
19215
19834
  }),
19216
19835
  actuator({
@@ -19218,34 +19837,136 @@ var GROUP_TEMPLATES = [
19218
19837
  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.",
19219
19838
  deviceType: DeviceType.Light,
19220
19839
  outputCap: "switch",
19840
+ outputField: "on",
19841
+ member: {
19842
+ cap: "switch",
19843
+ fieldPath: "on"
19844
+ },
19221
19845
  commandCaps: [
19222
19846
  "switch",
19223
19847
  "brightness",
19224
19848
  "color"
19225
19849
  ]
19850
+ }),
19851
+ actuator({
19852
+ id: "fan",
19853
+ 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.",
19854
+ deviceType: DeviceType.Fan,
19855
+ outputCap: "switch",
19856
+ outputField: "on",
19857
+ member: {
19858
+ cap: "switch",
19859
+ fieldPath: "on"
19860
+ },
19861
+ commandCaps: ["switch", "fan-control"]
19862
+ }),
19863
+ actuator({
19864
+ id: "cover",
19865
+ 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.",
19866
+ deviceType: DeviceType.Cover,
19867
+ outputCap: "group-active",
19868
+ outputField: "active",
19869
+ member: {
19870
+ cap: "cover",
19871
+ fieldPath: "state"
19872
+ },
19873
+ activeWhen: [
19874
+ "open",
19875
+ "opening",
19876
+ "stopped"
19877
+ ],
19878
+ commandCaps: ["cover"]
19879
+ }),
19880
+ actuator({
19881
+ id: "valve",
19882
+ 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.",
19883
+ deviceType: DeviceType.Valve,
19884
+ outputCap: "group-active",
19885
+ outputField: "active",
19886
+ member: {
19887
+ cap: "valve",
19888
+ fieldPath: "state"
19889
+ },
19890
+ activeWhen: [
19891
+ "open",
19892
+ "opening",
19893
+ "stopped"
19894
+ ],
19895
+ commandCaps: ["valve"]
19896
+ }),
19897
+ actuator({
19898
+ id: "lock",
19899
+ 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.",
19900
+ deviceType: DeviceType.Lock,
19901
+ outputCap: "group-active",
19902
+ outputField: "active",
19903
+ member: {
19904
+ cap: "lock-control",
19905
+ fieldPath: "state"
19906
+ },
19907
+ activeWhen: ["locked"],
19908
+ commandCaps: ["lock-control"]
19909
+ }),
19910
+ actuator({
19911
+ id: "media-player",
19912
+ 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.",
19913
+ deviceType: DeviceType.MediaPlayer,
19914
+ outputCap: "group-active",
19915
+ outputField: "active",
19916
+ member: {
19917
+ cap: "media-player",
19918
+ fieldPath: "state"
19919
+ },
19920
+ activeWhen: ["playing", "buffering"],
19921
+ commandCaps: ["media-player"]
19922
+ }),
19923
+ actuator({
19924
+ id: "climate",
19925
+ 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.",
19926
+ deviceType: DeviceType.Thermostat,
19927
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19928
+ outputCap: "group-active",
19929
+ outputField: "active",
19930
+ member: {
19931
+ cap: "climate-control",
19932
+ fieldPath: "mode"
19933
+ },
19934
+ activeWhen: [
19935
+ "heat",
19936
+ "cool",
19937
+ "auto",
19938
+ "heat_cool",
19939
+ "fan_only",
19940
+ "dry"
19941
+ ],
19942
+ commandCaps: ["climate-control"]
19226
19943
  })
19227
19944
  ];
19228
19945
  function actuator(input) {
19229
19946
  return {
19230
- ...input,
19947
+ id: input.id,
19948
+ summary: input.summary,
19949
+ deviceType: input.deviceType,
19950
+ outputCap: input.outputCap,
19951
+ outputField: input.outputField,
19952
+ commandCaps: input.commandCaps,
19231
19953
  family: "actuator",
19232
19954
  role: void 0,
19233
19955
  memberDeviceType: input.deviceType,
19234
- outputField: "on",
19956
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19957
+ activeWhen: input.activeWhen,
19235
19958
  quantity: "none",
19236
19959
  baseUnit: void 0,
19237
19960
  aggregates: BINARY_AGGREGATES,
19238
19961
  defaultAggregate: "any",
19239
19962
  empty: "offline",
19240
- accept: [{
19241
- cap: "switch",
19242
- fieldPath: "on"
19243
- }],
19963
+ accept: [input.member],
19244
19964
  companions: [CHANGED]
19245
19965
  };
19246
19966
  }
19247
19967
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
19248
19968
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19969
+ DeviceType.Camera;
19249
19970
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
19250
19971
  /**
19251
19972
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -19560,7 +20281,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
19560
20281
  kind: "mutation",
19561
20282
  auth: "admin",
19562
20283
  access: "view"
19563
- });
20284
+ }), method(object({
20285
+ blockId: string().min(1),
20286
+ trace: AutomationRunTraceSchema.optional(),
20287
+ runStartedAt: number().optional(),
20288
+ keepTraces: number().int().min(1).max(100).optional()
20289
+ }), _void(), {
20290
+ kind: "mutation",
20291
+ auth: "admin"
20292
+ }), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
20293
+ traces: array(AutomationRunTraceSchema),
20294
+ lastError: string().nullable()
20295
+ }), { auth: "admin" });
19564
20296
  /**
19565
20297
  * `custom-model-registry` — collection cap exposing operator-registered
19566
20298
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -44341,7 +45073,7 @@ var NetworkAccessStatusSchema = object({
44341
45073
  });
44342
45074
  /**
44343
45075
  * Optional, richer endpoint shape returned by providers that expose
44344
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
45076
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44345
45077
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44346
45078
  * the originating provider config (mode + sourcePort) so the
44347
45079
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -44734,51 +45466,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
44734
45466
  kind: "mutation",
44735
45467
  auth: "admin"
44736
45468
  });
44737
- new Set([
44738
- {
44739
- id: "person",
44740
- name: "Person"
44741
- },
44742
- {
44743
- id: "vehicle",
44744
- name: "Vehicle"
44745
- },
44746
- {
44747
- id: "animal",
44748
- name: "Animal"
44749
- },
44750
- {
44751
- id: "package",
44752
- name: "Package"
44753
- }
44754
- ].map((l) => l.id));
44755
- var COCO_TO_MACRO = {
44756
- mapping: {
44757
- person: "person",
44758
- bicycle: "vehicle",
44759
- car: "vehicle",
44760
- motorcycle: "vehicle",
44761
- airplane: "vehicle",
44762
- bus: "vehicle",
44763
- train: "vehicle",
44764
- truck: "vehicle",
44765
- boat: "vehicle",
44766
- bird: "animal",
44767
- cat: "animal",
44768
- dog: "animal",
44769
- horse: "animal",
44770
- sheep: "animal",
44771
- cow: "animal",
44772
- elephant: "animal",
44773
- bear: "animal",
44774
- zebra: "animal",
44775
- giraffe: "animal",
44776
- suitcase: "package",
44777
- backpack: "package",
44778
- handbag: "package"
44779
- },
44780
- preserveOriginal: false
44781
- };
44782
45469
  var AUDIO_MACRO_LABELS = [
44783
45470
  {
44784
45471
  id: "speech",
@@ -46984,7 +47671,20 @@ var NcRuleInputSchema = object({
46984
47671
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46985
47672
  * path does not run Zod defaults.
46986
47673
  */
46987
- groupingSec: number().int().min(5).max(60).optional()
47674
+ groupingSec: number().int().min(5).max(60).optional(),
47675
+ /**
47676
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
47677
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
47678
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
47679
+ * same mark the Library writes, and records whose notification it was and
47680
+ * when. A channel with no buttons gets the same two choices as links.
47681
+ *
47682
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
47683
+ * cap path): absent and `false` both mean off, which is what every rule
47684
+ * authored before this field meant. An editor turns it off by writing
47685
+ * `false`, so it needs no `clear` key.
47686
+ */
47687
+ askVerdict: boolean().optional()
46988
47688
  });
46989
47689
  /**
46990
47690
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57395,9 +58095,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
57395
58095
  }), LogStreamEntrySchema, { kind: "subscription" });
57396
58096
  object({
57397
58097
  /** Carbon dioxide concentration in ppm. */
57398
- co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
58098
+ co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
57399
58099
  /** Total volatile organic compounds in ppb. */
57400
- vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
58100
+ voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
57401
58101
  /** Particulate matter ≤ 2.5 μm in µg/m³. */
57402
58102
  pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
57403
58103
  /** Particulate matter ≤ 10 μm in µg/m³. */
@@ -57414,7 +58114,7 @@ DeviceType.Sensor;
57414
58114
  */
57415
58115
  var AmbientLightSensorStatusSchema = object({
57416
58116
  /** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
57417
- lux: number().min(0).nullable().meta(readingMeta("illuminance", {
58117
+ illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
57418
58118
  precision: 0,
57419
58119
  label: "Illuminance"
57420
58120
  })),
@@ -57511,6 +58211,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
57511
58211
  * would produce more than `maxPoints` samples. */
57512
58212
  sampleEveryMs: number().int().positive().optional()
57513
58213
  }), AudioMetricsHistorySchema);
58214
+ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
58215
+ actionId: string().min(1),
58216
+ variables: record(string(), ActionVariableValueSchema).optional()
58217
+ }), _void(), {
58218
+ kind: "mutation",
58219
+ auth: "admin"
58220
+ }), method(object({ actionId: string().min(1) }), _void(), {
58221
+ kind: "mutation",
58222
+ auth: "admin"
58223
+ });
58224
+ /**
58225
+ * actions — the ONE surface for runnable actions, for the UI and for
58226
+ * automations. Provided by the core-blocks builtin on the hub.
58227
+ *
58228
+ * An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
58229
+ * steps, kept in the hub's `actions` record kind) or declared by an addon over
58230
+ * `action-source`. `list` asks every `action-source` provider LIVE and overlays
58231
+ * the run status from the hub's `runs` ledger; there is no catalog here to
58232
+ * drift (D3).
58233
+ *
58234
+ * **Permissions follow the camera, as linked devices do.** An action is linked
58235
+ * to cameras by the operator (`setLinks`, D356: nothing links itself). A
58236
+ * non-admin may `get` / `run` an action only through a camera they may see that
58237
+ * links it: they name the camera (`deviceId`, a top-level field so the scope
58238
+ * gate sees it) and the provider refuses an action that camera does not link.
58239
+ * An admin, and an in-process caller (an automation block), may run any action.
58240
+ * Every refusal is typed (`[not-linked] …`) and logged.
58241
+ *
58242
+ * A second `run` of an action that is already running is REFUSED — traced and
58243
+ * logged — never queued.
58244
+ */
58245
+ var ActionIdInput = object({ actionId: string().min(1) });
58246
+ var ActionLinksSchema = object({
58247
+ deviceId: number().int().nonnegative(),
58248
+ actionIds: array(string().min(1)).max(100)
58249
+ });
58250
+ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
58251
+ actionId: string().min(1),
58252
+ deviceId: number().int().nonnegative().optional()
58253
+ }), object({ action: ActionEntrySchema.nullable() }), {
58254
+ role: "viewer",
58255
+ auth: "protected",
58256
+ kind: "query",
58257
+ caller: "required"
58258
+ }), method(object({
58259
+ actionId: string().min(1),
58260
+ variables: record(string(), ActionVariableValueSchema).optional(),
58261
+ wait: boolean().optional(),
58262
+ origin: ActionRunOriginSchema.optional(),
58263
+ deviceId: number().int().nonnegative().optional()
58264
+ }), ActionRunResultSchema, {
58265
+ role: "viewer",
58266
+ auth: "protected",
58267
+ kind: "mutation",
58268
+ caller: "required"
58269
+ }), method(ActionIdInput, _void(), {
58270
+ kind: "mutation",
58271
+ auth: "admin"
58272
+ }), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
58273
+ kind: "mutation",
58274
+ auth: "admin"
58275
+ }), method(object({
58276
+ actionId: string().min(1),
58277
+ action: ActionInputSchema.partial()
58278
+ }), object({ action: ActionEntrySchema }), {
58279
+ kind: "mutation",
58280
+ auth: "admin"
58281
+ }), method(ActionIdInput, _void(), {
58282
+ kind: "mutation",
58283
+ auth: "admin"
58284
+ }), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
58285
+ role: "viewer",
58286
+ auth: "protected",
58287
+ kind: "query"
58288
+ }), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
58289
+ kind: "mutation",
58290
+ auth: "admin"
58291
+ });
57514
58292
  object({
57515
58293
  /** Whether the automation is currently enabled. Disabled automations
57516
58294
  * ignore their trigger block — manual `trigger` still works. */
@@ -57564,7 +58342,7 @@ var BatteryStatusSchema = object({
57564
58342
  * Consumers must SKIP a null rather than coerce it — `battery-band` already
57565
58343
  * declines to band a non-finite reading, which is the correct shape.
57566
58344
  */
57567
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
58345
+ level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
57568
58346
  /**
57569
58347
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
57570
58348
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -57574,7 +58352,7 @@ var BatteryStatusSchema = object({
57574
58352
  * `'unknown'` is the absence of an answer: the provider has not read the
57575
58353
  * power fields yet, or the firmware reported neither. Before it existed,
57576
58354
  * two unreadable fields produced `'none'`, and a camera nobody had reached
57577
- * was drawn "on battery alone" — the same D315 defect `percentage` closed
58355
+ * was drawn "on battery alone" — the same D315 defect `level` closed
57578
58356
  * by going nullable. Consumers SKIP it (no charger state published, no
57579
58357
  * glyph, no HomeKit ChargingState) rather than coerce it either way.
57580
58358
  */
@@ -57598,7 +58376,7 @@ var BatteryStatusSchema = object({
57598
58376
  * that only report charge. A second reading on this cap, not a second
57599
58377
  * `numeric-sensor` on the same device.
57600
58378
  */
57601
- volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
58379
+ voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
57602
58380
  /**
57603
58381
  * Ms epoch of the last time the device PROVED it was reachable — a
57604
58382
  * completed firmware round-trip, an observed wake, or an inbound push
@@ -57632,13 +58410,13 @@ var BatteryStatusSchema = object({
57632
58410
  /**
57633
58411
  * True when the source is a BINARY low-battery indicator (HA
57634
58412
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
57635
- * charge level — `percentage` is then a coarse stand-in (100 = normal,
58413
+ * charge level — `level` is then a coarse stand-in (100 = normal,
57636
58414
  * sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
57637
58415
  * misleading exact percentage. Absent/false → genuine 0–100 % reading.
57638
58416
  */
57639
58417
  binary: boolean().optional().meta({ label: "Binary indicator" })
57640
58418
  });
57641
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
58419
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
57642
58420
  method(object({
57643
58421
  deviceId: number(),
57644
58422
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -57658,19 +58436,19 @@ object({
57658
58436
  DeviceType.Sensor;
57659
58437
  object({
57660
58438
  /** Current level as 0..100 inclusive. Firmware-reported. */
57661
- percentage: number().min(0).max(100).meta(readingMeta("percentage")),
58439
+ level: number().min(0).max(100).meta(readingMeta("percentage")),
57662
58440
  /** Ms epoch of the last operator-driven change. Useful for UI freshness. */
57663
58441
  lastChangedAt: number()
57664
58442
  });
57665
58443
  DeviceType.Light, method(object({
57666
58444
  deviceId: number().int().nonnegative(),
57667
- percentage: number().min(0).max(100)
58445
+ level: number().min(0).max(100)
57668
58446
  }), _void(), {
57669
58447
  kind: "mutation",
57670
58448
  auth: "protected"
57671
58449
  }), object({
57672
58450
  deviceId: number(),
57673
- percentage: number().min(0).max(100),
58451
+ level: number().min(0).max(100),
57674
58452
  lastChangedAt: number()
57675
58453
  });
57676
58454
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
@@ -58175,11 +58953,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
58175
58953
  }),
58176
58954
  object({
58177
58955
  mode: literal("mired"),
58178
- mireds: number().int().min(50).max(1e3)
58956
+ colorTemperature: number().int().min(50).max(1e3)
58179
58957
  })
58180
58958
  ]);
58181
58959
  object({
58182
- /** Active color mode — which of `rgb` / `hsv` / `mireds` reflects
58960
+ /** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
58183
58961
  * the bulb's current state. */
58184
58962
  mode: _enum([
58185
58963
  "rgb",
@@ -58191,7 +58969,7 @@ object({
58191
58969
  /** Populated when `mode === 'hsv'`. */
58192
58970
  hsv: HsvTripletSchema.optional(),
58193
58971
  /** Populated when `mode === 'mired'`. */
58194
- mireds: number().int().optional().meta(readingMeta("colour-temperature")),
58972
+ colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
58195
58973
  /** Ms epoch of the last operator-driven change. */
58196
58974
  lastChangedAt: number()
58197
58975
  });
@@ -58210,7 +58988,7 @@ DeviceType.Light, method(object({
58210
58988
  ]),
58211
58989
  rgb: RgbTripletSchema.optional(),
58212
58990
  hsv: HsvTripletSchema.optional(),
58213
- mireds: number().int().optional(),
58991
+ colorTemperature: number().int().optional(),
58214
58992
  lastChangedAt: number()
58215
58993
  });
58216
58994
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
@@ -58648,11 +59426,11 @@ object({
58648
59426
  /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
58649
59427
  availablePrograms: array(string()),
58650
59428
  /** Seconds remaining on the active cycle, or null when not running / not known. */
58651
- remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
59429
+ remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58652
59430
  /** Seconds the delayed start is set to (time until the cycle starts), or null. */
58653
- delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
59431
+ delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58654
59432
  /** Cycle completion 0..100, or null when not applicable. */
58655
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59433
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58656
59434
  /** True when the door is reported open; null when the door state is not known. */
58657
59435
  doorOpen: boolean().nullable(),
58658
59436
  /** True when the door is latched (locked) during a cycle; null when not reported. */
@@ -59270,7 +60048,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
59270
60048
  object({
59271
60049
  /** Active speed as 0..100 inclusive. Null when the device has no
59272
60050
  * speed surface (single-speed fan). */
59273
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60051
+ speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59274
60052
  /** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
59275
60053
  * a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
59276
60054
  percentageStep: number().positive().optional().meta(readingMeta("percentage")),
@@ -59290,7 +60068,7 @@ object({
59290
60068
  });
59291
60069
  DeviceType.Fan, method(object({
59292
60070
  deviceId: number().int().nonnegative(),
59293
- percentage: number().min(0).max(100)
60071
+ speed: number().min(0).max(100)
59294
60072
  }), _void(), {
59295
60073
  kind: "mutation",
59296
60074
  auth: "protected"
@@ -59406,7 +60184,13 @@ results: array(object({
59406
60184
  /** Ms epoch of the attempt. */
59407
60185
  at: number()
59408
60186
  })) });
59409
- DeviceType.Switch, DeviceType.Light;
60187
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
60188
+ object({
60189
+ active: boolean().meta({ label: "Active" }),
60190
+ /** Ms epoch when the slice was last updated. */
60191
+ lastChangedAt: number()
60192
+ });
60193
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
59410
60194
  object({
59411
60195
  /** Members whose current value entered the aggregate. */
59412
60196
  included: number().int().nonnegative().meta(readingMeta("count", {
@@ -59424,7 +60208,7 @@ object({
59424
60208
  label: "Members"
59425
60209
  }))
59426
60210
  });
59427
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
60211
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
59428
60212
  object({
59429
60213
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59430
60214
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -59483,7 +60267,7 @@ DeviceType.Humidifier, method(object({
59483
60267
  */
59484
60268
  var HumiditySensorStatusSchema = object({
59485
60269
  /** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
59486
- percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
60270
+ humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
59487
60271
  precision: 0,
59488
60272
  label: "Humidity"
59489
60273
  })),
@@ -59926,7 +60710,7 @@ object({
59926
60710
  batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59927
60711
  /** 0..100 mowing-completion percentage of the current task, or null when no
59928
60712
  * task is active / progress is unavailable. */
59929
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60713
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59930
60714
  /** Current device/event code (dynamic — mostly status, sometimes an error),
59931
60715
  * or null when unknown. */
59932
60716
  currentCode: number().nullable().meta(readingMeta("none")),
@@ -60339,7 +61123,14 @@ DeviceType.Lock, method(object({
60339
61123
  auth: "protected"
60340
61124
  }), method(object({
60341
61125
  deviceId: number().int().nonnegative(),
60342
- code: string().min(1).optional()
61126
+ code: string().min(1).optional(),
61127
+ /**
61128
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61129
+ * with one call is refused unless the caller says it was confirmed. A
61130
+ * single lock ignores it. The refusal lives in the callee, so no
61131
+ * automation or API caller reaches the doors by skipping a dialog.
61132
+ */
61133
+ confirm: boolean().optional()
60343
61134
  }), _void(), {
60344
61135
  kind: "mutation",
60345
61136
  auth: "protected"
@@ -60347,6 +61138,11 @@ DeviceType.Lock, method(object({
60347
61138
  kind: "mutation",
60348
61139
  auth: "protected"
60349
61140
  });
61141
+ object({
61142
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61143
+ lastFetchedAt: number()
61144
+ });
61145
+ DeviceType.Sensor;
60350
61146
  /**
60351
61147
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
60352
61148
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
@@ -60404,10 +61200,10 @@ object({
60404
61200
  currentMedia: MediaInfoSchema.nullable(),
60405
61201
  /** Current playback position in ms. Null when not seekable or
60406
61202
  * nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
60407
- positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
61203
+ position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
60408
61204
  /** Total duration of the current media in ms. Null when unknown
60409
61205
  * (live stream) or nothing is playing. */
60410
- durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
61206
+ duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
60411
61207
  /** Shuffle toggle. Null when no shuffle surface.
60412
61208
  * Pair with `DeviceFeature.MediaPlayerShuffle`. */
60413
61209
  shuffle: boolean().nullable(),
@@ -60434,7 +61230,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
60434
61230
  auth: "protected"
60435
61231
  }), method(object({
60436
61232
  deviceId: number().int().nonnegative(),
60437
- positionMs: number().int().nonnegative()
61233
+ position: number().int().nonnegative()
60438
61234
  }), _void(), {
60439
61235
  kind: "mutation",
60440
61236
  auth: "protected"
@@ -61107,9 +61903,9 @@ var NetworkLinkStatusSchema = object({
61107
61903
  * one whose reading has not landed must not be drawn at 0 %. Consumers
61108
61904
  * SKIP a null rather than coerce it.
61109
61905
  */
61110
- signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61906
+ signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61111
61907
  /** Raw received signal strength in dBm, when the firmware reports one. */
61112
- rssiDbm: number().optional().meta(readingMeta("signal-level")),
61908
+ rssi: number().optional().meta(readingMeta("signal-level")),
61113
61909
  /** Network name of a wireless link, when the firmware reports it. */
61114
61910
  ssid: string().optional(),
61115
61911
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
@@ -61770,10 +62566,20 @@ var PetFeederDeviceStatusSchema = _enum([
61770
62566
  ]);
61771
62567
  var gramsPortion = number().int().min(4).max(200);
61772
62568
  object({
61773
- /** Food currently in the bowl (grams). Null when the device has not
61774
- * reported a reading yet. On dual-hopper models this is the combined
61775
- * bowl reading; per-hopper levels live in `food1`/`food2`. */
62569
+ /** Food in the TANK (hopper), as the feeder's own sensor reports it
62570
+ * (`state.food`). A coarse level code, not grams — `0` is empty. The
62571
+ * amount in the bowl is `bowlFood`. On dual-hopper models this is the
62572
+ * combined reading; per-hopper levels live in `food1`/`food2`. Null when
62573
+ * the device has not reported yet. */
61776
62574
  foodLevel: number().nullable().meta(readingMeta("none")),
62575
+ /** Food in the BOWL as the feeder reports it (`state.bowl`), in the
62576
+ * feeder's own units. Null when the model reports none. */
62577
+ bowlFood: number().nullable().meta(readingMeta("none")),
62578
+ /** True while the pet is eating (`state.eating`). */
62579
+ eating: boolean(),
62580
+ /** Whether `markFoodReplenished` does anything on this model. When false
62581
+ * the client must not offer it. */
62582
+ supportsMarkRefilled: boolean(),
61777
62583
  /** Hopper-1 food level (grams) on dual-hopper feeders; null on
61778
62584
  * single-hopper models. */
61779
62585
  food1: number().nullable().meta(readingMeta("none")),
@@ -61781,8 +62587,8 @@ object({
61781
62587
  * single-hopper models. */
61782
62588
  food2: number().nullable().meta(readingMeta("none")),
61783
62589
  /** Derived low-food flag — mirrors the HA `food_level` binary_sensor
61784
- * (`device_class: problem`, on = low). True when the bowl is empty /
61785
- * below the feeder's low threshold. */
62590
+ * (`device_class: problem`, on = low). True when the tank reports empty,
62591
+ * or, on a dual-hopper model, when EITHER hopper is empty. */
61786
62592
  lowFood: boolean(),
61787
62593
  /** Battery charge 0..100 (%). Null on mains-powered models or when the
61788
62594
  * device has no battery reading. */
@@ -62249,22 +63055,38 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
62249
63055
  auth: "admin"
62250
63056
  });
62251
63057
  object({
62252
- /** Instantaneous power draw in watts. */
62253
- watts: number().optional().meta(readingMeta("power", { label: "Power" })),
63058
+ /** Instantaneous power draw (watts). */
63059
+ power: number().optional().meta(readingMeta("power", { label: "Power" })),
62254
63060
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
62255
- kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
62256
- /** Voltage in volts. */
62257
- volts: number().optional().meta(readingMeta("voltage")),
63061
+ energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
63062
+ /** Voltage (volts). */
63063
+ voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
62258
63064
  /** Current in amperes. */
62259
- amps: number().optional().meta(readingMeta("current")),
63065
+ current: number().optional().meta(readingMeta("current", { label: "Current" })),
62260
63066
  /** Apparent power in volt-amperes. */
62261
- va: number().optional().meta(readingMeta("apparent-power")),
63067
+ apparentPower: number().optional().meta(readingMeta("apparent-power")),
62262
63068
  /** Power factor (0..1) if reported. */
62263
63069
  powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
62264
63070
  /** Ms epoch when the slice was last updated. */
62265
63071
  lastFetchedAt: number()
62266
63072
  });
62267
- DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
63073
+ [
63074
+ DeviceType.Sensor,
63075
+ DeviceType.Switch,
63076
+ DeviceType.Light,
63077
+ DeviceType.Fan,
63078
+ DeviceType.Climate,
63079
+ DeviceType.Thermostat,
63080
+ DeviceType.Humidifier,
63081
+ DeviceType.WaterHeater,
63082
+ DeviceType.MediaPlayer,
63083
+ DeviceType.Washer,
63084
+ DeviceType.Dryer,
63085
+ DeviceType.Dishwasher,
63086
+ DeviceType.Vacuum,
63087
+ DeviceType.LawnMower,
63088
+ DeviceType.PetFeeder
63089
+ ].filter((type) => type !== DeviceType.Sensor);
62268
63090
  /**
62269
63091
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
62270
63092
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -62297,16 +63119,13 @@ var PresenceStatusSchema = object({
62297
63119
  location: string().nullable(),
62298
63120
  /** GPS coordinates when available. Null otherwise. */
62299
63121
  gps: GpsLocationSchema.nullable(),
62300
- /** Optional battery level of the tracking device (0..100). Null
62301
- * when not reported. */
62302
- batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62303
63122
  /** Ms epoch when the slice was last updated. */
62304
63123
  lastChangedAt: number()
62305
63124
  });
62306
63125
  DeviceType.Presence;
62307
63126
  object({
62308
63127
  /** Current pressure in hPa. `null` when the sample was refused (D393). */
62309
- hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
63128
+ pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
62310
63129
  /** Ms epoch when the slice was last updated. */
62311
63130
  lastFetchedAt: number()
62312
63131
  });
@@ -64759,7 +65578,7 @@ object({
64759
65578
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
64760
65579
  lastChangedAt: number()
64761
65580
  });
64762
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
65581
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
64763
65582
  deviceId: number(),
64764
65583
  on: boolean()
64765
65584
  }), _void(), {
@@ -65330,7 +66149,7 @@ DeviceType.Sensor;
65330
66149
  */
65331
66150
  var TemperatureSensorStatusSchema = object({
65332
66151
  /** Current temperature in Celsius. `null` when the sample was refused (D393). */
65333
- celsius: number().nullable().meta(readingMeta("temperature", {
66152
+ temperature: number().nullable().meta(readingMeta("temperature", {
65334
66153
  precision: 1,
65335
66154
  label: "Temperature"
65336
66155
  })),
@@ -65594,7 +66413,7 @@ object({
65594
66413
  /** Speed tokens the hardware accepts — drives the UI selector. */
65595
66414
  availableFanSpeeds: array(string()),
65596
66415
  /** 0..100 cleaning-completion percentage of the current task, or null. */
65597
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
66416
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65598
66417
  /** Current error code (0 / null = no error). */
65599
66418
  errorCode: number().nullable().meta(readingMeta("none")),
65600
66419
  /** Human label for {@link errorCode}, or null when none / undecodable. */
@@ -66463,8 +67282,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
66463
67282
  kind: "mutation",
66464
67283
  auth: "admin"
66465
67284
  });
67285
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
66466
67286
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
66467
- 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;
67287
+ 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;
66468
67288
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
66469
67289
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
66470
67290
  new Set(CAP_NAMES);
@@ -66534,6 +67354,104 @@ Object.freeze({
66534
67354
  access: "create",
66535
67355
  role: "admin"
66536
67356
  },
67357
+ "actions.create": {
67358
+ capName: "actions",
67359
+ capScope: "system",
67360
+ addonId: null,
67361
+ access: "create",
67362
+ role: "admin"
67363
+ },
67364
+ "actions.delete": {
67365
+ capName: "actions",
67366
+ capScope: "system",
67367
+ addonId: null,
67368
+ access: "delete",
67369
+ role: "admin"
67370
+ },
67371
+ "actions.get": {
67372
+ capName: "actions",
67373
+ capScope: "system",
67374
+ addonId: null,
67375
+ access: "view",
67376
+ role: "viewer"
67377
+ },
67378
+ "actions.getLinks": {
67379
+ capName: "actions",
67380
+ capScope: "system",
67381
+ addonId: null,
67382
+ access: "view",
67383
+ role: "admin"
67384
+ },
67385
+ "actions.getTraces": {
67386
+ capName: "actions",
67387
+ capScope: "system",
67388
+ addonId: null,
67389
+ access: "view",
67390
+ role: "admin"
67391
+ },
67392
+ "actions.list": {
67393
+ capName: "actions",
67394
+ capScope: "system",
67395
+ addonId: null,
67396
+ access: "view",
67397
+ role: "admin"
67398
+ },
67399
+ "actions.listForCamera": {
67400
+ capName: "actions",
67401
+ capScope: "system",
67402
+ addonId: null,
67403
+ access: "view",
67404
+ role: "viewer"
67405
+ },
67406
+ "actions.run": {
67407
+ capName: "actions",
67408
+ capScope: "system",
67409
+ addonId: null,
67410
+ access: "create",
67411
+ role: "viewer"
67412
+ },
67413
+ "actions.setLinks": {
67414
+ capName: "actions",
67415
+ capScope: "system",
67416
+ addonId: null,
67417
+ access: "create",
67418
+ role: "admin"
67419
+ },
67420
+ "actions.stop": {
67421
+ capName: "actions",
67422
+ capScope: "system",
67423
+ addonId: null,
67424
+ access: "create",
67425
+ role: "admin"
67426
+ },
67427
+ "actions.update": {
67428
+ capName: "actions",
67429
+ capScope: "system",
67430
+ addonId: null,
67431
+ access: "create",
67432
+ role: "admin"
67433
+ },
67434
+ "actionSource.listActions": {
67435
+ capName: "action-source",
67436
+ capScope: "system",
67437
+ addonId: null,
67438
+ access: "view",
67439
+ role: "admin"
67440
+ },
67441
+ "actionSource.runAction": {
67442
+ capName: "action-source",
67443
+ capScope: "system",
67444
+ addonId: null,
67445
+ access: "create",
67446
+ role: "admin"
67447
+ },
67448
+ "actionSource.stopAction": {
67449
+ capName: "action-source",
67450
+ capScope: "system",
67451
+ addonId: null,
67452
+ access: "create",
67453
+ role: "admin"
67454
+ },
66537
67455
  "addonPages.listPages": {
66538
67456
  capName: "addon-pages",
66539
67457
  capScope: "system",
@@ -67815,6 +68733,13 @@ Object.freeze({
67815
68733
  access: "view",
67816
68734
  role: "admin"
67817
68735
  },
68736
+ "coreBlocks.getAutomationRunState": {
68737
+ capName: "core-blocks",
68738
+ capScope: "system",
68739
+ addonId: null,
68740
+ access: "view",
68741
+ role: "admin"
68742
+ },
67818
68743
  "coreBlocks.getBlockSettings": {
67819
68744
  capName: "core-blocks",
67820
68745
  capScope: "system",
@@ -67836,6 +68761,13 @@ Object.freeze({
67836
68761
  access: "view",
67837
68762
  role: "admin"
67838
68763
  },
68764
+ "coreBlocks.getTraces": {
68765
+ capName: "core-blocks",
68766
+ capScope: "system",
68767
+ addonId: null,
68768
+ access: "view",
68769
+ role: "admin"
68770
+ },
67839
68771
  "coreBlocks.getTypeDefs": {
67840
68772
  capName: "core-blocks",
67841
68773
  capScope: "system",
@@ -67871,6 +68803,13 @@ Object.freeze({
67871
68803
  access: "create",
67872
68804
  role: "admin"
67873
68805
  },
68806
+ "coreBlocks.reportAutomationRun": {
68807
+ capName: "core-blocks",
68808
+ capScope: "system",
68809
+ addonId: null,
68810
+ access: "create",
68811
+ role: "admin"
68812
+ },
67874
68813
  "coreBlocks.restart": {
67875
68814
  capName: "core-blocks",
67876
68815
  capScope: "system",
@@ -69740,6 +70679,13 @@ Object.freeze({
69740
70679
  access: "view",
69741
70680
  role: "viewer"
69742
70681
  },
70682
+ "groupActive.getStatus": {
70683
+ capName: "group-active",
70684
+ capScope: "device",
70685
+ addonId: null,
70686
+ access: "view",
70687
+ role: "viewer"
70688
+ },
69743
70689
  "groupCommands.getStatus": {
69744
70690
  capName: "group-commands",
69745
70691
  capScope: "device",
@@ -70706,6 +71652,13 @@ Object.freeze({
70706
71652
  access: "create",
70707
71653
  role: "admin"
70708
71654
  },
71655
+ "meter.getStatus": {
71656
+ capName: "meter",
71657
+ capScope: "device",
71658
+ addonId: null,
71659
+ access: "view",
71660
+ role: "viewer"
71661
+ },
70709
71662
  "metricsProvider.collectSnapshot": {
70710
71663
  capName: "metrics-provider",
70711
71664
  capScope: "system",
@@ -76430,7 +77383,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76430
77383
  label: t("Full brightness", "Luminosità massima"),
76431
77384
  phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
76432
77385
  icon: "sun",
76433
- args: { percentage: 100 }
77386
+ args: { level: 100 }
76434
77387
  },
76435
77388
  {
76436
77389
  id: "brightness.half",
@@ -76438,7 +77391,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76438
77391
  label: t("Half brightness", "Luminosità a metà"),
76439
77392
  phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
76440
77393
  icon: "sun-dim",
76441
- args: { percentage: 50 }
77394
+ args: { level: 50 }
76442
77395
  },
76443
77396
  {
76444
77397
  id: "brightness.off",
@@ -76446,16 +77399,16 @@ var ACTUATOR_CAP_VOCABULARY = {
76446
77399
  label: t("Brightness off", "Luminosità a zero"),
76447
77400
  phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
76448
77401
  icon: "lightbulb-off",
76449
- args: { percentage: 0 }
77402
+ args: { level: 0 }
76450
77403
  },
76451
77404
  {
76452
77405
  id: "brightness.set",
76453
77406
  method: "setBrightness",
76454
77407
  label: t("Set brightness", "Imposta la luminosità"),
76455
- phrase: t("Set the brightness of {device} to {percentage}", "Imposta la luminosità di {device} a {percentage}"),
77408
+ phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
76456
77409
  icon: "sun-medium",
76457
77410
  openArgs: [{
76458
- key: "percentage",
77411
+ key: "level",
76459
77412
  label: PERCENT,
76460
77413
  offer: {
76461
77414
  kind: "number",
@@ -76469,13 +77422,13 @@ var ACTUATOR_CAP_VOCABULARY = {
76469
77422
  ],
76470
77423
  state: [{
76471
77424
  kind: "numeric",
76472
- field: "percentage",
77425
+ field: "level",
76473
77426
  quantity: t("the brightness", "la luminosità"),
76474
77427
  label: t("Brightness", "Luminosità"),
76475
77428
  unit: "%",
76476
77429
  icon: "sun"
76477
77430
  }],
76478
- events: { onBrightnessChanged: { notOperatorFacing: "the `percentage` state trigger reads the same change" } }
77431
+ events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
76479
77432
  },
76480
77433
  color: {
76481
77434
  scope: "device",
@@ -76489,7 +77442,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76489
77442
  icon: "sun",
76490
77443
  args: { color: {
76491
77444
  mode: "mired",
76492
- mireds: 370
77445
+ colorTemperature: 370
76493
77446
  } }
76494
77447
  },
76495
77448
  {
@@ -76500,7 +77453,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76500
77453
  icon: "snowflake",
76501
77454
  args: { color: {
76502
77455
  mode: "mired",
76503
- mireds: 200
77456
+ colorTemperature: 200
76504
77457
  } }
76505
77458
  },
76506
77459
  {
@@ -77114,7 +78067,7 @@ var ACTUATOR_CAP_VOCABULARY = {
77114
78067
  label: t("Fan off", "Ventilatore spento"),
77115
78068
  phrase: t("Stop {device}", "Ferma {device}"),
77116
78069
  icon: "power-off",
77117
- args: { percentage: 0 }
78070
+ args: { speed: 0 }
77118
78071
  },
77119
78072
  {
77120
78073
  id: "fan.full",
@@ -77122,16 +78075,16 @@ var ACTUATOR_CAP_VOCABULARY = {
77122
78075
  label: t("Fan full", "Ventilatore al massimo"),
77123
78076
  phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
77124
78077
  icon: "fan",
77125
- args: { percentage: 100 }
78078
+ args: { speed: 100 }
77126
78079
  },
77127
78080
  {
77128
78081
  id: "fan.speed",
77129
78082
  method: "setPercentage",
77130
78083
  label: t("Set speed", "Imposta la velocità"),
77131
- phrase: t("Set the speed of {device} to {percentage}", "Imposta la velocità di {device} al {percentage}"),
78084
+ phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
77132
78085
  icon: "fan",
77133
78086
  openArgs: [{
77134
- key: "percentage",
78087
+ key: "speed",
77135
78088
  label: t("Speed", "Velocità"),
77136
78089
  offer: {
77137
78090
  kind: "number",
@@ -77193,7 +78146,7 @@ var ACTUATOR_CAP_VOCABULARY = {
77193
78146
  ],
77194
78147
  state: [{
77195
78148
  kind: "numeric",
77196
- field: "percentage",
78149
+ field: "speed",
77197
78150
  quantity: t("the speed", "la velocità"),
77198
78151
  label: t("Speed", "Velocità"),
77199
78152
  unit: "%",
@@ -77991,7 +78944,7 @@ var APPLIANCE_CAP_VOCABULARY = {
77991
78944
  },
77992
78945
  {
77993
78946
  kind: "numeric",
77994
- field: "progressPercent",
78947
+ field: "progress",
77995
78948
  quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
77996
78949
  label: t("Progress", "Avanzamento"),
77997
78950
  unit: "%",
@@ -78349,10 +79302,10 @@ var APPLIANCE_CAP_VOCABULARY = {
78349
79302
  id: "media.seek",
78350
79303
  method: "seek",
78351
79304
  label: t("Seek", "Vai al punto"),
78352
- phrase: t("Move {device} to {positionMs}", "Porta {device} al punto {positionMs}"),
79305
+ phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
78353
79306
  icon: "fast-forward",
78354
79307
  openArgs: [{
78355
- key: "positionMs",
79308
+ key: "position",
78356
79309
  label: t("Position", "Posizione"),
78357
79310
  offer: {
78358
79311
  kind: "number",
@@ -79401,7 +80354,7 @@ var SENSOR_CAP_VOCABULARY = {
79401
80354
  state: [
79402
80355
  {
79403
80356
  kind: "numeric",
79404
- field: "co2Ppm",
80357
+ field: "co2",
79405
80358
  quantity: t("the CO₂", "la CO₂"),
79406
80359
  label: t("CO₂", "CO₂"),
79407
80360
  unit: "ppm",
@@ -79409,7 +80362,7 @@ var SENSOR_CAP_VOCABULARY = {
79409
80362
  },
79410
80363
  {
79411
80364
  kind: "numeric",
79412
- field: "vocPpb",
80365
+ field: "voc",
79413
80366
  quantity: t("the VOC level", "il livello di COV"),
79414
80367
  label: t("VOC", "COV"),
79415
80368
  unit: "ppb",
@@ -79445,7 +80398,7 @@ var SENSOR_CAP_VOCABULARY = {
79445
80398
  noun: t("Light level", "Luminosità ambiente"),
79446
80399
  state: [{
79447
80400
  kind: "numeric",
79448
- field: "lux",
80401
+ field: "illuminance",
79449
80402
  quantity: t("the light level", "la luminosità"),
79450
80403
  label: t("Illuminance", "Illuminamento"),
79451
80404
  unit: "lx",
@@ -79608,6 +80561,10 @@ var SENSOR_CAP_VOCABULARY = {
79608
80561
  icon: "flame"
79609
80562
  }]
79610
80563
  },
80564
+ "group-active": {
80565
+ scope: "device",
80566
+ noun: t("Group state", "Stato del gruppo")
80567
+ },
79611
80568
  "group-commands": {
79612
80569
  scope: "device",
79613
80570
  noun: t("Group command", "Comando di gruppo")
@@ -79644,7 +80601,7 @@ var SENSOR_CAP_VOCABULARY = {
79644
80601
  noun: t("Humidity", "Umidità"),
79645
80602
  state: [{
79646
80603
  kind: "numeric",
79647
- field: "percent",
80604
+ field: "humidity",
79648
80605
  quantity: t("the humidity", "l’umidità"),
79649
80606
  label: t("Humidity", "Umidità"),
79650
80607
  unit: "%",
@@ -79664,6 +80621,17 @@ var SENSOR_CAP_VOCABULARY = {
79664
80621
  }],
79665
80622
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
79666
80623
  },
80624
+ meter: {
80625
+ scope: "device",
80626
+ noun: t("Meter", "Contatore"),
80627
+ state: [{
80628
+ kind: "numeric",
80629
+ field: "value",
80630
+ quantity: t("the total", "il totale"),
80631
+ label: t("Total", "Totale"),
80632
+ icon: "gauge"
80633
+ }]
80634
+ },
79667
80635
  "numeric-sensor": {
79668
80636
  scope: "device",
79669
80637
  noun: t("Sensor", "Sensore"),
@@ -79681,7 +80649,7 @@ var SENSOR_CAP_VOCABULARY = {
79681
80649
  state: [
79682
80650
  {
79683
80651
  kind: "numeric",
79684
- field: "watts",
80652
+ field: "power",
79685
80653
  quantity: t("the power draw", "il consumo"),
79686
80654
  label: t("Power", "Potenza"),
79687
80655
  unit: "W",
@@ -79689,7 +80657,7 @@ var SENSOR_CAP_VOCABULARY = {
79689
80657
  },
79690
80658
  {
79691
80659
  kind: "numeric",
79692
- field: "kwhTotal",
80660
+ field: "energy",
79693
80661
  quantity: t("the energy used", "l’energia consumata"),
79694
80662
  label: t("Energy", "Energia"),
79695
80663
  unit: "kWh",
@@ -79697,7 +80665,7 @@ var SENSOR_CAP_VOCABULARY = {
79697
80665
  },
79698
80666
  {
79699
80667
  kind: "numeric",
79700
- field: "volts",
80668
+ field: "voltage",
79701
80669
  quantity: t("the voltage", "la tensione"),
79702
80670
  label: t("Voltage", "Tensione"),
79703
80671
  unit: "V",
@@ -79705,7 +80673,7 @@ var SENSOR_CAP_VOCABULARY = {
79705
80673
  },
79706
80674
  {
79707
80675
  kind: "numeric",
79708
- field: "amps",
80676
+ field: "current",
79709
80677
  quantity: t("the current", "la corrente"),
79710
80678
  label: t("Current", "Corrente"),
79711
80679
  unit: "A",
@@ -79722,13 +80690,6 @@ var SENSOR_CAP_VOCABULARY = {
79722
80690
  label: t("Where", "Posizione"),
79723
80691
  phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
79724
80692
  icon: "map-pin"
79725
- }, {
79726
- kind: "numeric",
79727
- field: "batteryPercent",
79728
- quantity: t("the phone battery", "la batteria del telefono"),
79729
- label: t("Battery", "Batteria"),
79730
- unit: "%",
79731
- icon: "battery"
79732
80693
  }]
79733
80694
  },
79734
80695
  "pressure-sensor": {
@@ -79736,7 +80697,7 @@ var SENSOR_CAP_VOCABULARY = {
79736
80697
  noun: t("Pressure", "Pressione"),
79737
80698
  state: [{
79738
80699
  kind: "numeric",
79739
- field: "hpa",
80700
+ field: "pressure",
79740
80701
  quantity: t("the pressure", "la pressione"),
79741
80702
  label: t("Pressure", "Pressione"),
79742
80703
  unit: "hPa",
@@ -79772,7 +80733,7 @@ var SENSOR_CAP_VOCABULARY = {
79772
80733
  noun: t("Temperature", "Temperatura"),
79773
80734
  state: [{
79774
80735
  kind: "numeric",
79775
- field: "celsius",
80736
+ field: "temperature",
79776
80737
  quantity: t("the temperature", "la temperatura"),
79777
80738
  label: t("Temperature", "Temperatura"),
79778
80739
  unit: "°C",
@@ -79843,7 +80804,7 @@ var SENSOR_CAP_VOCABULARY = {
79843
80804
  state: [
79844
80805
  {
79845
80806
  kind: "numeric",
79846
- field: "percentage",
80807
+ field: "level",
79847
80808
  quantity: t("the battery level", "il livello della batteria"),
79848
80809
  label: t("Battery", "Batteria"),
79849
80810
  unit: "%",
@@ -79885,7 +80846,7 @@ var SENSOR_CAP_VOCABULARY = {
79885
80846
  icon: "battery-charging"
79886
80847
  }
79887
80848
  ],
79888
- events: { onStatusChanged: { notOperatorFacing: "the percentage / sleeping / charging state triggers each read one field of this change" } },
80849
+ events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
79889
80850
  extraEvents: [{
79890
80851
  category: EventCategory.DeviceAwake,
79891
80852
  label: t("Woke up", "Risvegliato"),
@@ -79903,7 +80864,7 @@ var SENSOR_CAP_VOCABULARY = {
79903
80864
  noun: t("Network link", "Collegamento di rete"),
79904
80865
  state: [{
79905
80866
  kind: "numeric",
79906
- field: "signalPercent",
80867
+ field: "signal",
79907
80868
  quantity: t("the signal strength", "l’intensità del segnale"),
79908
80869
  label: t("Signal", "Segnale"),
79909
80870
  unit: "%",
@@ -79996,6 +80957,8 @@ var ML = "model and training machinery — no device action";
79996
80957
  var INTERNAL = "internal plumbing between addons — never operator-facing";
79997
80958
  /** Every system-scoped cap, with why it is not a device's vocabulary. */
79998
80959
  var SYSTEM_CAP_VOCABULARY = {
80960
+ "action-source": system(INTERNAL),
80961
+ actions: system("declared actions — run from the Actions page and from the cameras that link them"),
79999
80962
  "addon-pages": system(UI_PLUMBING),
80000
80963
  "addon-pages-source": system(UI_PLUMBING),
80001
80964
  "addon-routes": system(UI_PLUMBING),
@@ -80217,6 +81180,31 @@ Object.freeze({
80217
81180
  form: "single",
80218
81181
  optional: false
80219
81182
  }],
81183
+ "actions.get": [{
81184
+ name: "deviceId",
81185
+ form: "single",
81186
+ optional: true
81187
+ }],
81188
+ "actions.getLinks": [{
81189
+ name: "deviceId",
81190
+ form: "single",
81191
+ optional: false
81192
+ }],
81193
+ "actions.listForCamera": [{
81194
+ name: "deviceId",
81195
+ form: "single",
81196
+ optional: false
81197
+ }],
81198
+ "actions.run": [{
81199
+ name: "deviceId",
81200
+ form: "single",
81201
+ optional: true
81202
+ }],
81203
+ "actions.setLinks": [{
81204
+ name: "deviceId",
81205
+ form: "single",
81206
+ optional: false
81207
+ }],
80220
81208
  "addonSettings.getDeviceSettings": [{
80221
81209
  name: "deviceId",
80222
81210
  form: "single",
@@ -81168,6 +82156,11 @@ Object.freeze({
81168
82156
  form: "single",
81169
82157
  optional: false
81170
82158
  }],
82159
+ "groupActive.getStatus": [{
82160
+ name: "deviceId",
82161
+ form: "single",
82162
+ optional: false
82163
+ }],
81171
82164
  "groupCommands.getStatus": [{
81172
82165
  name: "deviceId",
81173
82166
  form: "single",
@@ -81378,6 +82371,11 @@ Object.freeze({
81378
82371
  form: "single",
81379
82372
  optional: false
81380
82373
  }],
82374
+ "meter.getStatus": [{
82375
+ name: "deviceId",
82376
+ form: "single",
82377
+ optional: false
82378
+ }],
81381
82379
  "motion.getStatus": [{
81382
82380
  name: "deviceId",
81383
82381
  form: "single",
@@ -82985,7 +83983,6 @@ Object.freeze({
82985
83983
  "network-access": "ingress",
82986
83984
  "smtp-provider": "email"
82987
83985
  });
82988
- DeviceType.Camera;
82989
83986
  /**
82990
83987
  * A saved Customize assignment (D936). The schema is the type: callers use
82991
83988
  * `z.infer`, they do not restate the shape.
@@ -84289,6 +85286,7 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
84289
85286
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
84290
85287
  DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
84291
85288
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
85289
+ String.raw`(?<=^|["'(\s>,\[{])`;
84292
85290
  var MB = 1024 * 1024;
84293
85291
  1024 * MB, 3072 * MB;
84294
85292
  process.platform, process.env["SystemRoot"];
@@ -133588,7 +134586,7 @@ function applyServiceLabel(service, name) {
133588
134586
  var LOW_BATTERY_THRESHOLD_PCT = 20;
133589
134587
  /**
133590
134588
  * Mapping:
133591
- * - `BatteryStatus.percentage` (0..100) → `Characteristic.BatteryLevel`
134589
+ * - `BatteryStatus.level` (0..100) → `Characteristic.BatteryLevel`
133592
134590
  * - `BatteryStatus.charging`:
133593
134591
  * `'none'` → `ChargingState.NOT_CHARGING`
133594
134592
  * `'dc' | 'solar'` → `ChargingState.CHARGING`
@@ -133596,12 +134594,12 @@ var LOW_BATTERY_THRESHOLD_PCT = 20;
133596
134594
  * either value would be a claim
133597
134595
  * - `percentage <= LOW_BATTERY_THRESHOLD_PCT` → `StatusLowBattery.LOW`
133598
134596
  */
133599
- var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ percentage: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
133600
- if (status.percentage === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
134597
+ var batteryCharacteristicUpdates = reader(BatteryStatusSchema.pick({ level: true }).extend({ charging: BatteryStatusSchema.shape.charging.optional() }), (status) => {
134598
+ if (status.level === null) return status.charging === void 0 || status.charging === "unknown" ? [] : [{
133601
134599
  characteristic: import_dist.Characteristic.ChargingState,
133602
134600
  value: status.charging === "none" ? import_dist.Characteristic.ChargingState.NOT_CHARGING : import_dist.Characteristic.ChargingState.CHARGING
133603
134601
  }];
133604
- const pct = Math.max(0, Math.min(100, Math.round(status.percentage)));
134602
+ const pct = Math.max(0, Math.min(100, Math.round(status.level)));
133605
134603
  return [
133606
134604
  {
133607
134605
  characteristic: import_dist.Characteristic.BatteryLevel,
@@ -133703,7 +134701,7 @@ async function buildChildSwitch(bctx, subtype, deviceType) {
133703
134701
  }
133704
134702
  if (useLightbulb) try {
133705
134703
  const status = await proxy.brightness?.getStatus({});
133706
- if (status && typeof status.percentage === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, status.percentage);
134704
+ if (status && typeof status.level === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, status.level);
133707
134705
  } catch (err) {
133708
134706
  log.debug("export-hap: child brightness.getStatus failed (non-fatal)", { meta: { error: errMsg$13(err) } });
133709
134707
  }
@@ -133722,7 +134720,7 @@ async function buildChildSwitch(bctx, subtype, deviceType) {
133722
134720
  const percentage = typeof value === "number" ? value : Number(value);
133723
134721
  if (!Number.isFinite(percentage)) return;
133724
134722
  try {
133725
- await proxy.brightness?.setBrightness({ percentage });
134723
+ await proxy.brightness?.setBrightness({ level: percentage });
133726
134724
  } catch (err) {
133727
134725
  log.warn("export-hap: child brightness.setBrightness failed", { meta: {
133728
134726
  percentage,
@@ -133739,7 +134737,7 @@ async function buildChildSwitch(bctx, subtype, deviceType) {
133739
134737
  }
133740
134738
  if (useLightbulb && proxy.state.brightness) {
133741
134739
  const unsubBrightness = proxy.state.brightness.subscribe((value) => {
133742
- if (value && typeof value.percentage === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, value.percentage);
134740
+ if (value && typeof value.level === "number") service.updateCharacteristic(import_dist.Characteristic.Brightness, value.level);
133743
134741
  });
133744
134742
  unsubscribes.push(unsubBrightness);
133745
134743
  }
@@ -134285,9 +135283,9 @@ var SENSOR_SPECS = {
134285
135283
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.TemperatureSensor, name, subtype),
134286
135284
  getStatus: (proxy) => proxy.temperatureSensor?.getStatus({}),
134287
135285
  subscribe: (proxy, onValue) => proxy.state.temperatureSensor?.subscribe(onValue) ?? null,
134288
- read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => status.celsius === null ? [] : [{
135286
+ read: reader(TemperatureSensorStatusSchema.pick({ temperature: true }), (status) => status.temperature === null ? [] : [{
134289
135287
  characteristic: import_dist.Characteristic.CurrentTemperature,
134290
- value: status.celsius
135288
+ value: status.temperature
134291
135289
  }])
134292
135290
  },
134293
135291
  "humidity-sensor": {
@@ -134295,9 +135293,9 @@ var SENSOR_SPECS = {
134295
135293
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.HumiditySensor, name, subtype),
134296
135294
  getStatus: (proxy) => proxy.humiditySensor?.getStatus({}),
134297
135295
  subscribe: (proxy, onValue) => proxy.state.humiditySensor?.subscribe(onValue) ?? null,
134298
- read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => status.percent === null ? [] : [{
135296
+ read: reader(HumiditySensorStatusSchema.pick({ humidity: true }), (status) => status.humidity === null ? [] : [{
134299
135297
  characteristic: import_dist.Characteristic.CurrentRelativeHumidity,
134300
- value: status.percent
135298
+ value: status.humidity
134301
135299
  }])
134302
135300
  },
134303
135301
  "ambient-light-sensor": {
@@ -134305,9 +135303,9 @@ var SENSOR_SPECS = {
134305
135303
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.LightSensor, name, subtype),
134306
135304
  getStatus: (proxy) => proxy.ambientLightSensor?.getStatus({}),
134307
135305
  subscribe: (proxy, onValue) => proxy.state.ambientLightSensor?.subscribe(onValue) ?? null,
134308
- read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => status.lux === null ? [] : [{
135306
+ read: reader(AmbientLightSensorStatusSchema.pick({ illuminance: true }), (status) => status.illuminance === null ? [] : [{
134309
135307
  characteristic: import_dist.Characteristic.CurrentAmbientLightLevel,
134310
- value: Math.max(MIN_LUX, status.lux)
135308
+ value: Math.max(MIN_LUX, status.illuminance)
134311
135309
  }])
134312
135310
  }
134313
135311
  };