@camstack/addon-export-google 0.1.115 → 0.1.116

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.
@@ -5516,7 +5516,7 @@ var ZodIssueCode = {
5516
5516
  var ZodFirstPartyTypeKind;
5517
5517
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5518
5518
  //#endregion
5519
- //#region ../types/dist/sleep-bykKrTgu.mjs
5519
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5520
5520
  /**
5521
5521
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5522
5522
  * window to float samples (D455).
@@ -8660,6 +8660,7 @@ var CAP_NAMES = Object.freeze([
8660
8660
  "filesystem-browse",
8661
8661
  "flood",
8662
8662
  "gas",
8663
+ "group-active",
8663
8664
  "group-commands",
8664
8665
  "group-status",
8665
8666
  "heating-valve",
@@ -8682,6 +8683,7 @@ var CAP_NAMES = Object.freeze([
8682
8683
  "login-method",
8683
8684
  "media-player",
8684
8685
  "mesh-network",
8686
+ "meter",
8685
8687
  "metrics-provider",
8686
8688
  "model-convert",
8687
8689
  "model-distributor",
@@ -9480,6 +9482,10 @@ Object.freeze({
9480
9482
  "path": "detected",
9481
9483
  "valueType": "boolean"
9482
9484
  }],
9485
+ "group-active": [{
9486
+ "path": "active",
9487
+ "valueType": "boolean"
9488
+ }],
9483
9489
  "group-status": [
9484
9490
  {
9485
9491
  "path": "included",
@@ -9739,6 +9745,10 @@ Object.freeze({
9739
9745
  ]
9740
9746
  }
9741
9747
  ],
9748
+ "meter": [{
9749
+ "path": "value",
9750
+ "valueType": "number"
9751
+ }],
9742
9752
  "motion": [
9743
9753
  {
9744
9754
  "path": "detected",
@@ -10841,7 +10851,7 @@ function errMsg(err) {
10841
10851
  return String(err);
10842
10852
  }
10843
10853
  //#endregion
10844
- //#region ../types/dist/composition-B2rw5L29.mjs
10854
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10845
10855
  /**
10846
10856
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10847
10857
  *
@@ -11156,6 +11166,13 @@ var table = {
11156
11166
  apply: () => {
11157
11167
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11158
11168
  }
11169
+ },
11170
+ schmitt: {
11171
+ minArgs: 3,
11172
+ maxArgs: 5,
11173
+ apply: () => {
11174
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11175
+ }
11159
11176
  }
11160
11177
  };
11161
11178
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11617,6 +11634,79 @@ var APPLIANCE_KINDS = [
11617
11634
  ];
11618
11635
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11619
11636
  /**
11637
+ * Statistics and integrals over a history read (D944).
11638
+ *
11639
+ * Pure: the same points always give the same answer, so a restart recomputes
11640
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11641
+ * never the mean of the samples. A hole with no held value is not integrated
11642
+ * as zero. A truncated read is not published.
11643
+ */
11644
+ var STATISTIC_STATS = [
11645
+ "min",
11646
+ "max",
11647
+ "mean",
11648
+ "sum",
11649
+ "count",
11650
+ "change"
11651
+ ];
11652
+ /**
11653
+ * The range a statistics or integral helper asks history for (D944).
11654
+ *
11655
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11656
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11657
+ * is strictly longer than the longest that range can be. Forever qualifies.
11658
+ * Equal to a tier's retention is a refusal, not a short answer.
11659
+ */
11660
+ var MINUTE_MS = 6e4;
11661
+ var HOUR_MS = 60 * MINUTE_MS;
11662
+ var DAY_MS = 24 * HOUR_MS;
11663
+ var ROLLING_SPANS = [
11664
+ "1h",
11665
+ "24h",
11666
+ "2d",
11667
+ "7d",
11668
+ "30d",
11669
+ "custom"
11670
+ ];
11671
+ var CALENDAR_PERIODS = [
11672
+ "today",
11673
+ "yesterday",
11674
+ "this-week",
11675
+ "this-month"
11676
+ ];
11677
+ var RESET_PERIODS = [
11678
+ "never",
11679
+ "daily",
11680
+ "weekly",
11681
+ "monthly"
11682
+ ];
11683
+ 5 * MINUTE_MS;
11684
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11685
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11686
+ var rollingWindowObject = object({
11687
+ kind: literal("rolling"),
11688
+ span: _enum(ROLLING_SPANS),
11689
+ customMinutes: number().int().min(5).optional()
11690
+ }).check((payload) => {
11691
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11692
+ code: "custom",
11693
+ message: "a custom range needs a duration in minutes",
11694
+ path: ["customMinutes"],
11695
+ input: payload.value
11696
+ });
11697
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11698
+ code: "custom",
11699
+ message: "only a custom range carries a duration",
11700
+ path: ["customMinutes"],
11701
+ input: payload.value
11702
+ });
11703
+ });
11704
+ var RollingWindowSchema = rollingWindowObject;
11705
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11706
+ kind: literal("calendar"),
11707
+ period: _enum(CALENDAR_PERIODS)
11708
+ })]);
11709
+ /**
11620
11710
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11621
11711
  * id. Split out so helper schemas can name it without a cycle through
11622
11712
  * `composition.ts` (D659).
@@ -11642,7 +11732,13 @@ var GROUP_TEMPLATE_IDS = [
11642
11732
  "occupancy",
11643
11733
  "binary",
11644
11734
  "switch",
11645
- "light"
11735
+ "light",
11736
+ "fan",
11737
+ "cover",
11738
+ "valve",
11739
+ "lock",
11740
+ "media-player",
11741
+ "climate"
11646
11742
  ];
11647
11743
  var NUMERIC_AGGREGATES = [
11648
11744
  "mean",
@@ -11672,22 +11768,73 @@ var HelperMemberSchema = object({
11672
11768
  cap: string().min(1),
11673
11769
  fieldPath: string().min(1)
11674
11770
  });
11675
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11676
- kind: literal("group"),
11677
- templateId: GroupTemplateIdSchema,
11678
- aggregate: AggregateReducerSchema,
11679
- members: array(HelperMemberSchema).min(1).max(64),
11680
- /** Actuator groups only. Readings leave this unset. */
11681
- active: ActiveCriterionSchema.optional()
11682
- }), object({
11683
- kind: literal("appliance"),
11684
- templateId: literal(APPLIANCE_TEMPLATE_ID),
11685
- appliance: _enum(APPLIANCE_KINDS),
11686
- thresholdWatts: number().positive(),
11687
- startDwellMs: number().int().nonnegative(),
11688
- stopDwellMs: number().int().nonnegative(),
11689
- member: HelperMemberSchema
11690
- })]);
11771
+ var HelperSpecSchema = discriminatedUnion("kind", [
11772
+ object({
11773
+ kind: literal("group"),
11774
+ templateId: GroupTemplateIdSchema,
11775
+ aggregate: AggregateReducerSchema,
11776
+ members: array(HelperMemberSchema).min(1).max(64),
11777
+ /** Actuator groups only. Readings leave this unset. */
11778
+ active: ActiveCriterionSchema.optional()
11779
+ }),
11780
+ object({
11781
+ kind: literal("appliance"),
11782
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11783
+ appliance: _enum(APPLIANCE_KINDS),
11784
+ thresholdWatts: number().positive(),
11785
+ startDwellMs: number().int().nonnegative(),
11786
+ stopDwellMs: number().int().nonnegative(),
11787
+ member: HelperMemberSchema
11788
+ }),
11789
+ object({
11790
+ kind: literal("statistic"),
11791
+ stat: _enum(STATISTIC_STATS),
11792
+ window: StatisticWindowSchema,
11793
+ source: HelperMemberSchema
11794
+ }),
11795
+ object({
11796
+ kind: literal("integral"),
11797
+ reset: _enum(RESET_PERIODS),
11798
+ output: _enum(["energy", "meter"]),
11799
+ source: HelperMemberSchema
11800
+ }),
11801
+ object({
11802
+ kind: literal("threshold"),
11803
+ source: HelperMemberSchema,
11804
+ high: number(),
11805
+ low: number(),
11806
+ onForMs: number().int().nonnegative(),
11807
+ offForMs: number().int().nonnegative()
11808
+ }),
11809
+ object({
11810
+ kind: literal("arithmetic"),
11811
+ op: _enum([
11812
+ "sum",
11813
+ "difference",
11814
+ "ratio"
11815
+ ]),
11816
+ inputs: array(HelperMemberSchema).min(2).max(64)
11817
+ }),
11818
+ object({
11819
+ kind: literal("expression"),
11820
+ expr: string().min(1),
11821
+ inputs: array(object({
11822
+ name: string().min(1),
11823
+ member: HelperMemberSchema
11824
+ })).min(1).max(64),
11825
+ output: _enum(["number", "boolean"])
11826
+ }),
11827
+ object({
11828
+ kind: literal("derivative"),
11829
+ window: RollingWindowSchema,
11830
+ per: _enum([
11831
+ "second",
11832
+ "minute",
11833
+ "hour"
11834
+ ]),
11835
+ source: HelperMemberSchema
11836
+ })
11837
+ ]);
11691
11838
  /** A composed device's stableId is this prefix plus the block id. */
