@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.
@@ -5520,7 +5520,7 @@ var ZodIssueCode = {
5520
5520
  var ZodFirstPartyTypeKind;
5521
5521
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5522
5522
  //#endregion
5523
- //#region ../types/dist/sleep-bykKrTgu.mjs
5523
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5524
5524
  /**
5525
5525
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5526
5526
  * window to float samples (D455).
@@ -8664,6 +8664,7 @@ var CAP_NAMES = Object.freeze([
8664
8664
  "filesystem-browse",
8665
8665
  "flood",
8666
8666
  "gas",
8667
+ "group-active",
8667
8668
  "group-commands",
8668
8669
  "group-status",
8669
8670
  "heating-valve",
@@ -8686,6 +8687,7 @@ var CAP_NAMES = Object.freeze([
8686
8687
  "login-method",
8687
8688
  "media-player",
8688
8689
  "mesh-network",
8690
+ "meter",
8689
8691
  "metrics-provider",
8690
8692
  "model-convert",
8691
8693
  "model-distributor",
@@ -9484,6 +9486,10 @@ Object.freeze({
9484
9486
  "path": "detected",
9485
9487
  "valueType": "boolean"
9486
9488
  }],
9489
+ "group-active": [{
9490
+ "path": "active",
9491
+ "valueType": "boolean"
9492
+ }],
9487
9493
  "group-status": [
9488
9494
  {
9489
9495
  "path": "included",
@@ -9743,6 +9749,10 @@ Object.freeze({
9743
9749
  ]
9744
9750
  }
9745
9751
  ],
9752
+ "meter": [{
9753
+ "path": "value",
9754
+ "valueType": "number"
9755
+ }],
9746
9756
  "motion": [
9747
9757
  {
9748
9758
  "path": "detected",
@@ -10845,7 +10855,7 @@ function errMsg(err) {
10845
10855
  return String(err);
10846
10856
  }
10847
10857
  //#endregion
10848
- //#region ../types/dist/composition-B2rw5L29.mjs
10858
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10849
10859
  /**
10850
10860
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10851
10861
  *
@@ -11160,6 +11170,13 @@ var table = {
11160
11170
  apply: () => {
11161
11171
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11162
11172
  }
11173
+ },
11174
+ schmitt: {
11175
+ minArgs: 3,
11176
+ maxArgs: 5,
11177
+ apply: () => {
11178
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11179
+ }
11163
11180
  }
11164
11181
  };
11165
11182
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11621,6 +11638,79 @@ var APPLIANCE_KINDS = [
11621
11638
  ];
11622
11639
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11623
11640
  /**
11641
+ * Statistics and integrals over a history read (D944).
11642
+ *
11643
+ * Pure: the same points always give the same answer, so a restart recomputes
11644
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11645
+ * never the mean of the samples. A hole with no held value is not integrated
11646
+ * as zero. A truncated read is not published.
11647
+ */
11648
+ var STATISTIC_STATS = [
11649
+ "min",
11650
+ "max",
11651
+ "mean",
11652
+ "sum",
11653
+ "count",
11654
+ "change"
11655
+ ];
11656
+ /**
11657
+ * The range a statistics or integral helper asks history for (D944).
11658
+ *
11659
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11660
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11661
+ * is strictly longer than the longest that range can be. Forever qualifies.
11662
+ * Equal to a tier's retention is a refusal, not a short answer.
11663
+ */
11664
+ var MINUTE_MS = 6e4;
11665
+ var HOUR_MS = 60 * MINUTE_MS;
11666
+ var DAY_MS = 24 * HOUR_MS;
11667
+ var ROLLING_SPANS = [
11668
+ "1h",
11669
+ "24h",
11670
+ "2d",
11671
+ "7d",
11672
+ "30d",
11673
+ "custom"
11674
+ ];
11675
+ var CALENDAR_PERIODS = [
11676
+ "today",
11677
+ "yesterday",
11678
+ "this-week",
11679
+ "this-month"
11680
+ ];
11681
+ var RESET_PERIODS = [
11682
+ "never",
11683
+ "daily",
11684
+ "weekly",
11685
+ "monthly"
11686
+ ];
11687
+ 5 * MINUTE_MS;
11688
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11689
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11690
+ var rollingWindowObject = object({
11691
+ kind: literal("rolling"),
11692
+ span: _enum(ROLLING_SPANS),
11693
+ customMinutes: number().int().min(5).optional()
11694
+ }).check((payload) => {
11695
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11696
+ code: "custom",
11697
+ message: "a custom range needs a duration in minutes",
11698
+ path: ["customMinutes"],
11699
+ input: payload.value
11700
+ });
11701
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11702
+ code: "custom",
11703
+ message: "only a custom range carries a duration",
11704
+ path: ["customMinutes"],
11705
+ input: payload.value
11706
+ });
11707
+ });
11708
+ var RollingWindowSchema = rollingWindowObject;
11709
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11710
+ kind: literal("calendar"),
11711
+ period: _enum(CALENDAR_PERIODS)
11712
+ })]);
11713
+ /**
11624
11714
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11625
11715
  * id. Split out so helper schemas can name it without a cycle through
11626
11716
  * `composition.ts` (D659).
@@ -11646,7 +11736,13 @@ var GROUP_TEMPLATE_IDS = [
11646
11736
  "occupancy",
11647
11737
  "binary",
11648
11738
  "switch",
11649
- "light"
11739
+ "light",
11740
+ "fan",
11741
+ "cover",
11742
+ "valve",
11743
+ "lock",
11744
+ "media-player",
11745
+ "climate"
11650
11746
  ];
11651
11747
  var NUMERIC_AGGREGATES = [
11652
11748
  "mean",
@@ -11676,22 +11772,73 @@ var HelperMemberSchema = object({
11676
11772
  cap: string().min(1),
11677
11773
  fieldPath: string().min(1)
11678
11774
  });
11679
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11680
- kind: literal("group"),
11681
- templateId: GroupTemplateIdSchema,
11682
- aggregate: AggregateReducerSchema,
11683
- members: array(HelperMemberSchema).min(1).max(64),
11684
- /** Actuator groups only. Readings leave this unset. */
11685
- active: ActiveCriterionSchema.optional()
11686
- }), object({
11687
- kind: literal("appliance"),
11688
- templateId: literal(APPLIANCE_TEMPLATE_ID),
11689
- appliance: _enum(APPLIANCE_KINDS),
11690
- thresholdWatts: number().positive(),
11691
- startDwellMs: number().int().nonnegative(),
11692
- stopDwellMs: number().int().nonnegative(),
11693
- member: HelperMemberSchema
11694
- })]);
11775
+ var HelperSpecSchema = discriminatedUnion("kind", [
11776
+ object({
11777
+ kind: literal("group"),
11778
+ templateId: GroupTemplateIdSchema,
11779
+ aggregate: AggregateReducerSchema,
11780
+ members: array(HelperMemberSchema).min(1).max(64),
11781
+ /** Actuator groups only. Readings leave this unset. */
11782
+ active: ActiveCriterionSchema.optional()
11783
+ }),
11784
+ object({
11785
+ kind: literal("appliance"),
11786
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11787
+ appliance: _enum(APPLIANCE_KINDS),
11788
+ thresholdWatts: number().positive(),
11789
+ startDwellMs: number().int().nonnegative(),
11790
+ stopDwellMs: number().int().nonnegative(),
11791
+ member: HelperMemberSchema
11792
+ }),
11793
+ object({
11794
+ kind: literal("statistic"),
11795
+ stat: _enum(STATISTIC_STATS),
11796
+ window: StatisticWindowSchema,
11797
+ source: HelperMemberSchema
11798
+ }),
11799
+ object({
11800
+ kind: literal("integral"),
11801
+ reset: _enum(RESET_PERIODS),
11802
+ output: _enum(["energy", "meter"]),
11803
+ source: HelperMemberSchema
11804
+ }),
11805
+ object({
11806
+ kind: literal("threshold"),
11807
+ source: HelperMemberSchema,
11808
+ high: number(),
11809
+ low: number(),
11810
+ onForMs: number().int().nonnegative(),
11811
+ offForMs: number().int().nonnegative()
11812
+ }),
11813
+ object({
11814
+ kind: literal("arithmetic"),
11815
+ op: _enum([
11816
+ "sum",
11817
+ "difference",
11818
+ "ratio"
11819
+ ]),
11820
+ inputs: array(HelperMemberSchema).min(2).max(64)
11821
+ }),
11822
+ object({
11823
+ kind: literal("expression"),
11824
+ expr: string().min(1),
11825
+ inputs: array(object({
11826
+ name: string().min(1),
11827
+ member: HelperMemberSchema
11828
+ })).min(1).max(64),
11829
+ output: _enum(["number", "boolean"])
11830
+ }),
11831
+ object({
11832
+ kind: literal("derivative"),
11833
+ window: RollingWindowSchema,
11834
+ per: _enum([
11835
+ "second",
11836
+ "minute",
11837
+ "hour"
11838
+ ]),
11839
+ source: HelperMemberSchema
11840
+ })
11841
+ ]);
11695
11842
  /** A composed device's stableId is this prefix plus the block id. */
