@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
@@ -5671,7 +5671,7 @@ var ZodIssueCode = {
5671
5671
  var ZodFirstPartyTypeKind;
5672
5672
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5673
5673
  //#endregion
5674
- //#region ../types/dist/sleep-0sD_LHLI.mjs
5674
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5675
5675
  /**
5676
5676
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5677
5677
  * window to float samples (D455).
@@ -9092,6 +9092,7 @@ var CAP_NAMES = Object.freeze([
9092
9092
  "filesystem-browse",
9093
9093
  "flood",
9094
9094
  "gas",
9095
+ "group-active",
9095
9096
  "group-commands",
9096
9097
  "group-status",
9097
9098
  "heating-valve",
@@ -9913,6 +9914,10 @@ Object.freeze({
9913
9914
  "path": "detected",
9914
9915
  "valueType": "boolean"
9915
9916
  }],
9917
+ "group-active": [{
9918
+ "path": "active",
9919
+ "valueType": "boolean"
9920
+ }],
9916
9921
  "group-status": [
9917
9922
  {
9918
9923
  "path": "included",
@@ -10921,7 +10926,7 @@ Object.freeze({
10921
10926
  * can answer "may a rule actuate this?" without importing the schema barrel
10922
10927
  * (~144MB RSS per runner, D28).
10923
10928
  *
10924
- * Coverage: 94 device-scoped capabilities.
10929
+ * Coverage: 95 device-scoped capabilities.
10925
10930
  */
10926
10931
  var DEVICE_SCOPED_CAPS = new Set([
10927
10932
  "accessories",
@@ -10962,6 +10967,7 @@ var DEVICE_SCOPED_CAPS = new Set([
10962
10967
  "feature-probe",
10963
10968
  "flood",
10964
10969
  "gas",
10970
+ "group-active",
10965
10971
  "group-commands",
10966
10972
  "group-status",
10967
10973
  "heating-valve",
@@ -11422,7 +11428,7 @@ function errMsg(err) {
11422
11428
  return String(err);
11423
11429
  }
11424
11430
  //#endregion
11425
- //#region ../types/dist/composition-CpETZ4HL.mjs
11431
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
11426
11432
  /**
11427
11433
  * Deterministic SHA-256 hash of an arbitrary serialisable value. The
11428
11434
  * canonical form sorts object keys alphabetically at every depth so two
@@ -11897,6 +11903,13 @@ var table = {
11897
11903
  apply: () => {
11898
11904
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11899
11905
  }
11906
+ },
11907
+ schmitt: {
11908
+ minArgs: 3,
11909
+ maxArgs: 5,
11910
+ apply: () => {
11911
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11912
+ }
11900
11913
  }
11901
11914
  };
11902
11915
  Object.freeze(Object.assign(Object.create(null), table));
@@ -12407,7 +12420,7 @@ var RESET_PERIODS = [
12407
12420
  5 * MINUTE_MS;
12408
12421
  24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
12409
12422
  7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
12410
- var StatisticWindowSchema = discriminatedUnion("kind", [object({
12423
+ var rollingWindowObject = object({
12411
12424
  kind: literal("rolling"),
12412
12425
  span: _enum(ROLLING_SPANS),
12413
12426
  customMinutes: number().int().min(5).optional()
@@ -12424,7 +12437,9 @@ var StatisticWindowSchema = discriminatedUnion("kind", [object({
12424
12437
  path: ["customMinutes"],
12425
12438
  input: payload.value
12426
12439
  });
12427
- }), object({
12440
+ });
12441
+ var RollingWindowSchema = rollingWindowObject;
12442
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
12428
12443
  kind: literal("calendar"),
12429
12444
  period: _enum(CALENDAR_PERIODS)
12430
12445
  })]);
@@ -12454,7 +12469,13 @@ var GROUP_TEMPLATE_IDS = [
12454
12469
  "occupancy",
12455
12470
  "binary",
12456
12471
  "switch",
12457
- "light"
12472
+ "light",
12473
+ "fan",
12474
+ "cover",
12475
+ "valve",
12476
+ "lock",
12477
+ "media-player",
12478
+ "climate"
12458
12479
  ];
12459
12480
  var NUMERIC_AGGREGATES = [
12460
12481
  "mean",
@@ -12513,6 +12534,42 @@ var HelperSpecSchema = discriminatedUnion("kind", [
12513
12534
  reset: _enum(RESET_PERIODS),
12514
12535
  output: _enum(["energy", "meter"]),
12515
12536
  source: HelperMemberSchema
12537
+ }),
12538
+ object({
12539
+ kind: literal("threshold"),
12540
+ source: HelperMemberSchema,
12541
+ high: number(),
12542
+ low: number(),
12543
+ onForMs: number().int().nonnegative(),
12544
+ offForMs: number().int().nonnegative()
12545
+ }),
12546
+ object({
12547
+ kind: literal("arithmetic"),
12548
+ op: _enum([
12549
+ "sum",
12550
+ "difference",
12551
+ "ratio"
12552
+ ]),
12553
+ inputs: array(HelperMemberSchema).min(2).max(64)
12554
+ }),
12555
+ object({
12556
+ kind: literal("expression"),
12557
+ expr: string().min(1),
12558
+ inputs: array(object({
12559
+ name: string().min(1),
12560
+ member: HelperMemberSchema
12561
+ })).min(1).max(64),
12562
+ output: _enum(["number", "boolean"])
12563
+ }),
12564
+ object({
12565
+ kind: literal("derivative"),
12566
+ window: RollingWindowSchema,
12567
+ per: _enum([
12568
+ "second",
12569
+ "minute",
12570
+ "hour"
12571
+ ]),
12572
+ source: HelperMemberSchema
12516
12573
  })
12517
12574
  ]);
12518
12575
  /** A composed device's stableId is this prefix plus the block id. */
@@ -12575,6 +12632,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12575
12632
  "all"
12576
12633
  ]),
12577
12634
  reads: array(CompositionFieldReadSchema).min(1).max(64),
12635
+ /**
12636
+ * Set when the reads are an enum state, not a yes/no: the listed states
12637
+ * count as active (a cover is `open`). A state outside the list is inactive;
12638
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
12639
+ */
12640
+ activeWhen: array(string().min(1)).min(1).optional(),
12578
12641
  /** `value` is the reading; the others are the member counts. */
12579
12642
  publish: _enum([
12580
12643
  "value",
@@ -18546,7 +18609,22 @@ var BrokerProviderInfoSchema = object({
18546
18609
  */
18547
18610
  interactiveConnectPath: string().min(1).optional(),
18548
18611
  /** Relative hub path to disconnect the linked account (same popup pattern). */
18549
- interactiveDisconnectPath: string().min(1).optional()
18612
+ interactiveDisconnectPath: string().min(1).optional(),
18613
+ /**
18614
+ * The kind signs in through a server-held interactive session instead of
18615
+ * (or before) typed credentials. `basePath` is a hub-relative route set
18616
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
18617
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
18618
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
18619
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
18620
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
18621
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
18622
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
18623
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
18624
+ * offers it as the default path; the fields the session fills are
18625
+ * marked `filledBySignIn` in the kind's settings schema.
18626
+ */
18627
+ signIn: object({ basePath: string().min(1) }).optional()
18550
18628
  }))
18551
18629
  });
18552
18630
  var ListInputSchema = object({
@@ -19890,13 +19968,17 @@ Object.freeze({
19890
19968
  latchedAt: {
19891
19969
  kind: "fixed",
19892
19970
  result: ["number", "null"]
19971
+ },
19972
+ schmitt: {
19973
+ kind: "fixed",
19974
+ result: ["boolean", "null"]
19893
19975
  }
19894
19976
  });
19895
19977
  /**
19896
19978
  * One catalog row per base reading a group helper can build (D944 §3).
19897
19979
  * Data, not a form default written into the block.
19898
19980
  */
19899
- var NOW$1 = {
19981
+ var NOW$2 = {
19900
19982
  fieldPath: "lastFetchedAt",
19901
19983
  expr: "now"
19902
19984
  };
@@ -19910,6 +19992,8 @@ function numeric(input) {
19910
19992
  family: "numeric",
19911
19993
  deviceType: DeviceType.Sensor,
19912
19994
  memberDeviceType: DeviceType.Sensor,
19995
+ memberDeviceTypes: [DeviceType.Sensor],
19996
+ activeWhen: void 0,
19913
19997
  commandCaps: [],
19914
19998
  baseUnit: baseUnitOf(input.quantity),
19915
19999
  aggregates: NUMERIC_AGGREGATES,
@@ -19925,6 +20009,8 @@ function binary(input) {
19925
20009
  family: "binary",
19926
20010
  deviceType: DeviceType.Sensor,
19927
20011
  memberDeviceType: DeviceType.Sensor,
20012
+ memberDeviceTypes: [DeviceType.Sensor],
20013
+ activeWhen: void 0,
19928
20014
  commandCaps: [],
19929
20015
  quantity: "none",
19930
20016
  baseUnit: void 0,
@@ -19942,7 +20028,7 @@ var GROUP_TEMPLATES = [
19942
20028
  quantity: "temperature",
19943
20029
  defaultAggregate: "mean",
19944
20030
  empty: "null",
19945
- companions: [NOW$1]
20031
+ companions: [NOW$2]
19946
20032
  }),
19947
20033
  numeric({
19948
20034
  id: "humidity",
@@ -19953,7 +20039,7 @@ var GROUP_TEMPLATES = [
19953
20039
  quantity: "humidity",
19954
20040
  defaultAggregate: "mean",
19955
20041
  empty: "null",
19956
- companions: [NOW$1]
20042
+ companions: [NOW$2]
19957
20043
  }),
19958
20044
  numeric({
19959
20045
  id: "pressure",
@@ -19964,7 +20050,7 @@ var GROUP_TEMPLATES = [
19964
20050
  quantity: "pressure",
19965
20051
  defaultAggregate: "mean",
19966
20052
  empty: "null",
19967
- companions: [NOW$1]
20053
+ companions: [NOW$2]
19968
20054
  }),
19969
20055
  numeric({
19970
20056
  id: "illuminance",
@@ -19975,7 +20061,7 @@ var GROUP_TEMPLATES = [
19975
20061
  quantity: "illuminance",
19976
20062
  defaultAggregate: "mean",
19977
20063
  empty: "null",
19978
- companions: [NOW$1]
20064
+ companions: [NOW$2]
19979
20065
  }),
19980
20066
  numeric({
19981
20067
  id: "power",
@@ -19986,7 +20072,7 @@ var GROUP_TEMPLATES = [
19986
20072
  quantity: "power",
19987
20073
  defaultAggregate: "sum",
19988
20074
  empty: "omit",
19989
- companions: [NOW$1]
20075
+ companions: [NOW$2]
19990
20076
  }),
19991
20077
  numeric({
19992
20078
  id: "energy",
@@ -19997,7 +20083,7 @@ var GROUP_TEMPLATES = [
19997
20083
  quantity: "energy",
19998
20084
  defaultAggregate: "sum",
19999
20085
  empty: "omit",
20000
- companions: [NOW$1]
20086
+ companions: [NOW$2]
20001
20087
  }),
20002
20088
  numeric({
20003
20089
  id: "battery",
@@ -20032,7 +20118,7 @@ var GROUP_TEMPLATES = [
20032
20118
  quantity: "device",
20033
20119
  defaultAggregate: "mean",
20034
20120
  empty: "null",
20035
- companions: [NOW$1]
20121
+ companions: [NOW$2]
20036
20122
  }),
20037
20123
  binary({
20038
20124
  id: "motion",
@@ -20126,6 +20212,11 @@ var GROUP_TEMPLATES = [
20126
20212
  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.",
20127
20213
  deviceType: DeviceType.Switch,
20128
20214
  outputCap: "switch",
20215
+ outputField: "on",
20216
+ member: {
20217
+ cap: "switch",
20218
+ fieldPath: "on"
20219
+ },
20129
20220
  commandCaps: ["switch"]
20130
20221
  }),
20131
20222
  actuator({
@@ -20133,29 +20224,130 @@ var GROUP_TEMPLATES = [
20133
20224
  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.",
20134
20225
  deviceType: DeviceType.Light,
20135
20226
  outputCap: "switch",
20227
+ outputField: "on",
20228
+ member: {
20229
+ cap: "switch",
20230
+ fieldPath: "on"
20231
+ },
20136
20232
  commandCaps: [
20137
20233
  "switch",
20138
20234
  "brightness",
20139
20235
  "color"
20140
20236
  ]
20237
+ }),
20238
+ actuator({
20239
+ id: "fan",
20240
+ 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.",
20241
+ deviceType: DeviceType.Fan,
20242
+ outputCap: "switch",
20243
+ outputField: "on",
20244
+ member: {
20245
+ cap: "switch",
20246
+ fieldPath: "on"
20247
+ },
20248
+ commandCaps: ["switch", "fan-control"]
20249
+ }),
20250
+ actuator({
20251
+ id: "cover",
20252
+ 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.",
20253
+ deviceType: DeviceType.Cover,
20254
+ outputCap: "group-active",
20255
+ outputField: "active",
20256
+ member: {
20257
+ cap: "cover",
20258
+ fieldPath: "state"
20259
+ },
20260
+ activeWhen: [
20261
+ "open",
20262
+ "opening",
20263
+ "stopped"
20264
+ ],
20265
+ commandCaps: ["cover"]
20266
+ }),
20267
+ actuator({
20268
+ id: "valve",
20269
+ 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.",
20270
+ deviceType: DeviceType.Valve,
20271
+ outputCap: "group-active",
20272
+ outputField: "active",
20273
+ member: {
20274
+ cap: "valve",
20275
+ fieldPath: "state"
20276
+ },
20277
+ activeWhen: [
20278
+ "open",
20279
+ "opening",
20280
+ "stopped"
20281
+ ],
20282
+ commandCaps: ["valve"]
20283
+ }),
20284
+ actuator({
20285
+ id: "lock",
20286
+ 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.",
20287
+ deviceType: DeviceType.Lock,
20288
+ outputCap: "group-active",
20289
+ outputField: "active",
20290
+ member: {
20291
+ cap: "lock-control",
20292
+ fieldPath: "state"
20293
+ },
20294
+ activeWhen: ["locked"],
20295
+ commandCaps: ["lock-control"]
20296
+ }),
20297
+ actuator({
20298
+ id: "media-player",
20299
+ 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.",
20300
+ deviceType: DeviceType.MediaPlayer,
20301
+ outputCap: "group-active",
20302
+ outputField: "active",
20303
+ member: {
20304
+ cap: "media-player",
20305
+ fieldPath: "state"
20306
+ },
20307
+ activeWhen: ["playing", "buffering"],
20308
+ commandCaps: ["media-player"]
20309
+ }),
20310
+ actuator({
20311
+ id: "climate",
20312
+ 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.",
20313
+ deviceType: DeviceType.Thermostat,
20314
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
20315
+ outputCap: "group-active",
20316
+ outputField: "active",
20317
+ member: {
20318
+ cap: "climate-control",
20319
+ fieldPath: "mode"
20320
+ },
20321
+ activeWhen: [
20322
+ "heat",
20323
+ "cool",
20324
+ "auto",
20325
+ "heat_cool",
20326
+ "fan_only",
20327
+ "dry"
20328
+ ],
20329
+ commandCaps: ["climate-control"]
20141
20330
  })
20142
20331
  ];
20143
20332
  function actuator(input) {
20144
20333
  return {
20145
- ...input,
20334
+ id: input.id,
20335
+ summary: input.summary,
20336
+ deviceType: input.deviceType,
20337
+ outputCap: input.outputCap,
20338
+ outputField: input.outputField,
20339
+ commandCaps: input.commandCaps,
20146
20340
  family: "actuator",
20147
20341
  role: void 0,
20148
20342
  memberDeviceType: input.deviceType,
20149
- outputField: "on",
20343
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
20344
+ activeWhen: input.activeWhen,
20150
20345
  quantity: "none",
20151
20346
  baseUnit: void 0,
20152
20347
  aggregates: BINARY_AGGREGATES,
20153
20348
  defaultAggregate: "any",
20154
20349
  empty: "offline",
20155
- accept: [{
20156
- cap: "switch",
20157
- fieldPath: "on"
20158
- }],
20350
+ accept: [input.member],
20159
20351
  companions: [CHANGED]
20160
20352
  };
20161
20353
  }
@@ -45491,7 +45683,7 @@ var NetworkAccessStatusSchema = object({
45491
45683
  });
45492
45684
  /**
45493
45685
  * Optional, richer endpoint shape returned by providers that expose
45494
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
45686
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
45495
45687
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
45496
45688
  * the originating provider config (mode + sourcePort) so the
45497
45689
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -60795,7 +60987,8 @@ var BATTERY_DEVICE_TYPES = [
60795
60987
  DeviceType.Switch,
60796
60988
  DeviceType.PetFeeder,
60797
60989
  DeviceType.Container,
60798
- DeviceType.Thermostat
60990
+ DeviceType.Thermostat,
60991
+ DeviceType.EventEmitter
60799
60992
  ];
60800
60993
  /** Generic Customize target for the percentage reading (D936). */
60801
60994
  var batteryCustomize = {
@@ -63758,7 +63951,17 @@ var groupCommandsCapability = {
63758
63951
  scope: "device",
63759
63952
  deviceNative: true,
63760
63953
  mode: "singleton",
63761
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
63954
+ deviceTypes: [
63955
+ DeviceType.Switch,
63956
+ DeviceType.Light,
63957
+ DeviceType.Fan,
63958
+ DeviceType.Cover,
63959
+ DeviceType.Valve,
63960
+ DeviceType.Lock,
63961
+ DeviceType.MediaPlayer,
63962
+ DeviceType.Thermostat,
63963
+ DeviceType.Climate
63964
+ ],
63762
63965
  methods: {},
63763
63966
  status: {
63764
63967
  schema: GroupCommandsSchema,
@@ -63776,6 +63979,49 @@ var groupCommandsCapability = {
63776
63979
  history: "none"
63777
63980
  };
63778
63981
  /**
63982
+ * Whether a helper actuator group counts as active (D944): at least one
63983
+ * included member is, or every included member is. What "active" means is the
63984
+ * type's: a cover is open, a lock is locked, a media player is playing, a
63985
+ * climate device is not off. A group of lights, switches and fans reports
63986
+ * `switch.on` instead; this cap is for the types whose own state is not a
63987
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
63988
+ * empty included set takes the device offline, never `active: false`.
63989
+ */
63990
+ var GroupActiveSchema = object({
63991
+ active: boolean().meta({ label: "Active" }),
63992
+ /** Ms epoch when the slice was last updated. */
63993
+ lastChangedAt: number()
63994
+ });
63995
+ var groupActiveCapability = {
63996
+ name: "group-active",
63997
+ scope: "device",
63998
+ deviceNative: true,
63999
+ mode: "singleton",
64000
+ deviceTypes: [
64001
+ DeviceType.Cover,
64002
+ DeviceType.Valve,
64003
+ DeviceType.Lock,
64004
+ DeviceType.MediaPlayer,
64005
+ DeviceType.Climate,
64006
+ DeviceType.Thermostat
64007
+ ],
64008
+ methods: {},
64009
+ status: {
64010
+ schema: GroupActiveSchema,
64011
+ kind: "push"
64012
+ },
64013
+ runtimeState: GroupActiveSchema,
64014
+ /**
64015
+ * Runtime-state durability: **session** — recomputed from the members on the
64016
+ * next source event; a restored value would outlive the members it named.
64017
+ *
64018
+ * See `RuntimeStateDurability`. Enforced by
64019
+ * `scripts/check-runtime-state-durability.ts`.
64020
+ */
64021
+ durability: "session",
64022
+ history: "none"
64023
+ };
64024
+ /**
63779
64025
  * How many members of a helper group answered (D944). Counts are integers,
63780
64026
  * not measurements: zero included is a real count, never a stand-in reading.
63781
64027
  * The reading itself stays on the output capability. History is none — the
@@ -63806,7 +64052,14 @@ var groupStatusCapability = {
63806
64052
  deviceTypes: [
63807
64053
  DeviceType.Sensor,
63808
64054
  DeviceType.Switch,
63809
- DeviceType.Light
64055
+ DeviceType.Light,
64056
+ DeviceType.Fan,
64057
+ DeviceType.Cover,
64058
+ DeviceType.Valve,
64059
+ DeviceType.Lock,
64060
+ DeviceType.MediaPlayer,
64061
+ DeviceType.Thermostat,
64062
+ DeviceType.Climate
63810
64063
  ],
63811
64064
  methods: {},
63812
64065
  status: {
@@ -65100,7 +65353,14 @@ var lockControlCapability = {
65100
65353
  }),
65101
65354
  unlock: method(object({
65102
65355
  deviceId: number().int().nonnegative(),
65103
- code: string().min(1).optional()
65356
+ code: string().min(1).optional(),
65357
+ /**
65358
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
65359
+ * with one call is refused unless the caller says it was confirmed. A
65360
+ * single lock ignores it. The refusal lives in the callee, so no
65361
+ * automation or API caller reaches the doors by skipping a dialog.
65362
+ */
65363
+ confirm: boolean().optional()
65104
65364
  }), _void(), {
65105
65365
  kind: "mutation",
65106
65366
  auth: "protected"
@@ -67746,9 +68006,9 @@ var PowerMeterStatusSchema = object({
67746
68006
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
67747
68007
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
67748
68008
  /** Voltage in volts. */
67749
- volts: number().optional().meta(readingMeta("voltage")),
68009
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
67750
68010
  /** Current in amperes. */
67751
- amps: number().optional().meta(readingMeta("current")),
68011
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
67752
68012
  /** Apparent power in volt-amperes. */
67753
68013
  va: number().optional().meta(readingMeta("apparent-power")),
67754
68014
  /** Power factor (0..1) if reported. */
@@ -67756,17 +68016,74 @@ var PowerMeterStatusSchema = object({
67756
68016
  /** Ms epoch when the slice was last updated. */
67757
68017
  lastFetchedAt: number()
67758
68018
  });
68019
+ /**
68020
+ * Loads that draw metered mains power (D951). The reading is a feature of the
68021
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
68022
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
68023
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
68024
+ * camera and the like are left out: their draw is not what anyone meters.
68025
+ */
68026
+ var POWER_METER_DEVICE_TYPES = [
68027
+ DeviceType.Sensor,
68028
+ DeviceType.Switch,
68029
+ DeviceType.Light,
68030
+ DeviceType.Fan,
68031
+ DeviceType.Climate,
68032
+ DeviceType.Thermostat,
68033
+ DeviceType.Humidifier,
68034
+ DeviceType.WaterHeater,
68035
+ DeviceType.MediaPlayer,
68036
+ DeviceType.Washer,
68037
+ DeviceType.Dryer,
68038
+ DeviceType.Dishwasher,
68039
+ DeviceType.Vacuum,
68040
+ DeviceType.LawnMower,
68041
+ DeviceType.PetFeeder
68042
+ ];
68043
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
68044
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
68045
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
68046
+ function powerTarget(id, unit) {
68047
+ return {
68048
+ id,
68049
+ cardinality: "scalar",
68050
+ vocabulary: {
68051
+ cap: "power-meter",
68052
+ stateField: id
68053
+ },
68054
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
68055
+ apply: "add",
68056
+ path: id,
68057
+ sources: [{
68058
+ kind: "numeric",
68059
+ requiredUnit: unit,
68060
+ transforms: [{ kind: "identity" }]
68061
+ }],
68062
+ companions: [{
68063
+ kind: "clock",
68064
+ path: "lastFetchedAt",
68065
+ when: "always"
68066
+ }],
68067
+ sourceReport: { status: "assignment-status" },
68068
+ advancedExpression: true
68069
+ };
68070
+ }
68071
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
68072
+ var powerMeterCustomize = {
68073
+ version: 1,
68074
+ targets: [
68075
+ powerTarget("watts", "W"),
68076
+ powerTarget("kwhTotal", "kWh"),
68077
+ powerTarget("volts", "V"),
68078
+ powerTarget("amps", "A")
68079
+ ]
68080
+ };
67759
68081
  var powerMeterCapability = {
67760
68082
  name: "power-meter",
67761
68083
  scope: "device",
67762
68084
  deviceNative: true,
67763
68085
  mode: "singleton",
67764
- deviceTypes: [
67765
- DeviceType.Sensor,
67766
- DeviceType.Washer,
67767
- DeviceType.Dryer,
67768
- DeviceType.Dishwasher
67769
- ],
68086
+ deviceTypes: POWER_METER_DEVICE_TYPES,
67770
68087
  methods: {},
67771
68088
  status: {
67772
68089
  schema: PowerMeterStatusSchema,
@@ -67823,7 +68140,8 @@ var powerMeterCapability = {
67823
68140
  } },
67824
68141
  /** Clock fields: written, but excluded from the compare that decides
67825
68142
  * whether persisting is worth a SQLite commit. */
67826
- volatileStateFields: ["lastFetchedAt"]
68143
+ volatileStateFields: ["lastFetchedAt"],
68144
+ customize: powerMeterCustomize
67827
68145
  };
67828
68146
  /**
67829
68147
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -71045,7 +71363,8 @@ var switchCapability = {
71045
71363
  deviceTypes: [
71046
71364
  DeviceType.Switch,
71047
71365
  DeviceType.Siren,
71048
- DeviceType.Light
71366
+ DeviceType.Light,
71367
+ DeviceType.Fan
71049
71368
  ],
71050
71369
  methods: { setState: method(object({
71051
71370
  deviceId: number(),
@@ -73258,8 +73577,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
73258
73577
  kind: "mutation",
73259
73578
  auth: "admin"
73260
73579
  });
73580
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
73261
73581
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
73262
- 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;
73582
+ 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;
73263
73583
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
73264
73584
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
73265
73585
  new Set(CAP_NAMES);
@@ -73641,6 +73961,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
73641
73961
  featureProbe: featureProbeCapability,
73642
73962
  flood: floodCapability,
73643
73963
  gas: gasCapability,
73964
+ groupActive: groupActiveCapability,
73644
73965
  groupCommands: groupCommandsCapability,
73645
73966
  groupStatus: groupStatusCapability,
73646
73967
  heatingValve: heatingValveCapability,
@@ -77652,6 +77973,13 @@ Object.freeze({
77652
77973
  access: "view",
77653
77974
  role: "viewer"
77654
77975
  },
77976
+ "groupActive.getStatus": {
77977
+ capName: "group-active",
77978
+ capScope: "device",
77979
+ addonId: null,
77980
+ access: "view",
77981
+ role: "viewer"
77982
+ },
77655
77983
  "groupCommands.getStatus": {
77656
77984
  capName: "group-commands",
77657
77985
  capScope: "device",
@@ -87527,6 +87855,10 @@ var SENSOR_CAP_VOCABULARY = {
87527
87855
  icon: "flame"
87528
87856
  }]
87529
87857
  },
87858
+ "group-active": {
87859
+ scope: "device",
87860
+ noun: t("Group state", "Stato del gruppo")
87861
+ },
87530
87862
  "group-commands": {
87531
87863
  scope: "device",
87532
87864
  noun: t("Group command", "Comando di gruppo")
@@ -89073,6 +89405,11 @@ Object.freeze({
89073
89405
  form: "single",
89074
89406
  optional: false
89075
89407
  }],
89408
+ "groupActive.getStatus": [{
89409
+ name: "deviceId",
89410
+ form: "single",
89411
+ optional: false
89412
+ }],
89076
89413
  "groupCommands.getStatus": [{
89077
89414
  name: "deviceId",
89078
89415
  form: "single",