@camstack/addon-post-analysis 1.2.642 → 1.2.644

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.
Files changed (17) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/README.md +20 -12
  3. package/dist/{clip-model-registry-Dj3lrvL2.js → clip-model-registry-Bu2ZxGpm.js} +374 -37
  4. package/dist/{clip-model-registry-CoH7ORtC.mjs → clip-model-registry-CnFDRU_E.mjs} +374 -37
  5. package/dist/embedding-encoder/index.js +1 -1
  6. package/dist/embedding-encoder/index.mjs +1 -1
  7. package/dist/pipeline-analytics/_stub.js +2 -2
  8. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Dhan9FH4.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CN1G5ocH.mjs} +3 -3
  9. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B8Q_nFhl.mjs +26 -0
  10. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CVItuOhm.mjs +26 -0
  11. package/dist/pipeline-analytics/{hostInit-j1gxJvS7.mjs → hostInit-OkB37BMo.mjs} +3 -3
  12. package/dist/pipeline-analytics/index.js +58 -10
  13. package/dist/pipeline-analytics/index.mjs +58 -10
  14. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  15. package/package.json +1 -1
  16. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-_TUthUZh.mjs +0 -26
  17. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CuNXxDlT.mjs +0 -26
@@ -5640,7 +5640,7 @@ var ZodIssueCode = {
5640
5640
  var ZodFirstPartyTypeKind;
5641
5641
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5642
5642
  //#endregion
5643
- //#region ../types/dist/sleep-0sD_LHLI.mjs
5643
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5644
5644
  /**
5645
5645
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5646
5646
  * window to float samples (D455).
@@ -9061,6 +9061,7 @@ var CAP_NAMES = Object.freeze([
9061
9061
  "filesystem-browse",
9062
9062
  "flood",
9063
9063
  "gas",
9064
+ "group-active",
9064
9065
  "group-commands",
9065
9066
  "group-status",
9066
9067
  "heating-valve",
@@ -9882,6 +9883,10 @@ Object.freeze({
9882
9883
  "path": "detected",
9883
9884
  "valueType": "boolean"
9884
9885
  }],
9886
+ "group-active": [{
9887
+ "path": "active",
9888
+ "valueType": "boolean"
9889
+ }],
9885
9890
  "group-status": [
9886
9891
  {
9887
9892
  "path": "included",
@@ -10890,7 +10895,7 @@ Object.freeze({
10890
10895
  * can answer "may a rule actuate this?" without importing the schema barrel
10891
10896
  * (~144MB RSS per runner, D28).
10892
10897
  *
10893
- * Coverage: 94 device-scoped capabilities.
10898
+ * Coverage: 95 device-scoped capabilities.
10894
10899
  */
10895
10900
  var DEVICE_SCOPED_CAPS = new Set([
10896
10901
  "accessories",
@@ -10931,6 +10936,7 @@ var DEVICE_SCOPED_CAPS = new Set([
10931
10936
  "feature-probe",
10932
10937
  "flood",
10933
10938
  "gas",
10939
+ "group-active",
10934
10940
  "group-commands",
10935
10941
  "group-status",
10936
10942
  "heating-valve",
@@ -11391,7 +11397,7 @@ function errMsg(err) {
11391
11397
  return String(err);
11392
11398
  }
11393
11399
  //#endregion
11394
- //#region ../types/dist/composition-CpETZ4HL.mjs
11400
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
11395
11401
  /**
11396
11402
  * Deterministic SHA-256 hash of an arbitrary serialisable value. The
11397
11403
  * canonical form sorts object keys alphabetically at every depth so two
@@ -11866,6 +11872,13 @@ var table = {
11866
11872
  apply: () => {
11867
11873
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11868
11874
  }
11875
+ },
11876
+ schmitt: {
11877
+ minArgs: 3,
11878
+ maxArgs: 5,
11879
+ apply: () => {
11880
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11881
+ }
11869
11882
  }
11870
11883
  };
11871
11884
  Object.freeze(Object.assign(Object.create(null), table));
@@ -12376,7 +12389,7 @@ var RESET_PERIODS = [
12376
12389
  5 * MINUTE_MS;
12377
12390
  24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
12378
12391
  7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
12379
- var StatisticWindowSchema = discriminatedUnion("kind", [object({
12392
+ var rollingWindowObject = object({
12380
12393
  kind: literal("rolling"),
12381
12394
  span: _enum(ROLLING_SPANS),
12382
12395
  customMinutes: number().int().min(5).optional()
@@ -12393,7 +12406,9 @@ var StatisticWindowSchema = discriminatedUnion("kind", [object({
12393
12406
  path: ["customMinutes"],
12394
12407
  input: payload.value
12395
12408
  });
12396
- }), object({
12409
+ });
12410
+ var RollingWindowSchema = rollingWindowObject;
12411
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
12397
12412
  kind: literal("calendar"),
12398
12413
  period: _enum(CALENDAR_PERIODS)
12399
12414
  })]);
@@ -12423,7 +12438,13 @@ var GROUP_TEMPLATE_IDS = [
12423
12438
  "occupancy",
12424
12439
  "binary",
12425
12440
  "switch",
12426
- "light"
12441
+ "light",
12442
+ "fan",
12443
+ "cover",
12444
+ "valve",
12445
+ "lock",
12446
+ "media-player",
12447
+ "climate"
12427
12448
  ];
12428
12449
  var NUMERIC_AGGREGATES = [
12429
12450
  "mean",
@@ -12482,6 +12503,42 @@ var HelperSpecSchema = discriminatedUnion("kind", [
12482
12503
  reset: _enum(RESET_PERIODS),
12483
12504
  output: _enum(["energy", "meter"]),
12484
12505
  source: HelperMemberSchema
12506
+ }),
12507
+ object({
12508
+ kind: literal("threshold"),
12509
+ source: HelperMemberSchema,
12510
+ high: number(),
12511
+ low: number(),
12512
+ onForMs: number().int().nonnegative(),
12513
+ offForMs: number().int().nonnegative()
12514
+ }),
12515
+ object({
12516
+ kind: literal("arithmetic"),
12517
+ op: _enum([
12518
+ "sum",
12519
+ "difference",
12520
+ "ratio"
12521
+ ]),
12522
+ inputs: array(HelperMemberSchema).min(2).max(64)
12523
+ }),
12524
+ object({
12525
+ kind: literal("expression"),
12526
+ expr: string().min(1),
12527
+ inputs: array(object({
12528
+ name: string().min(1),
12529
+ member: HelperMemberSchema
12530
+ })).min(1).max(64),
12531
+ output: _enum(["number", "boolean"])
12532
+ }),
12533
+ object({
12534
+ kind: literal("derivative"),
12535
+ window: RollingWindowSchema,
12536
+ per: _enum([
12537
+ "second",
12538
+ "minute",
12539
+ "hour"
12540
+ ]),
12541
+ source: HelperMemberSchema
12485
12542
  })
12486
12543
  ]);
12487
12544
  /** A composed device's stableId is this prefix plus the block id. */
@@ -12544,6 +12601,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12544
12601
  "all"
12545
12602
  ]),
12546
12603
  reads: array(CompositionFieldReadSchema).min(1).max(64),
12604
+ /**
12605
+ * Set when the reads are an enum state, not a yes/no: the listed states
12606
+ * count as active (a cover is `open`). A state outside the list is inactive;
12607
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
12608
+ */
12609
+ activeWhen: array(string().min(1)).min(1).optional(),
12547
12610
  /** `value` is the reading; the others are the member counts. */
12548
12611
  publish: _enum([
12549
12612
  "value",
@@ -18515,7 +18578,22 @@ var BrokerProviderInfoSchema = object({
18515
18578
  */
18516
18579
  interactiveConnectPath: string().min(1).optional(),
18517
18580
  /** Relative hub path to disconnect the linked account (same popup pattern). */
18518
- interactiveDisconnectPath: string().min(1).optional()
18581
+ interactiveDisconnectPath: string().min(1).optional(),
18582
+ /**
18583
+ * The kind signs in through a server-held interactive session instead of
18584
+ * (or before) typed credentials. `basePath` is a hub-relative route set
18585
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
18586
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
18587
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
18588
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
18589
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
18590
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
18591
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
18592
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
18593
+ * offers it as the default path; the fields the session fills are
18594
+ * marked `filledBySignIn` in the kind's settings schema.
18595
+ */
18596
+ signIn: object({ basePath: string().min(1) }).optional()
18519
18597
  }))
18520
18598
  });
18521
18599
  var ListInputSchema = object({
@@ -19859,13 +19937,17 @@ Object.freeze({
19859
19937
  latchedAt: {
19860
19938
  kind: "fixed",
19861
19939
  result: ["number", "null"]
19940
+ },
19941
+ schmitt: {
19942
+ kind: "fixed",
19943
+ result: ["boolean", "null"]
19862
19944
  }
19863
19945
  });
19864
19946
  /**
19865
19947
  * One catalog row per base reading a group helper can build (D944 §3).
19866
19948
  * Data, not a form default written into the block.
19867
19949
  */
19868
- var NOW$1 = {
19950
+ var NOW$2 = {
19869
19951
  fieldPath: "lastFetchedAt",
19870
19952
  expr: "now"
19871
19953
  };
@@ -19879,6 +19961,8 @@ function numeric(input) {
19879
19961
  family: "numeric",
19880
19962
  deviceType: DeviceType.Sensor,
19881
19963
  memberDeviceType: DeviceType.Sensor,
19964
+ memberDeviceTypes: [DeviceType.Sensor],
19965
+ activeWhen: void 0,
19882
19966
  commandCaps: [],
19883
19967
  baseUnit: baseUnitOf(input.quantity),
19884
19968
  aggregates: NUMERIC_AGGREGATES,
@@ -19894,6 +19978,8 @@ function binary(input) {
19894
19978
  family: "binary",
19895
19979
  deviceType: DeviceType.Sensor,
19896
19980
  memberDeviceType: DeviceType.Sensor,
19981
+ memberDeviceTypes: [DeviceType.Sensor],
19982
+ activeWhen: void 0,
19897
19983
  commandCaps: [],
19898
19984
  quantity: "none",
19899
19985
  baseUnit: void 0,
@@ -19911,7 +19997,7 @@ var GROUP_TEMPLATES = [
19911
19997
  quantity: "temperature",
19912
19998
  defaultAggregate: "mean",
19913
19999
  empty: "null",
19914
- companions: [NOW$1]
20000
+ companions: [NOW$2]
19915
20001
  }),
19916
20002
  numeric({
19917
20003
  id: "humidity",
@@ -19922,7 +20008,7 @@ var GROUP_TEMPLATES = [
19922
20008
  quantity: "humidity",
19923
20009
  defaultAggregate: "mean",
19924
20010
  empty: "null",
19925
- companions: [NOW$1]
20011
+ companions: [NOW$2]
19926
20012
  }),
19927
20013
  numeric({
19928
20014
  id: "pressure",
@@ -19933,7 +20019,7 @@ var GROUP_TEMPLATES = [
19933
20019
  quantity: "pressure",
19934
20020
  defaultAggregate: "mean",
19935
20021
  empty: "null",
19936
- companions: [NOW$1]
20022
+ companions: [NOW$2]
19937
20023
  }),
19938
20024
  numeric({
19939
20025
  id: "illuminance",
@@ -19944,7 +20030,7 @@ var GROUP_TEMPLATES = [
19944
20030
  quantity: "illuminance",
19945
20031
  defaultAggregate: "mean",
19946
20032
  empty: "null",
19947
- companions: [NOW$1]
20033
+ companions: [NOW$2]
19948
20034
  }),
19949
20035
  numeric({
19950
20036
  id: "power",
@@ -19955,7 +20041,7 @@ var GROUP_TEMPLATES = [
19955
20041
  quantity: "power",
19956
20042
  defaultAggregate: "sum",
19957
20043
  empty: "omit",
19958
- companions: [NOW$1]
20044
+ companions: [NOW$2]
19959
20045
  }),
19960
20046
  numeric({
19961
20047
  id: "energy",
@@ -19966,7 +20052,7 @@ var GROUP_TEMPLATES = [
19966
20052
  quantity: "energy",
19967
20053
  defaultAggregate: "sum",
19968
20054
  empty: "omit",
19969
- companions: [NOW$1]
20055
+ companions: [NOW$2]
19970
20056
  }),
19971
20057
  numeric({
19972
20058
  id: "battery",
@@ -20001,7 +20087,7 @@ var GROUP_TEMPLATES = [
20001
20087
  quantity: "device",
20002
20088
  defaultAggregate: "mean",
20003
20089
  empty: "null",
20004
- companions: [NOW$1]
20090
+ companions: [NOW$2]
20005
20091
  }),
20006
20092
  binary({
20007
20093
  id: "motion",
@@ -20095,6 +20181,11 @@ var GROUP_TEMPLATES = [
20095
20181
  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.",
20096
20182
  deviceType: DeviceType.Switch,
20097
20183
  outputCap: "switch",
20184
+ outputField: "on",
20185
+ member: {
20186
+ cap: "switch",
20187
+ fieldPath: "on"
20188
+ },
20098
20189
  commandCaps: ["switch"]
20099
20190
  }),
20100
20191
  actuator({
@@ -20102,29 +20193,130 @@ var GROUP_TEMPLATES = [
20102
20193
  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.",
20103
20194
  deviceType: DeviceType.Light,
20104
20195
  outputCap: "switch",
20196
+ outputField: "on",
20197
+ member: {
20198
+ cap: "switch",
20199
+ fieldPath: "on"
20200
+ },
20105
20201
  commandCaps: [
20106
20202
  "switch",
20107
20203
  "brightness",
20108
20204
  "color"
20109
20205
  ]
20206
+ }),
20207
+ actuator({
20208
+ id: "fan",
20209
+ 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.",
20210
+ deviceType: DeviceType.Fan,
20211
+ outputCap: "switch",
20212
+ outputField: "on",
20213
+ member: {
20214
+ cap: "switch",
20215
+ fieldPath: "on"
20216
+ },
20217
+ commandCaps: ["switch", "fan-control"]
20218
+ }),
20219
+ actuator({
20220
+ id: "cover",
20221
+ 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.",
20222
+ deviceType: DeviceType.Cover,
20223
+ outputCap: "group-active",
20224
+ outputField: "active",
20225
+ member: {
20226
+ cap: "cover",
20227
+ fieldPath: "state"
20228
+ },
20229
+ activeWhen: [
20230
+ "open",
20231
+ "opening",
20232
+ "stopped"
20233
+ ],
20234
+ commandCaps: ["cover"]
20235
+ }),
20236
+ actuator({
20237
+ id: "valve",
20238
+ 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.",
20239
+ deviceType: DeviceType.Valve,
20240
+ outputCap: "group-active",
20241
+ outputField: "active",
20242
+ member: {
20243
+ cap: "valve",
20244
+ fieldPath: "state"
20245
+ },
20246
+ activeWhen: [
20247
+ "open",
20248
+ "opening",
20249
+ "stopped"
20250
+ ],
20251
+ commandCaps: ["valve"]
20252
+ }),
20253
+ actuator({
20254
+ id: "lock",
20255
+ 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.",
20256
+ deviceType: DeviceType.Lock,
20257
+ outputCap: "group-active",
20258
+ outputField: "active",
20259
+ member: {
20260
+ cap: "lock-control",
20261
+ fieldPath: "state"
20262
+ },
20263
+ activeWhen: ["locked"],
20264
+ commandCaps: ["lock-control"]
20265
+ }),
20266
+ actuator({
20267
+ id: "media-player",
20268
+ 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.",
20269
+ deviceType: DeviceType.MediaPlayer,
20270
+ outputCap: "group-active",
20271
+ outputField: "active",
20272
+ member: {
20273
+ cap: "media-player",
20274
+ fieldPath: "state"
20275
+ },
20276
+ activeWhen: ["playing", "buffering"],
20277
+ commandCaps: ["media-player"]
20278
+ }),
20279
+ actuator({
20280
+ id: "climate",
20281
+ 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.",
20282
+ deviceType: DeviceType.Thermostat,
20283
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
20284
+ outputCap: "group-active",
20285
+ outputField: "active",
20286
+ member: {
20287
+ cap: "climate-control",
20288
+ fieldPath: "mode"
20289
+ },
20290
+ activeWhen: [
20291
+ "heat",
20292
+ "cool",
20293
+ "auto",
20294
+ "heat_cool",
20295
+ "fan_only",
20296
+ "dry"
20297
+ ],
20298
+ commandCaps: ["climate-control"]
20110
20299
  })
20111
20300
  ];
20112
20301
  function actuator(input) {
20113
20302
  return {
20114
- ...input,
20303
+ id: input.id,
20304
+ summary: input.summary,
20305
+ deviceType: input.deviceType,
20306
+ outputCap: input.outputCap,
20307
+ outputField: input.outputField,
20308
+ commandCaps: input.commandCaps,
20115
20309
  family: "actuator",
20116
20310
  role: void 0,
20117
20311
  memberDeviceType: input.deviceType,
20118
- outputField: "on",
20312
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
20313
+ activeWhen: input.activeWhen,
20119
20314
  quantity: "none",
20120
20315
  baseUnit: void 0,
20121
20316
  aggregates: BINARY_AGGREGATES,
20122
20317
  defaultAggregate: "any",
20123
20318
  empty: "offline",
20124
- accept: [{
20125
- cap: "switch",
20126
- fieldPath: "on"
20127
- }],
20319
+ accept: [input.member],
20128
20320
  companions: [CHANGED]
20129
20321
  };
20130
20322
  }
@@ -45460,7 +45652,7 @@ var NetworkAccessStatusSchema = object({
45460
45652
  });
45461
45653
  /**
45462
45654
  * Optional, richer endpoint shape returned by providers that expose
45463
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
45655
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
45464
45656
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
45465
45657
  * the originating provider config (mode + sourcePort) so the
45466
45658
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -60764,7 +60956,8 @@ var BATTERY_DEVICE_TYPES = [
60764
60956
  DeviceType.Switch,
60765
60957
  DeviceType.PetFeeder,
60766
60958
  DeviceType.Container,
60767
- DeviceType.Thermostat
60959
+ DeviceType.Thermostat,
60960
+ DeviceType.EventEmitter
60768
60961
  ];
60769
60962
  /** Generic Customize target for the percentage reading (D936). */
60770
60963
  var batteryCustomize = {
@@ -63727,7 +63920,17 @@ var groupCommandsCapability = {
63727
63920
  scope: "device",
63728
63921
  deviceNative: true,
63729
63922
  mode: "singleton",
63730
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
63923
+ deviceTypes: [
63924
+ DeviceType.Switch,
63925
+ DeviceType.Light,
63926
+ DeviceType.Fan,
63927
+ DeviceType.Cover,
63928
+ DeviceType.Valve,
63929
+ DeviceType.Lock,
63930
+ DeviceType.MediaPlayer,
63931
+ DeviceType.Thermostat,
63932
+ DeviceType.Climate
63933
+ ],
63731
63934
  methods: {},
63732
63935
  status: {
63733
63936
  schema: GroupCommandsSchema,
@@ -63745,6 +63948,49 @@ var groupCommandsCapability = {
63745
63948
  history: "none"
63746
63949
  };
63747
63950
  /**
63951
+ * Whether a helper actuator group counts as active (D944): at least one
63952
+ * included member is, or every included member is. What "active" means is the
63953
+ * type's: a cover is open, a lock is locked, a media player is playing, a
63954
+ * climate device is not off. A group of lights, switches and fans reports
63955
+ * `switch.on` instead; this cap is for the types whose own state is not a
63956
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
63957
+ * empty included set takes the device offline, never `active: false`.
63958
+ */
63959
+ var GroupActiveSchema = object({
63960
+ active: boolean().meta({ label: "Active" }),
63961
+ /** Ms epoch when the slice was last updated. */
63962
+ lastChangedAt: number()
63963
+ });
63964
+ var groupActiveCapability = {
63965
+ name: "group-active",
63966
+ scope: "device",
63967
+ deviceNative: true,
63968
+ mode: "singleton",
63969
+ deviceTypes: [
63970
+ DeviceType.Cover,
63971
+ DeviceType.Valve,
63972
+ DeviceType.Lock,
63973
+ DeviceType.MediaPlayer,
63974
+ DeviceType.Climate,
63975
+ DeviceType.Thermostat
63976
+ ],
63977
+ methods: {},
63978
+ status: {
63979
+ schema: GroupActiveSchema,
63980
+ kind: "push"
63981
+ },
63982
+ runtimeState: GroupActiveSchema,
63983
+ /**
63984
+ * Runtime-state durability: **session** — recomputed from the members on the
63985
+ * next source event; a restored value would outlive the members it named.
63986
+ *
63987
+ * See `RuntimeStateDurability`. Enforced by
63988
+ * `scripts/check-runtime-state-durability.ts`.
63989
+ */
63990
+ durability: "session",
63991
+ history: "none"
63992
+ };
63993
+ /**
63748
63994
  * How many members of a helper group answered (D944). Counts are integers,
63749
63995
  * not measurements: zero included is a real count, never a stand-in reading.
63750
63996
  * The reading itself stays on the output capability. History is none — the
@@ -63775,7 +64021,14 @@ var groupStatusCapability = {
63775
64021
  deviceTypes: [
63776
64022
  DeviceType.Sensor,
63777
64023
  DeviceType.Switch,
63778
- DeviceType.Light
64024
+ DeviceType.Light,
64025
+ DeviceType.Fan,
64026
+ DeviceType.Cover,
64027
+ DeviceType.Valve,
64028
+ DeviceType.Lock,
64029
+ DeviceType.MediaPlayer,
64030
+ DeviceType.Thermostat,
64031
+ DeviceType.Climate
63779
64032
  ],
63780
64033
  methods: {},
63781
64034
  status: {
@@ -65069,7 +65322,14 @@ var lockControlCapability = {
65069
65322
  }),
65070
65323
  unlock: method(object({
65071
65324
  deviceId: number().int().nonnegative(),
65072
- code: string().min(1).optional()
65325
+ code: string().min(1).optional(),
65326
+ /**
65327
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
65328
+ * with one call is refused unless the caller says it was confirmed. A
65329
+ * single lock ignores it. The refusal lives in the callee, so no
65330
+ * automation or API caller reaches the doors by skipping a dialog.
65331
+ */
65332
+ confirm: boolean().optional()
65073
65333
  }), _void(), {
65074
65334
  kind: "mutation",
65075
65335
  auth: "protected"
@@ -67715,9 +67975,9 @@ var PowerMeterStatusSchema = object({
67715
67975
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
67716
67976
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
67717
67977
  /** Voltage in volts. */
67718
- volts: number().optional().meta(readingMeta("voltage")),
67978
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
67719
67979
  /** Current in amperes. */
67720
- amps: number().optional().meta(readingMeta("current")),
67980
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
67721
67981
  /** Apparent power in volt-amperes. */
67722
67982
  va: number().optional().meta(readingMeta("apparent-power")),
67723
67983
  /** Power factor (0..1) if reported. */
@@ -67725,17 +67985,74 @@ var PowerMeterStatusSchema = object({
67725
67985
  /** Ms epoch when the slice was last updated. */
67726
67986
  lastFetchedAt: number()
67727
67987
  });
67988
+ /**
67989
+ * Loads that draw metered mains power (D951). The reading is a feature of the
67990
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
67991
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
67992
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
67993
+ * camera and the like are left out: their draw is not what anyone meters.
67994
+ */
67995
+ var POWER_METER_DEVICE_TYPES = [
67996
+ DeviceType.Sensor,
67997
+ DeviceType.Switch,
67998
+ DeviceType.Light,
67999
+ DeviceType.Fan,
68000
+ DeviceType.Climate,
68001
+ DeviceType.Thermostat,
68002
+ DeviceType.Humidifier,
68003
+ DeviceType.WaterHeater,
68004
+ DeviceType.MediaPlayer,
68005
+ DeviceType.Washer,
68006
+ DeviceType.Dryer,
68007
+ DeviceType.Dishwasher,
68008
+ DeviceType.Vacuum,
68009
+ DeviceType.LawnMower,
68010
+ DeviceType.PetFeeder
68011
+ ];
68012
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
68013
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
68014
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
68015
+ function powerTarget(id, unit) {
68016
+ return {
68017
+ id,
68018
+ cardinality: "scalar",
68019
+ vocabulary: {
68020
+ cap: "power-meter",
68021
+ stateField: id
68022
+ },
68023
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
68024
+ apply: "add",
68025
+ path: id,
68026
+ sources: [{
68027
+ kind: "numeric",
68028
+ requiredUnit: unit,
68029
+ transforms: [{ kind: "identity" }]
68030
+ }],
68031
+ companions: [{
68032
+ kind: "clock",
68033
+ path: "lastFetchedAt",
68034
+ when: "always"
68035
+ }],
68036
+ sourceReport: { status: "assignment-status" },
68037
+ advancedExpression: true
68038
+ };
68039
+ }
68040
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
68041
+ var powerMeterCustomize = {
68042
+ version: 1,
68043
+ targets: [
68044
+ powerTarget("watts", "W"),
68045
+ powerTarget("kwhTotal", "kWh"),
68046
+ powerTarget("volts", "V"),
68047
+ powerTarget("amps", "A")
68048
+ ]
68049
+ };
67728
68050
  var powerMeterCapability = {
67729
68051
  name: "power-meter",
67730
68052
  scope: "device",
67731
68053
  deviceNative: true,
67732
68054
  mode: "singleton",
67733
- deviceTypes: [
67734
- DeviceType.Sensor,
67735
- DeviceType.Washer,
67736
- DeviceType.Dryer,
67737
- DeviceType.Dishwasher
67738
- ],
68055
+ deviceTypes: POWER_METER_DEVICE_TYPES,
67739
68056
  methods: {},
67740
68057
  status: {
67741
68058
  schema: PowerMeterStatusSchema,
@@ -67792,7 +68109,8 @@ var powerMeterCapability = {
67792
68109
  } },
67793
68110
  /** Clock fields: written, but excluded from the compare that decides
67794
68111
  * whether persisting is worth a SQLite commit. */
67795
- volatileStateFields: ["lastFetchedAt"]
68112
+ volatileStateFields: ["lastFetchedAt"],
68113
+ customize: powerMeterCustomize
67796
68114
  };
67797
68115
  /**
67798
68116
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -71014,7 +71332,8 @@ var switchCapability = {
71014
71332
  deviceTypes: [
71015
71333
  DeviceType.Switch,
71016
71334
  DeviceType.Siren,
71017
- DeviceType.Light
71335
+ DeviceType.Light,
71336
+ DeviceType.Fan
71018
71337
  ],
71019
71338
  methods: { setState: method(object({
71020
71339
  deviceId: number(),
@@ -73227,8 +73546,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
73227
73546
  kind: "mutation",
73228
73547
  auth: "admin"
73229
73548
  });
73549
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
73230
73550
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
73231
- 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;
73551
+ 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;
73232
73552
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
73233
73553
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
73234
73554
  new Set(CAP_NAMES);
@@ -73610,6 +73930,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
73610
73930
  featureProbe: featureProbeCapability,
73611
73931
  flood: floodCapability,
73612
73932
  gas: gasCapability,
73933
+ groupActive: groupActiveCapability,
73613
73934
  groupCommands: groupCommandsCapability,
73614
73935
  groupStatus: groupStatusCapability,
73615
73936
  heatingValve: heatingValveCapability,
@@ -77621,6 +77942,13 @@ Object.freeze({
77621
77942
  access: "view",
77622
77943
  role: "viewer"
77623
77944
  },
77945
+ "groupActive.getStatus": {
77946
+ capName: "group-active",
77947
+ capScope: "device",
77948
+ addonId: null,
77949
+ access: "view",
77950
+ role: "viewer"
77951
+ },
77624
77952
  "groupCommands.getStatus": {
77625
77953
  capName: "group-commands",
77626
77954
  capScope: "device",
@@ -87496,6 +87824,10 @@ var SENSOR_CAP_VOCABULARY = {
87496
87824
  icon: "flame"
87497
87825
  }]
87498
87826
  },
87827
+ "group-active": {
87828
+ scope: "device",
87829
+ noun: t("Group state", "Stato del gruppo")
87830
+ },
87499
87831
  "group-commands": {
87500
87832
  scope: "device",
87501
87833
  noun: t("Group command", "Comando di gruppo")
@@ -89042,6 +89374,11 @@ Object.freeze({
89042
89374
  form: "single",
89043
89375
  optional: false
89044
89376
  }],
89377
+ "groupActive.getStatus": [{
89378
+ name: "deviceId",
89379
+ form: "single",
89380
+ optional: false
89381
+ }],
89045
89382
  "groupCommands.getStatus": [{
89046
89383
  name: "deviceId",
89047
89384
  form: "single",