11696
11843
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11697
11844
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11752,6 +11899,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11752
11899
  "all"
11753
11900
  ]),
11754
11901
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11902
+ /**
11903
+ * Set when the reads are an enum state, not a yes/no: the listed states
11904
+ * count as active (a cover is `open`). A state outside the list is inactive;
11905
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11906
+ */
11907
+ activeWhen: array(string().min(1)).min(1).optional(),
11755
11908
  /** `value` is the reading; the others are the member counts. */
11756
11909
  publish: _enum([
11757
11910
  "value",
@@ -11765,6 +11918,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11765
11918
  "omit",
11766
11919
  "offline"
11767
11920
  ])
11921
+ }),
11922
+ object({
11923
+ kind: literal("series"),
11924
+ read: CompositionFieldReadSchema,
11925
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11926
+ publish: _enum([
11927
+ "value",
11928
+ "included",
11929
+ "excluded",
11930
+ "total"
11931
+ ]),
11932
+ /**
11933
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11934
+ * device unseeded until history answers, so a restart cannot publish 0.
11935
+ */
11936
+ empty: _enum([
11937
+ "null",
11938
+ "omit",
11939
+ "offline"
11940
+ ])
11768
11941
  })
11769
11942
  ]);
11770
11943
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17067,7 +17240,22 @@ var BrokerProviderInfoSchema = object({
17067
17240
  */
17068
17241
  interactiveConnectPath: string().min(1).optional(),
17069
17242
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17070
- interactiveDisconnectPath: string().min(1).optional()
17243
+ interactiveDisconnectPath: string().min(1).optional(),
17244
+ /**
17245
+ * The kind signs in through a server-held interactive session instead of
17246
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17247
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17248
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17249
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17250
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17251
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17252
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17253
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17254
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17255
+ * offers it as the default path; the fields the session fills are
17256
+ * marked `filledBySignIn` in the kind's settings schema.
17257
+ */
17258
+ signIn: object({ basePath: string().min(1) }).optional()
17071
17259
  }))