11692
11839
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11693
11840
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11748,6 +11895,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11748
11895
  "all"
11749
11896
  ]),
11750
11897
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11898
+ /**
11899
+ * Set when the reads are an enum state, not a yes/no: the listed states
11900
+ * count as active (a cover is `open`). A state outside the list is inactive;
11901
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11902
+ */
11903
+ activeWhen: array(string().min(1)).min(1).optional(),
11751
11904
  /** `value` is the reading; the others are the member counts. */
11752
11905
  publish: _enum([
11753
11906
  "value",
@@ -11761,6 +11914,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11761
11914
  "omit",
11762
11915
  "offline"
11763
11916
  ])
11917
+ }),
11918
+ object({
11919
+ kind: literal("series"),
11920
+ read: CompositionFieldReadSchema,
11921
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11922
+ publish: _enum([
11923
+ "value",
11924
+ "included",
11925
+ "excluded",
11926
+ "total"
11927
+ ]),
11928
+ /**
11929
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11930
+ * device unseeded until history answers, so a restart cannot publish 0.
11931
+ */
11932
+ empty: _enum([
11933
+ "null",
11934
+ "omit",
11935
+ "offline"
11936
+ ])
11764
11937
  })
11765
11938
  ]);
11766
11939
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17063,7 +17236,22 @@ var BrokerProviderInfoSchema = object({
17063
17236
  */
17064
17237
  interactiveConnectPath: string().min(1).optional(),
17065
17238
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17066
- interactiveDisconnectPath: string().min(1).optional()
17239
+ interactiveDisconnectPath: string().min(1).optional(),
17240
+ /**
17241
+ * The kind signs in through a server-held interactive session instead of
17242
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17243
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17244
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17245
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17246
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17247
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17248
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17249
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17250
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17251
+ * offers it as the default path; the fields the session fills are
17252
+ * marked `filledBySignIn` in the kind's settings schema.
17253
+ */
17254
+ signIn: object({ basePath: string().min(1) }).optional()
17067
17255
  }))