17072
17260
  });
17073
17261
  var ListInputSchema = object({
@@ -18066,7 +18254,8 @@ var CompositionProblemSchema = object({
18066
18254
  "native-capability-replace",
18067
18255
  "mixed-quantity",
18068
18256
  "helper-mismatch",
18069
- "member-constraint"
18257
+ "member-constraint",
18258
+ "retention"
18070
18259
  ]),
18071
18260
  path: string(),
18072
18261
  message: string()
@@ -18300,13 +18489,17 @@ Object.freeze({
18300
18489
  latchedAt: {
18301
18490
  kind: "fixed",
18302
18491
  result: ["number", "null"]
18492
+ },
18493
+ schmitt: {
18494
+ kind: "fixed",
18495
+ result: ["boolean", "null"]
18303
18496
  }
18304
18497
  });
18305
18498
  /**
18306
18499
  * One catalog row per base reading a group helper can build (D944 §3).
18307
18500
  * Data, not a form default written into the block.
18308
18501
  */
18309
- var NOW = {
18502
+ var NOW$2 = {
18310
18503
  fieldPath: "lastFetchedAt",
18311
18504
  expr: "now"
18312
18505
  };
@@ -18320,6 +18513,8 @@ function numeric(input) {
18320
18513
  family: "numeric",
18321
18514
  deviceType: DeviceType.Sensor,
18322
18515
  memberDeviceType: DeviceType.Sensor,
18516
+ memberDeviceTypes: [DeviceType.Sensor],
18517
+ activeWhen: void 0,
18323
18518
  commandCaps: [],
18324
18519
  baseUnit: baseUnitOf(input.quantity),
18325
18520
  aggregates: NUMERIC_AGGREGATES,
@@ -18335,6 +18530,8 @@ function binary(input) {
18335
18530
  family: "binary",
18336
18531
  deviceType: DeviceType.Sensor,
18337
18532
  memberDeviceType: DeviceType.Sensor,
18533
+ memberDeviceTypes: [DeviceType.Sensor],
18534
+ activeWhen: void 0,
18338
18535
  commandCaps: [],
18339
18536
  quantity: "none",
18340
18537
  baseUnit: void 0,
@@ -18352,7 +18549,7 @@ var GROUP_TEMPLATES = [
18352
18549
  quantity: "temperature",
18353
18550
  defaultAggregate: "mean",
18354
18551
  empty: "null",
18355
- companions: [NOW]
18552
+ companions: [NOW$2]
18356
18553
  }),
18357
18554
  numeric({
18358
18555
  id: "humidity",
@@ -18363,7 +18560,7 @@ var GROUP_TEMPLATES = [
18363
18560
  quantity: "humidity",
18364
18561
  defaultAggregate: "mean",
18365
18562
  empty: "null",
18366
- companions: [NOW]
18563
+ companions: [NOW$2]
18367
18564
  }),
18368
18565
  numeric({
18369
18566
  id: "pressure",
@@ -18374,7 +18571,7 @@ var GROUP_TEMPLATES = [
18374
18571
  quantity: "pressure",
18375
18572
  defaultAggregate: "mean",
18376
18573
  empty: "null",
18377
- companions: [NOW]
18574
+ companions: [NOW$2]
18378
18575
  }),
18379
18576
  numeric({
18380
18577
  id: "illuminance",
@@ -18385,7 +18582,7 @@ var GROUP_TEMPLATES = [
18385
18582
  quantity: "illuminance",
18386
18583
  defaultAggregate: "mean",
18387
18584
  empty: "null",
18388
- companions: [NOW]
18585
+ companions: [NOW$2]
18389
18586
  }),
18390
18587
  numeric({
18391
18588
  id: "power",
@@ -18396,7 +18593,7 @@ var GROUP_TEMPLATES = [
18396
18593
  quantity: "power",
18397
18594
  defaultAggregate: "sum",
18398
18595
  empty: "omit",
18399
- companions: [NOW]
18596
+ companions: [NOW$2]
18400
18597
  }),
18401
18598
  numeric({
18402
18599
  id: "energy",
@@ -18407,7 +18604,7 @@ var GROUP_TEMPLATES = [
18407
18604
  quantity: "energy",
18408
18605
  defaultAggregate: "sum",
18409
18606
  empty: "omit",
18410
- companions: [NOW]
18607
+ companions: [NOW$2]
18411
18608
  }),
18412
18609
  numeric({
18413
18610
  id: "battery",
@@ -18442,7 +18639,7 @@ var GROUP_TEMPLATES = [
18442
18639
  quantity: "device",
18443
18640
  defaultAggregate: "mean",
18444
18641
  empty: "null",
18445
- companions: [NOW]
18642
+ companions: [NOW$2]
18446
18643
  }),
18447
18644
  binary({
18448
18645
  id: "motion",
@@ -18536,6 +18733,11 @@ var GROUP_TEMPLATES = [
18536
18733
  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.",
18537
18734
  deviceType: DeviceType.Switch,
18538
18735
  outputCap: "switch",
18736
+ outputField: "on",
18737
+ member: {
18738
+ cap: "switch",
18739
+ fieldPath: "on"
18740
+ },
18539
18741
  commandCaps: ["switch"]
18540
18742
  }),
18541
18743
  actuator({
@@ -18543,34 +18745,136 @@ var GROUP_TEMPLATES = [
18543
18745
  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.",
18544
18746
  deviceType: DeviceType.Light,
18545
18747
  outputCap: "switch",
18748
+ outputField: "on",
18749
+ member: {
18750
+ cap: "switch",
18751
+ fieldPath: "on"
18752
+ },
18546
18753
  commandCaps: [
18547
18754
  "switch",
18548
18755
  "brightness",
18549
18756
  "color"
18550
18757
  ]
18758
+ }),
18759
+ actuator({
18760
+ id: "fan",
18761
+ 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.",
18762
+ deviceType: DeviceType.Fan,
18763
+ outputCap: "switch",
18764
+ outputField: "on",
18765
+ member: {
18766
+ cap: "switch",
18767
+ fieldPath: "on"
18768
+ },
18769
+ commandCaps: ["switch", "fan-control"]
18770
+ }),
18771
+ actuator({
18772
+ id: "cover",
18773
+ 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.",
18774
+ deviceType: DeviceType.Cover,
18775
+ outputCap: "group-active",
18776
+ outputField: "active",
18777
+ member: {
18778
+ cap: "cover",
18779
+ fieldPath: "state"
18780
+ },
18781
+ activeWhen: [
18782
+ "open",
18783
+ "opening",
18784
+ "stopped"
18785
+ ],
18786
+ commandCaps: ["cover"]
18787
+ }),
18788
+ actuator({
18789
+ id: "valve",
18790
+ 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.",
18791
+ deviceType: DeviceType.Valve,
18792
+ outputCap: "group-active",
18793
+ outputField: "active",
18794
+ member: {
18795
+ cap: "valve",
18796
+ fieldPath: "state"
18797
+ },
18798
+ activeWhen: [
18799
+ "open",
18800
+ "opening",
18801
+ "stopped"
18802
+ ],
18803
+ commandCaps: ["valve"]
18804
+ }),
18805
+ actuator({
18806
+ id: "lock",
18807
+ 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.",
18808
+ deviceType: DeviceType.Lock,
18809
+ outputCap: "group-active",
18810
+ outputField: "active",
18811
+ member: {
18812
+ cap: "lock-control",
18813
+ fieldPath: "state"
18814
+ },
18815
+ activeWhen: ["locked"],
18816
+ commandCaps: ["lock-control"]
18817
+ }),
18818
+ actuator({
18819
+ id: "media-player",
18820
+ 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.",
18821
+ deviceType: DeviceType.MediaPlayer,
18822
+ outputCap: "group-active",
18823
+ outputField: "active",
18824
+ member: {
18825
+ cap: "media-player",
18826
+ fieldPath: "state"
18827
+ },
18828
+ activeWhen: ["playing", "buffering"],
18829
+ commandCaps: ["media-player"]
18830
+ }),
18831
+ actuator({
18832
+ id: "climate",
18833
+ 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.",
18834
+ deviceType: DeviceType.Thermostat,
18835
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18836
+ outputCap: "group-active",
18837
+ outputField: "active",
18838
+ member: {
18839
+ cap: "climate-control",
18840
+ fieldPath: "mode"
18841
+ },
18842
+ activeWhen: [
18843
+ "heat",
18844
+ "cool",
18845
+ "auto",
18846
+ "heat_cool",
18847
+ "fan_only",
18848
+ "dry"
18849
+ ],
18850
+ commandCaps: ["climate-control"]
18551
18851
  })
18552
18852
  ];
18553
18853
  function actuator(input) {
18554
18854
  return {
18555
- ...input,
18855
+ id: input.id,
18856
+ summary: input.summary,
18857
+ deviceType: input.deviceType,
18858
+ outputCap: input.outputCap,
18859
+ outputField: input.outputField,
18860
+ commandCaps: input.commandCaps,
18556
18861
  family: "actuator",
18557
18862
  role: void 0,
18558
18863
  memberDeviceType: input.deviceType,
18559
- outputField: "on",
18864
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18865
+ activeWhen: input.activeWhen,
18560
18866
  quantity: "none",
18561
18867
  baseUnit: void 0,
18562
18868
  aggregates: BINARY_AGGREGATES,
18563
18869
  defaultAggregate: "any",
18564
18870
  empty: "offline",
18565
- accept: [{
18566
- cap: "switch",
18567
- fieldPath: "on"
18568
- }],
18871
+ accept: [input.member],
18569
18872
  companions: [CHANGED]
18570
18873
  };
18571
18874
  }
18572
18875
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18573
18876
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18877
+ DeviceType.Camera;
18574
18878
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18575
18879
  /**
18576
18880
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43610,7 +43914,7 @@ var NetworkAccessStatusSchema = object({
43610
43914
  });
43611
43915
  /**
43612
43916
  * Optional, richer endpoint shape returned by providers that expose
43613
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
43917
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43614
43918
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43615
43919
  * the originating provider config (mode + sourcePort) so the
43616
43920
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46253,7 +46557,20 @@ var NcRuleInputSchema = object({
46253
46557
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46254
46558
  * path does not run Zod defaults.
46255
46559
  */
46256
- groupingSec: number().int().min(5).max(60).optional()
46560
+ groupingSec: number().int().min(5).max(60).optional(),
46561
+ /**
46562
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46563
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46564
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46565
+ * same mark the Library writes, and records whose notification it was and
46566
+ * when. A channel with no buttons gets the same two choices as links.
46567
+ *
46568
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46569
+ * cap path): absent and `false` both mean off, which is what every rule
46570
+ * authored before this field meant. An editor turns it off by writing
46571
+ * `false`, so it needs no `clear` key.
46572
+ */
46573
+ askVerdict: boolean().optional()
46257
46574
  });
46258
46575
  /**
46259
46576
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -56726,7 +57043,7 @@ var BatteryStatusSchema = object({
56726
57043
  */
56727
57044
  binary: boolean().optional().meta({ label: "Binary indicator" })
56728
57045
  });
56729
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
57046
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
56730
57047
  method(object({
56731
57048
  deviceId: number(),
56732
57049
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -58482,7 +58799,13 @@ results: array(object({
58482
58799
  /** Ms epoch of the attempt. */
58483
58800
  at: number()
58484
58801
  })) });
58485
- DeviceType.Switch, DeviceType.Light;
58802
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
58803
+ object({
58804
+ active: boolean().meta({ label: "Active" }),
58805
+ /** Ms epoch when the slice was last updated. */
58806
+ lastChangedAt: number()
58807
+ });
58808
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
58486
58809
  object({
58487
58810
  /** Members whose current value entered the aggregate. */
58488
58811
  included: number().int().nonnegative().meta(readingMeta("count", {
@@ -58500,7 +58823,7 @@ object({
58500
58823
  label: "Members"
58501
58824
  }))
58502
58825
  });
58503
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
58826
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
58504
58827
  object({
58505
58828
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
58506
58829
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -59407,7 +59730,14 @@ DeviceType.Lock, method(object({
59407
59730
  auth: "protected"
59408
59731
  }), method(object({
59409
59732
  deviceId: number().int().nonnegative(),
59410
- code: string().min(1).optional()
59733
+ code: string().min(1).optional(),
59734
+ /**
59735
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
59736
+ * with one call is refused unless the caller says it was confirmed. A
59737
+ * single lock ignores it. The refusal lives in the callee, so no
59738
+ * automation or API caller reaches the doors by skipping a dialog.
59739
+ */
59740
+ confirm: boolean().optional()
59411
59741
  }), _void(), {
59412
59742
  kind: "mutation",
59413
59743
  auth: "protected"
@@ -59415,6 +59745,11 @@ DeviceType.Lock, method(object({
59415
59745
  kind: "mutation",
59416
59746
  auth: "protected"
59417
59747
  });
59748
+ object({
59749
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
59750
+ lastFetchedAt: number()
59751
+ });
59752
+ DeviceType.Sensor;
59418
59753
  /**
59419
59754
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
59420
59755
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
@@ -61322,9 +61657,9 @@ object({
61322
61657
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
61323
61658
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
61324
61659
  /** Voltage in volts. */
61325
- volts: number().optional().meta(readingMeta("voltage")),
61660
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
61326
61661
  /** Current in amperes. */
61327
- amps: number().optional().meta(readingMeta("current")),
61662
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
61328
61663
  /** Apparent power in volt-amperes. */
61329
61664
  va: number().optional().meta(readingMeta("apparent-power")),
61330
61665
  /** Power factor (0..1) if reported. */
@@ -61332,7 +61667,23 @@ object({
61332
61667
  /** Ms epoch when the slice was last updated. */
61333
61668
  lastFetchedAt: number()
61334
61669
  });
61335
- DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
61670
+ [
61671
+ DeviceType.Sensor,
61672
+ DeviceType.Switch,
61673
+ DeviceType.Light,
61674
+ DeviceType.Fan,
61675
+ DeviceType.Climate,
61676
+ DeviceType.Thermostat,
61677
+ DeviceType.Humidifier,
61678
+ DeviceType.WaterHeater,
61679
+ DeviceType.MediaPlayer,
61680
+ DeviceType.Washer,
61681
+ DeviceType.Dryer,
61682
+ DeviceType.Dishwasher,
61683
+ DeviceType.Vacuum,
61684
+ DeviceType.LawnMower,
61685
+ DeviceType.PetFeeder
61686
+ ].filter((type) => type !== DeviceType.Sensor);
61336
61687
  /**
61337
61688
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
61338
61689
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -63825,7 +64176,7 @@ var SwitchStatusSchema = object({
63825
64176
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
63826
64177
  lastChangedAt: number()
63827
64178
  });
63828
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
64179
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
63829
64180
  deviceId: number(),
63830
64181
  on: boolean()
63831
64182
  }), _void(), {
@@ -65517,8 +65868,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
65517
65868
  kind: "mutation",
65518
65869
  auth: "admin"
65519
65870
  });
65871
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
65520
65872
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
65521
- 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;
65873
+ 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;
65522
65874
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
65523
65875
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
65524
65876
  new Set(CAP_NAMES);
@@ -68794,6 +69146,13 @@ Object.freeze({
68794
69146
  access: "view",
68795
69147
  role: "viewer"
68796
69148
  },
69149
+ "groupActive.getStatus": {
69150
+ capName: "group-active",
69151
+ capScope: "device",
69152
+ addonId: null,
69153
+ access: "view",
69154
+ role: "viewer"
69155
+ },
68797
69156
  "groupCommands.getStatus": {
68798
69157
  capName: "group-commands",
68799
69158
  capScope: "device",
@@ -69760,6 +70119,13 @@ Object.freeze({
69760
70119
  access: "create",
69761
70120
  role: "admin"
69762
70121
  },
70122
+ "meter.getStatus": {
70123
+ capName: "meter",
70124
+ capScope: "device",
70125
+ addonId: null,
70126
+ access: "view",
70127
+ role: "viewer"
70128
+ },
69763
70129
  "metricsProvider.collectSnapshot": {
69764
70130
  capName: "metrics-provider",
69765
70131
  capScope: "system",
@@ -78662,6 +79028,10 @@ var SENSOR_CAP_VOCABULARY = {
78662
79028
  icon: "flame"
78663
79029
  }]
78664
79030
  },
79031
+ "group-active": {
79032
+ scope: "device",
79033
+ noun: t("Group state", "Stato del gruppo")
79034
+ },
78665
79035
  "group-commands": {
78666
79036
  scope: "device",
78667
79037
  noun: t("Group command", "Comando di gruppo")
@@ -78718,6 +79088,17 @@ var SENSOR_CAP_VOCABULARY = {
78718
79088
  }],
78719
79089
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
78720
79090
  },
79091
+ meter: {
79092
+ scope: "device",
79093
+ noun: t("Meter", "Contatore"),
79094
+ state: [{
79095
+ kind: "numeric",
79096
+ field: "value",
79097
+ quantity: t("the total", "il totale"),
79098
+ label: t("Total", "Totale"),
79099
+ icon: "gauge"
79100
+ }]
79101
+ },
78721
79102
  "numeric-sensor": {
78722
79103
  scope: "device",
78723
79104
  noun: t("Sensor", "Sensore"),
@@ -80222,6 +80603,11 @@ Object.freeze({
80222
80603
  form: "single",
80223
80604
  optional: false
80224
80605
  }],
80606
+ "groupActive.getStatus": [{
80607
+ name: "deviceId",
80608
+ form: "single",
80609
+ optional: false
80610
+ }],
80225
80611
  "groupCommands.getStatus": [{
80226
80612
  name: "deviceId",
80227
80613
  form: "single",
@@ -80432,6 +80818,11 @@ Object.freeze({
80432
80818
  form: "single",
80433
80819
  optional: false
80434
80820
  }],
80821
+ "meter.getStatus": [{
80822
+ name: "deviceId",
80823
+ form: "single",
80824
+ optional: false
80825
+ }],
80435
80826
  "motion.getStatus": [{
80436
80827
  name: "deviceId",
80437
80828
  form: "single",
@@ -82039,7 +82430,6 @@ Object.freeze({
82039
82430
  "network-access": "ingress",
82040
82431
  "smtp-provider": "email"
82041
82432
  });
82042
- DeviceType.Camera;
82043
82433
  /**
82044
82434
  * A saved Customize assignment (D936). The schema is the type: callers use
82045
82435
  * `z.infer`, they do not restate the shape.
@@ -83348,7 +83738,7 @@ var MB = 1024 * 1024;
83348
83738
  //#endregion
83349
83739
  //#region src/custom-actions.ts
83350
83740
  /**
83351
- * Google Home export — customActions catalog.
83741
+ * Google Home Export — customActions catalog.
83352
83742
  *
83353
83743
  * One entry. The settings form's `addon-action-button` dispatches through the
83354
83744
  * generic `api.addons.custom.mutate({ addonId, action, input })` channel and
@@ -84427,7 +84817,7 @@ var DEFAULT_SETTINGS = {
84427
84817
  //#endregion
84428
84818
  //#region src/export-google.addon.ts
84429
84819
  /**
84430
- * Google Home export addon — hub-side.
84820
+ * Google Home Export addon — hub-side.
84431
84821
  *
84432
84822
  * Architecture:
84433
84823
  *