17068
17256
  });
17069
17257
  var ListInputSchema = object({
@@ -18062,7 +18250,8 @@ var CompositionProblemSchema = object({
18062
18250
  "native-capability-replace",
18063
18251
  "mixed-quantity",
18064
18252
  "helper-mismatch",
18065
- "member-constraint"
18253
+ "member-constraint",
18254
+ "retention"
18066
18255
  ]),
18067
18256
  path: string(),
18068
18257
  message: string()
@@ -18296,13 +18485,17 @@ Object.freeze({
18296
18485
  latchedAt: {
18297
18486
  kind: "fixed",
18298
18487
  result: ["number", "null"]
18488
+ },
18489
+ schmitt: {
18490
+ kind: "fixed",
18491
+ result: ["boolean", "null"]
18299
18492
  }
18300
18493
  });
18301
18494
  /**
18302
18495
  * One catalog row per base reading a group helper can build (D944 §3).
18303
18496
  * Data, not a form default written into the block.
18304
18497
  */
18305
- var NOW = {
18498
+ var NOW$2 = {
18306
18499
  fieldPath: "lastFetchedAt",
18307
18500
  expr: "now"
18308
18501
  };
@@ -18316,6 +18509,8 @@ function numeric(input) {
18316
18509
  family: "numeric",
18317
18510
  deviceType: DeviceType.Sensor,
18318
18511
  memberDeviceType: DeviceType.Sensor,
18512
+ memberDeviceTypes: [DeviceType.Sensor],
18513
+ activeWhen: void 0,
18319
18514
  commandCaps: [],
18320
18515
  baseUnit: baseUnitOf(input.quantity),
18321
18516
  aggregates: NUMERIC_AGGREGATES,
@@ -18331,6 +18526,8 @@ function binary(input) {
18331
18526
  family: "binary",
18332
18527
  deviceType: DeviceType.Sensor,
18333
18528
  memberDeviceType: DeviceType.Sensor,
18529
+ memberDeviceTypes: [DeviceType.Sensor],
18530
+ activeWhen: void 0,
18334
18531
  commandCaps: [],
18335
18532
  quantity: "none",
18336
18533
  baseUnit: void 0,
@@ -18348,7 +18545,7 @@ var GROUP_TEMPLATES = [
18348
18545
  quantity: "temperature",
18349
18546
  defaultAggregate: "mean",
18350
18547
  empty: "null",
18351
- companions: [NOW]
18548
+ companions: [NOW$2]
18352
18549
  }),
18353
18550
  numeric({
18354
18551
  id: "humidity",
@@ -18359,7 +18556,7 @@ var GROUP_TEMPLATES = [
18359
18556
  quantity: "humidity",
18360
18557
  defaultAggregate: "mean",
18361
18558
  empty: "null",
18362
- companions: [NOW]
18559
+ companions: [NOW$2]
18363
18560
  }),
18364
18561
  numeric({
18365
18562
  id: "pressure",
@@ -18370,7 +18567,7 @@ var GROUP_TEMPLATES = [
18370
18567
  quantity: "pressure",
18371
18568
  defaultAggregate: "mean",
18372
18569
  empty: "null",
18373
- companions: [NOW]
18570
+ companions: [NOW$2]
18374
18571
  }),
18375
18572
  numeric({
18376
18573
  id: "illuminance",
@@ -18381,7 +18578,7 @@ var GROUP_TEMPLATES = [
18381
18578
  quantity: "illuminance",
18382
18579
  defaultAggregate: "mean",
18383
18580
  empty: "null",
18384
- companions: [NOW]
18581
+ companions: [NOW$2]
18385
18582
  }),
18386
18583
  numeric({
18387
18584
  id: "power",
@@ -18392,7 +18589,7 @@ var GROUP_TEMPLATES = [
18392
18589
  quantity: "power",
18393
18590
  defaultAggregate: "sum",
18394
18591
  empty: "omit",
18395
- companions: [NOW]
18592
+ companions: [NOW$2]
18396
18593
  }),
18397
18594
  numeric({
18398
18595
  id: "energy",
@@ -18403,7 +18600,7 @@ var GROUP_TEMPLATES = [
18403
18600
  quantity: "energy",
18404
18601
  defaultAggregate: "sum",
18405
18602
  empty: "omit",
18406
- companions: [NOW]
18603
+ companions: [NOW$2]
18407
18604
  }),
18408
18605
  numeric({
18409
18606
  id: "battery",
@@ -18438,7 +18635,7 @@ var GROUP_TEMPLATES = [
18438
18635
  quantity: "device",
18439
18636
  defaultAggregate: "mean",
18440
18637
  empty: "null",
18441
- companions: [NOW]
18638
+ companions: [NOW$2]
18442
18639
  }),
18443
18640
  binary({
18444
18641
  id: "motion",
@@ -18532,6 +18729,11 @@ var GROUP_TEMPLATES = [
18532
18729
  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.",
18533
18730
  deviceType: DeviceType.Switch,
18534
18731
  outputCap: "switch",
18732
+ outputField: "on",
18733
+ member: {
18734
+ cap: "switch",
18735
+ fieldPath: "on"
18736
+ },
18535
18737
  commandCaps: ["switch"]
18536
18738
  }),
18537
18739
  actuator({
@@ -18539,34 +18741,136 @@ var GROUP_TEMPLATES = [
18539
18741
  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.",
18540
18742
  deviceType: DeviceType.Light,
18541
18743
  outputCap: "switch",
18744
+ outputField: "on",
18745
+ member: {
18746
+ cap: "switch",
18747
+ fieldPath: "on"
18748
+ },
18542
18749
  commandCaps: [
18543
18750
  "switch",
18544
18751
  "brightness",
18545
18752
  "color"
18546
18753
  ]
18754
+ }),
18755
+ actuator({
18756
+ id: "fan",
18757
+ 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.",
18758
+ deviceType: DeviceType.Fan,
18759
+ outputCap: "switch",
18760
+ outputField: "on",
18761
+ member: {
18762
+ cap: "switch",
18763
+ fieldPath: "on"
18764
+ },
18765
+ commandCaps: ["switch", "fan-control"]
18766
+ }),
18767
+ actuator({
18768
+ id: "cover",
18769
+ 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.",
18770
+ deviceType: DeviceType.Cover,
18771
+ outputCap: "group-active",
18772
+ outputField: "active",
18773
+ member: {
18774
+ cap: "cover",
18775
+ fieldPath: "state"
18776
+ },
18777
+ activeWhen: [
18778
+ "open",
18779
+ "opening",
18780
+ "stopped"
18781
+ ],
18782
+ commandCaps: ["cover"]
18783
+ }),
18784
+ actuator({
18785
+ id: "valve",
18786
+ 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.",
18787
+ deviceType: DeviceType.Valve,
18788
+ outputCap: "group-active",
18789
+ outputField: "active",
18790
+ member: {
18791
+ cap: "valve",
18792
+ fieldPath: "state"
18793
+ },
18794
+ activeWhen: [
18795
+ "open",
18796
+ "opening",
18797
+ "stopped"
18798
+ ],
18799
+ commandCaps: ["valve"]
18800
+ }),
18801
+ actuator({
18802
+ id: "lock",
18803
+ 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.",
18804
+ deviceType: DeviceType.Lock,
18805
+ outputCap: "group-active",
18806
+ outputField: "active",
18807
+ member: {
18808
+ cap: "lock-control",
18809
+ fieldPath: "state"
18810
+ },
18811
+ activeWhen: ["locked"],
18812
+ commandCaps: ["lock-control"]
18813
+ }),
18814
+ actuator({
18815
+ id: "media-player",
18816
+ 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.",
18817
+ deviceType: DeviceType.MediaPlayer,
18818
+ outputCap: "group-active",
18819
+ outputField: "active",
18820
+ member: {
18821
+ cap: "media-player",
18822
+ fieldPath: "state"
18823
+ },
18824
+ activeWhen: ["playing", "buffering"],
18825
+ commandCaps: ["media-player"]
18826
+ }),
18827
+ actuator({
18828
+ id: "climate",
18829
+ 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.",
18830
+ deviceType: DeviceType.Thermostat,
18831
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18832
+ outputCap: "group-active",
18833
+ outputField: "active",
18834
+ member: {
18835
+ cap: "climate-control",
18836
+ fieldPath: "mode"
18837
+ },
18838
+ activeWhen: [
18839
+ "heat",
18840
+ "cool",
18841
+ "auto",
18842
+ "heat_cool",
18843
+ "fan_only",
18844
+ "dry"
18845
+ ],
18846
+ commandCaps: ["climate-control"]
18547
18847
  })
18548
18848
  ];
18549
18849
  function actuator(input) {
18550
18850
  return {
18551
- ...input,
18851
+ id: input.id,
18852
+ summary: input.summary,
18853
+ deviceType: input.deviceType,
18854
+ outputCap: input.outputCap,
18855
+ outputField: input.outputField,
18856
+ commandCaps: input.commandCaps,
18552
18857
  family: "actuator",
18553
18858
  role: void 0,
18554
18859
  memberDeviceType: input.deviceType,
18555
- outputField: "on",
18860
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18861
+ activeWhen: input.activeWhen,
18556
18862
  quantity: "none",
18557
18863
  baseUnit: void 0,
18558
18864
  aggregates: BINARY_AGGREGATES,
18559
18865
  defaultAggregate: "any",
18560
18866
  empty: "offline",
18561
- accept: [{
18562
- cap: "switch",
18563
- fieldPath: "on"
18564
- }],
18867
+ accept: [input.member],
18565
18868
  companions: [CHANGED]
18566
18869
  };
18567
18870
  }
18568
18871
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18569
18872
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18873
+ DeviceType.Camera;
18570
18874
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18571
18875
  /**
18572
18876
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43606,7 +43910,7 @@ var NetworkAccessStatusSchema = object({
43606
43910
  });
43607
43911
  /**
43608
43912
  * Optional, richer endpoint shape returned by providers that expose
43609
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
43913
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43610
43914
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43611
43915
  * the originating provider config (mode + sourcePort) so the
43612
43916
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46249,7 +46553,20 @@ var NcRuleInputSchema = object({
46249
46553
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46250
46554
  * path does not run Zod defaults.
46251
46555
  */
46252
- groupingSec: number().int().min(5).max(60).optional()
46556
+ groupingSec: number().int().min(5).max(60).optional(),
46557
+ /**
46558
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46559
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46560
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46561
+ * same mark the Library writes, and records whose notification it was and
46562
+ * when. A channel with no buttons gets the same two choices as links.
46563
+ *
46564
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46565
+ * cap path): absent and `false` both mean off, which is what every rule
46566
+ * authored before this field meant. An editor turns it off by writing
46567
+ * `false`, so it needs no `clear` key.
46568
+ */
46569
+ askVerdict: boolean().optional()
46253
46570
  });
46254
46571
  /**
46255
46572
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -56722,7 +57039,7 @@ var BatteryStatusSchema = object({
56722
57039
  */
56723
57040
  binary: boolean().optional().meta({ label: "Binary indicator" })
56724
57041
  });
56725
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
57042
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
56726
57043
  method(object({
56727
57044
  deviceId: number(),
56728
57045
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -58478,7 +58795,13 @@ results: array(object({
58478
58795
  /** Ms epoch of the attempt. */
58479
58796
  at: number()
58480
58797
  })) });
58481
- DeviceType.Switch, DeviceType.Light;
58798
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
58799
+ object({
58800
+ active: boolean().meta({ label: "Active" }),
58801
+ /** Ms epoch when the slice was last updated. */
58802
+ lastChangedAt: number()
58803
+ });
58804
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
58482
58805
  object({
58483
58806
  /** Members whose current value entered the aggregate. */
58484
58807
  included: number().int().nonnegative().meta(readingMeta("count", {
@@ -58496,7 +58819,7 @@ object({
58496
58819
  label: "Members"
58497
58820
  }))
58498
58821
  });
58499
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
58822
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
58500
58823
  object({
58501
58824
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
58502
58825
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -59403,7 +59726,14 @@ DeviceType.Lock, method(object({
59403
59726
  auth: "protected"
59404
59727
  }), method(object({
59405
59728
  deviceId: number().int().nonnegative(),
59406
- code: string().min(1).optional()
59729
+ code: string().min(1).optional(),
59730
+ /**
59731
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
59732
+ * with one call is refused unless the caller says it was confirmed. A
59733
+ * single lock ignores it. The refusal lives in the callee, so no
59734
+ * automation or API caller reaches the doors by skipping a dialog.
59735
+ */
59736
+ confirm: boolean().optional()
59407
59737
  }), _void(), {
59408
59738
  kind: "mutation",
59409
59739
  auth: "protected"
@@ -59411,6 +59741,11 @@ DeviceType.Lock, method(object({
59411
59741
  kind: "mutation",
59412
59742
  auth: "protected"
59413
59743
  });
59744
+ object({
59745
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
59746
+ lastFetchedAt: number()
59747
+ });
59748
+ DeviceType.Sensor;
59414
59749
  /**
59415
59750
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
59416
59751
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
@@ -61318,9 +61653,9 @@ object({
61318
61653
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
61319
61654
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
61320
61655
  /** Voltage in volts. */
61321
- volts: number().optional().meta(readingMeta("voltage")),
61656
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
61322
61657
  /** Current in amperes. */
61323
- amps: number().optional().meta(readingMeta("current")),
61658
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
61324
61659
  /** Apparent power in volt-amperes. */
61325
61660
  va: number().optional().meta(readingMeta("apparent-power")),
61326
61661
  /** Power factor (0..1) if reported. */
@@ -61328,7 +61663,23 @@ object({
61328
61663
  /** Ms epoch when the slice was last updated. */
61329
61664
  lastFetchedAt: number()
61330
61665
  });
61331
- DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
61666
+ [
61667
+ DeviceType.Sensor,
61668
+ DeviceType.Switch,
61669
+ DeviceType.Light,
61670
+ DeviceType.Fan,
61671
+ DeviceType.Climate,
61672
+ DeviceType.Thermostat,
61673
+ DeviceType.Humidifier,
61674
+ DeviceType.WaterHeater,
61675
+ DeviceType.MediaPlayer,
61676
+ DeviceType.Washer,
61677
+ DeviceType.Dryer,
61678
+ DeviceType.Dishwasher,
61679
+ DeviceType.Vacuum,
61680
+ DeviceType.LawnMower,
61681
+ DeviceType.PetFeeder
61682
+ ].filter((type) => type !== DeviceType.Sensor);
61332
61683
  /**
61333
61684
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
61334
61685
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -63821,7 +64172,7 @@ var SwitchStatusSchema = object({
63821
64172
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
63822
64173
  lastChangedAt: number()
63823
64174
  });
63824
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
64175
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
63825
64176
  deviceId: number(),
63826
64177
  on: boolean()
63827
64178
  }), _void(), {
@@ -65513,8 +65864,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
65513
65864
  kind: "mutation",
65514
65865
  auth: "admin"
65515
65866
  });
65867
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
65516
65868
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
65517
- 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;
65869
+ 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;
65518
65870
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
65519
65871
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
65520
65872
  new Set(CAP_NAMES);
@@ -68790,6 +69142,13 @@ Object.freeze({
68790
69142
  access: "view",
68791
69143
  role: "viewer"
68792
69144
  },
69145
+ "groupActive.getStatus": {
69146
+ capName: "group-active",
69147
+ capScope: "device",
69148
+ addonId: null,
69149
+ access: "view",
69150
+ role: "viewer"
69151
+ },
68793
69152
  "groupCommands.getStatus": {
68794
69153
  capName: "group-commands",
68795
69154
  capScope: "device",
@@ -69756,6 +70115,13 @@ Object.freeze({
69756
70115
  access: "create",
69757
70116
  role: "admin"
69758
70117
  },
70118
+ "meter.getStatus": {
70119
+ capName: "meter",
70120
+ capScope: "device",
70121
+ addonId: null,
70122
+ access: "view",
70123
+ role: "viewer"
70124
+ },
69759
70125
  "metricsProvider.collectSnapshot": {
69760
70126
  capName: "metrics-provider",
69761
70127
  capScope: "system",
@@ -78658,6 +79024,10 @@ var SENSOR_CAP_VOCABULARY = {
78658
79024
  icon: "flame"
78659
79025
  }]
78660
79026
  },
79027
+ "group-active": {
79028
+ scope: "device",
79029
+ noun: t("Group state", "Stato del gruppo")
79030
+ },
78661
79031
  "group-commands": {
78662
79032
  scope: "device",
78663
79033
  noun: t("Group command", "Comando di gruppo")
@@ -78714,6 +79084,17 @@ var SENSOR_CAP_VOCABULARY = {
78714
79084
  }],
78715
79085
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
78716
79086
  },
79087
+ meter: {
79088
+ scope: "device",
79089
+ noun: t("Meter", "Contatore"),
79090
+ state: [{
79091
+ kind: "numeric",
79092
+ field: "value",
79093
+ quantity: t("the total", "il totale"),
79094
+ label: t("Total", "Totale"),
79095
+ icon: "gauge"
79096
+ }]
79097
+ },
78717
79098
  "numeric-sensor": {
78718
79099
  scope: "device",
78719
79100
  noun: t("Sensor", "Sensore"),
@@ -80218,6 +80599,11 @@ Object.freeze({
80218
80599
  form: "single",
80219
80600
  optional: false
80220
80601
  }],
80602
+ "groupActive.getStatus": [{
80603
+ name: "deviceId",
80604
+ form: "single",
80605
+ optional: false
80606
+ }],
80221
80607
  "groupCommands.getStatus": [{
80222
80608
  name: "deviceId",
80223
80609
  form: "single",
@@ -80428,6 +80814,11 @@ Object.freeze({
80428
80814
  form: "single",
80429
80815
  optional: false
80430
80816
  }],
80817
+ "meter.getStatus": [{
80818
+ name: "deviceId",
80819
+ form: "single",
80820
+ optional: false
80821
+ }],
80431
80822
  "motion.getStatus": [{
80432
80823
  name: "deviceId",
80433
80824
  form: "single",
@@ -82035,7 +82426,6 @@ Object.freeze({
82035
82426
  "network-access": "ingress",
82036
82427
  "smtp-provider": "email"
82037
82428
  });
82038
- DeviceType.Camera;
82039
82429
  /**
82040
82430
  * A saved Customize assignment (D936). The schema is the type: callers use
82041
82431
  * `z.infer`, they do not restate the shape.
@@ -83344,7 +83734,7 @@ var MB = 1024 * 1024;
83344
83734
  //#endregion
83345
83735
  //#region src/custom-actions.ts
83346
83736
  /**
83347
- * Google Home export — customActions catalog.
83737
+ * Google Home Export — customActions catalog.
83348
83738
  *
83349
83739
  * One entry. The settings form's `addon-action-button` dispatches through the
83350
83740
  * generic `api.addons.custom.mutate({ addonId, action, input })` channel and
@@ -84423,7 +84813,7 @@ var DEFAULT_SETTINGS = {
84423
84813
  //#endregion
84424
84814
  //#region src/export-google.addon.ts
84425
84815
  /**
84426
- * Google Home export addon — hub-side.
84816
+ * Google Home Export addon — hub-side.
84427
84817
  *
84428
84818
  * Architecture:
84429
84819
  *