@camstack/addon-provider-unraid 0.2.148 → 0.2.150

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.
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region ../types/dist/event-category-DHXxB8t9.mjs
2
+ //#region ../types/dist/event-category-CT-hz5Rb.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -325,6 +325,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
325
325
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
326
326
  EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
327
327
  /**
328
+ * A camera's package LLM confirm has failed closed three times in a row
329
+ * (D931, 2026-10-26). One edge per camera until
330
+ * {@link PipelinePackageLlmAnswered}.
331
+ */
332
+ EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
333
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
334
+ EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
335
+ /**
328
336
  * Per-camera pipeline config was mutated by the orchestrator
329
337
  * (a settings change via `setAgentInferenceDevices` /
330
338
  * `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
@@ -5434,7 +5442,7 @@ var ZodIssueCode = {
5434
5442
  var ZodFirstPartyTypeKind;
5435
5443
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5436
5444
  //#endregion
5437
- //#region ../types/dist/sleep-CARd6wZF.mjs
5445
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5438
5446
  /**
5439
5447
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5440
5448
  * window to float samples (D455).
@@ -8027,6 +8035,53 @@ var READING_QUANTITIES = [
8027
8035
  ];
8028
8036
  var ReadingQuantitySchema = _enum(READING_QUANTITIES);
8029
8037
  new Set(READING_QUANTITIES);
8038
+ /**
8039
+ * Stored unit symbol for a quantity. `none` means the number is dimensionless
8040
+ * (or an index / ratio / count). `device` means the cap has no single unit.
8041
+ */
8042
+ var QUANTITY_BASE = {
8043
+ temperature: "°C",
8044
+ pressure: "hPa",
8045
+ speed: "m/s",
8046
+ precipitation: "mm",
8047
+ "precipitation-rate": "mm/h",
8048
+ length: "m",
8049
+ area: "m²",
8050
+ illuminance: "lx",
8051
+ irradiance: "W/m²",
8052
+ power: "W",
8053
+ energy: "kWh",
8054
+ voltage: "V",
8055
+ current: "A",
8056
+ "apparent-power": "VA",
8057
+ humidity: "%",
8058
+ percentage: "%",
8059
+ "concentration-volume": "ppm",
8060
+ "concentration-mass": "µg/m³",
8061
+ "concentration-ppb": "ppb",
8062
+ volume: "L",
8063
+ duration: "s",
8064
+ "duration-ms": "ms",
8065
+ information: "B",
8066
+ "sound-level": "dBFS",
8067
+ "signal-level": "dBm",
8068
+ "colour-temperature": "mired",
8069
+ angle: "°",
8070
+ bitrate: "kbps",
8071
+ rate: "fps",
8072
+ mass: "kg",
8073
+ index: "none",
8074
+ ratio: "none",
8075
+ count: "none",
8076
+ none: "none",
8077
+ device: "device"
8078
+ };
8079
+ /** The stored unit, or `undefined` when the quantity has no unit symbol. */
8080
+ function baseUnitOf(quantity) {
8081
+ const symbol = QUANTITY_BASE[quantity];
8082
+ if (symbol === "none" || symbol === "device") return void 0;
8083
+ return symbol;
8084
+ }
8030
8085
  function readingMeta(quantity, extras) {
8031
8086
  return {
8032
8087
  quantity,
@@ -8580,6 +8635,9 @@ var CAP_NAMES = Object.freeze([
8580
8635
  "filesystem-browse",
8581
8636
  "flood",
8582
8637
  "gas",
8638
+ "group-active",
8639
+ "group-commands",
8640
+ "group-status",
8583
8641
  "heating-valve",
8584
8642
  "humidifier",
8585
8643
  "humidity-sensor",
@@ -8600,6 +8658,7 @@ var CAP_NAMES = Object.freeze([
8600
8658
  "login-method",
8601
8659
  "media-player",
8602
8660
  "mesh-network",
8661
+ "meter",
8603
8662
  "metrics-provider",
8604
8663
  "model-convert",
8605
8664
  "model-distributor",
@@ -9398,6 +9457,24 @@ Object.freeze({
9398
9457
  "path": "detected",
9399
9458
  "valueType": "boolean"
9400
9459
  }],
9460
+ "group-active": [{
9461
+ "path": "active",
9462
+ "valueType": "boolean"
9463
+ }],
9464
+ "group-status": [
9465
+ {
9466
+ "path": "included",
9467
+ "valueType": "number"
9468
+ },
9469
+ {
9470
+ "path": "excluded",
9471
+ "valueType": "number"
9472
+ },
9473
+ {
9474
+ "path": "total",
9475
+ "valueType": "number"
9476
+ }
9477
+ ],
9401
9478
  "heating-valve": [{
9402
9479
  "path": "position",
9403
9480
  "valueType": "number"
@@ -9643,6 +9720,10 @@ Object.freeze({
9643
9720
  ]
9644
9721
  }
9645
9722
  ],
9723
+ "meter": [{
9724
+ "path": "value",
9725
+ "valueType": "number"
9726
+ }],
9646
9727
  "motion": [
9647
9728
  {
9648
9729
  "path": "detected",
@@ -10400,7 +10481,7 @@ function userError(code, params, englishFallback) {
10400
10481
  return new CamstackError(code, params, englishFallback);
10401
10482
  }
10402
10483
  //#endregion
10403
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10484
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10404
10485
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10405
10486
  DeviceType["Camera"] = "camera";
10406
10487
  DeviceType["Hub"] = "hub";
@@ -10494,8 +10575,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10494
10575
  DeviceType["PetFeeder"] = "pet-feeder";
10495
10576
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10496
10577
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10497
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10578
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10579
+ * A plug-built dishwasher carries running-state and power instead. */
10498
10580
  DeviceType["Dishwasher"] = "dishwasher";
10581
+ /** Washing machine. A plug-built one is running while its power stays
10582
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10583
+ DeviceType["Washer"] = "washer";
10584
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10585
+ DeviceType["Dryer"] = "dryer";
10499
10586
  return DeviceType;
10500
10587
  }({});
10501
10588
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10753,7 +10840,7 @@ function errMsg(err) {
10753
10840
  return String(err);
10754
10841
  }
10755
10842
  //#endregion
10756
- //#region ../types/dist/composition-kEl9mevu.mjs
10843
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10757
10844
  /**
10758
10845
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10759
10846
  *
@@ -11068,6 +11155,13 @@ var table = {
11068
11155
  apply: () => {
11069
11156
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11070
11157
  }
11158
+ },
11159
+ schmitt: {
11160
+ minArgs: 3,
11161
+ maxArgs: 5,
11162
+ apply: () => {
11163
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11164
+ }
11071
11165
  }
11072
11166
  };
11073
11167
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11508,15 +11602,232 @@ function validateExpressionSource(src) {
11508
11602
  }
11509
11603
  return null;
11510
11604
  }
11511
- /** A composed device's stableId is this prefix plus the block id. */
11512
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11513
- /** Longest snippet a `code` source may carry (slice 4). */
11514
- var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11605
+ /**
11606
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11607
+ *
11608
+ * Standby of the control board is under 5 W; a motor or a heater is far
11609
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11610
+ * a cycle, so running starts only after 30 s above the line.
11611
+ *
11612
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11613
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11614
+ * report "finished" in the middle of the program, so the stop dwell is
11615
+ * 10 minutes on every type. The number is stored per type so one machine
11616
+ * can move later without moving the others.
11617
+ */
11618
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11619
+ var APPLIANCE_KINDS = [
11620
+ "washer",
11621
+ "dryer",
11622
+ "dishwasher"
11623
+ ];
11624
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11625
+ /**
11626
+ * Statistics and integrals over a history read (D944).
11627
+ *
11628
+ * Pure: the same points always give the same answer, so a restart recomputes
11629
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11630
+ * never the mean of the samples. A hole with no held value is not integrated
11631
+ * as zero. A truncated read is not published.
11632
+ */
11633
+ var STATISTIC_STATS = [
11634
+ "min",
11635
+ "max",
11636
+ "mean",
11637
+ "sum",
11638
+ "count",
11639
+ "change"
11640
+ ];
11641
+ /**
11642
+ * The range a statistics or integral helper asks history for (D944).
11643
+ *
11644
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11645
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11646
+ * is strictly longer than the longest that range can be. Forever qualifies.
11647
+ * Equal to a tier's retention is a refusal, not a short answer.
11648
+ */
11649
+ var MINUTE_MS = 6e4;
11650
+ var HOUR_MS = 60 * MINUTE_MS;
11651
+ var DAY_MS = 24 * HOUR_MS;
11652
+ var ROLLING_SPANS = [
11653
+ "1h",
11654
+ "24h",
11655
+ "2d",
11656
+ "7d",
11657
+ "30d",
11658
+ "custom"
11659
+ ];
11660
+ var CALENDAR_PERIODS = [
11661
+ "today",
11662
+ "yesterday",
11663
+ "this-week",
11664
+ "this-month"
11665
+ ];
11666
+ var RESET_PERIODS = [
11667
+ "never",
11668
+ "daily",
11669
+ "weekly",
11670
+ "monthly"
11671
+ ];
11672
+ 5 * MINUTE_MS;
11673
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11674
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11675
+ var rollingWindowObject = object({
11676
+ kind: literal("rolling"),
11677
+ span: _enum(ROLLING_SPANS),
11678
+ customMinutes: number().int().min(5).optional()
11679
+ }).check((payload) => {
11680
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11681
+ code: "custom",
11682
+ message: "a custom range needs a duration in minutes",
11683
+ path: ["customMinutes"],
11684
+ input: payload.value
11685
+ });
11686
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11687
+ code: "custom",
11688
+ message: "only a custom range carries a duration",
11689
+ path: ["customMinutes"],
11690
+ input: payload.value
11691
+ });
11692
+ });
11693
+ var RollingWindowSchema = rollingWindowObject;
11694
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11695
+ kind: literal("calendar"),
11696
+ period: _enum(CALENDAR_PERIODS)
11697
+ })]);
11698
+ /**
11699
+ * A composition source identity: `(addonId, stableId)`, never a numeric device
11700
+ * id. Split out so helper schemas can name it without a cycle through
11701
+ * `composition.ts` (D659).
11702
+ */
11515
11703
  var CompositionSourceRefSchema = object({
11516
11704
  /** The owning addon; `stableId` is unique only within it. */
11517
11705
  addonId: string().min(1),
11518
11706
  stableId: string().min(1)
11519
11707
  });
11708
+ var GROUP_TEMPLATE_IDS = [
11709
+ "temperature",
11710
+ "humidity",
11711
+ "pressure",
11712
+ "illuminance",
11713
+ "power",
11714
+ "energy",
11715
+ "battery",
11716
+ "numeric",
11717
+ "motion",
11718
+ "contact",
11719
+ "leak",
11720
+ "smoke",
11721
+ "occupancy",
11722
+ "binary",
11723
+ "switch",
11724
+ "light",
11725
+ "fan",
11726
+ "cover",
11727
+ "valve",
11728
+ "lock",
11729
+ "media-player",
11730
+ "climate"
11731
+ ];
11732
+ var NUMERIC_AGGREGATES = [
11733
+ "mean",
11734
+ "median",
11735
+ "min",
11736
+ "max",
11737
+ "sum"
11738
+ ];
11739
+ var BINARY_AGGREGATES = ["any", "all"];
11740
+ /** How an actuator group decides it is on. Unknown members never count as off. */
11741
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
11742
+ var AGGREGATE_REDUCERS = [
11743
+ "mean",
11744
+ "median",
11745
+ "min",
11746
+ "max",
11747
+ "sum",
11748
+ "any",
11749
+ "all"
11750
+ ];
11751
+ var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
11752
+ var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
11753
+ var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
11754
+ /** One member. The field is stored so occupancy can name motion or binary. */
11755
+ var HelperMemberSchema = object({
11756
+ source: CompositionSourceRefSchema,
11757
+ cap: string().min(1),
11758
+ fieldPath: string().min(1)
11759
+ });
11760
+ var HelperSpecSchema = discriminatedUnion("kind", [
11761
+ object({
11762
+ kind: literal("group"),
11763
+ templateId: GroupTemplateIdSchema,
11764
+ aggregate: AggregateReducerSchema,
11765
+ members: array(HelperMemberSchema).min(1).max(64),
11766
+ /** Actuator groups only. Readings leave this unset. */
11767
+ active: ActiveCriterionSchema.optional()
11768
+ }),
11769
+ object({
11770
+ kind: literal("appliance"),
11771
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11772
+ appliance: _enum(APPLIANCE_KINDS),
11773
+ thresholdWatts: number().positive(),
11774
+ startDwellMs: number().int().nonnegative(),
11775
+ stopDwellMs: number().int().nonnegative(),
11776
+ member: HelperMemberSchema
11777
+ }),
11778
+ object({
11779
+ kind: literal("statistic"),
11780
+ stat: _enum(STATISTIC_STATS),
11781
+ window: StatisticWindowSchema,
11782
+ source: HelperMemberSchema
11783
+ }),
11784
+ object({
11785
+ kind: literal("integral"),
11786
+ reset: _enum(RESET_PERIODS),
11787
+ output: _enum(["energy", "meter"]),
11788
+ source: HelperMemberSchema
11789
+ }),
11790
+ object({
11791
+ kind: literal("threshold"),
11792
+ source: HelperMemberSchema,
11793
+ high: number(),
11794
+ low: number(),
11795
+ onForMs: number().int().nonnegative(),
11796
+ offForMs: number().int().nonnegative()
11797
+ }),
11798
+ object({
11799
+ kind: literal("arithmetic"),
11800
+ op: _enum([
11801
+ "sum",
11802
+ "difference",
11803
+ "ratio"
11804
+ ]),
11805
+ inputs: array(HelperMemberSchema).min(2).max(64)
11806
+ }),
11807
+ object({
11808
+ kind: literal("expression"),
11809
+ expr: string().min(1),
11810
+ inputs: array(object({
11811
+ name: string().min(1),
11812
+ member: HelperMemberSchema
11813
+ })).min(1).max(64),
11814
+ output: _enum(["number", "boolean"])
11815
+ }),
11816
+ object({
11817
+ kind: literal("derivative"),
11818
+ window: RollingWindowSchema,
11819
+ per: _enum([
11820
+ "second",
11821
+ "minute",
11822
+ "hour"
11823
+ ]),
11824
+ source: HelperMemberSchema
11825
+ })
11826
+ ]);
11827
+ /** A composed device's stableId is this prefix plus the block id. */
11828
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11829
+ /** Longest snippet a `code` source may carry (slice 4). */
11830
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11520
11831
  /** One field of one capability of one source device. */
11521
11832
  var CompositionFieldReadSchema = object({
11522
11833
  source: CompositionSourceRefSchema,
@@ -11560,7 +11871,59 @@ var CompositionCodeSourceSchema = object({
11560
11871
  var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11561
11872
  CompositionFromSourceSchema,
11562
11873
  CompositionExpressionSourceSchema,
11563
- CompositionCodeSourceSchema
11874
+ CompositionCodeSourceSchema,
11875
+ object({
11876
+ kind: literal("aggregate"),
11877
+ reducer: _enum([
11878
+ "mean",
11879
+ "median",
11880
+ "min",
11881
+ "max",
11882
+ "sum",
11883
+ "any",
11884
+ "all"
11885
+ ]),
11886
+ reads: array(CompositionFieldReadSchema).min(1).max(64),
11887
+ /**
11888
+ * Set when the reads are an enum state, not a yes/no: the listed states
11889
+ * count as active (a cover is `open`). A state outside the list is inactive;
11890
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11891
+ */
11892
+ activeWhen: array(string().min(1)).min(1).optional(),
11893
+ /** `value` is the reading; the others are the member counts. */
11894
+ publish: _enum([
11895
+ "value",
11896
+ "included",
11897
+ "excluded",
11898
+ "total"
11899
+ ]),
11900
+ /** What a `value` publish does when nobody is included. Counts ignore this. */
11901
+ empty: _enum([
11902
+ "null",
11903
+ "omit",
11904
+ "offline"
11905
+ ])
11906
+ }),
11907
+ object({
11908
+ kind: literal("series"),
11909
+ read: CompositionFieldReadSchema,
11910
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11911
+ publish: _enum([
11912
+ "value",
11913
+ "included",
11914
+ "excluded",
11915
+ "total"
11916
+ ]),
11917
+ /**
11918
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11919
+ * device unseeded until history answers, so a restart cannot publish 0.
11920
+ */
11921
+ empty: _enum([
11922
+ "null",
11923
+ "omit",
11924
+ "offline"
11925
+ ])
11926
+ })
11564
11927
  ]);
11565
11928
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
11566
11929
  kind: literal("forward"),
@@ -11606,7 +11969,13 @@ var CompositionSchema = object({
11606
11969
  kind: literal("existing"),
11607
11970
  device: CompositionSourceRefSchema
11608
11971
  })]),
11609
- features: array(CompositionFeatureSchema).min(1).max(16)
11972
+ features: array(CompositionFeatureSchema).min(1).max(16),
11973
+ /**
11974
+ * Present when the block is a helper template. Absent on a free
11975
+ * composition (the room example, device 4603). The editor reads this,
11976
+ * never the compiled features.
11977
+ */
11978
+ helper: HelperSpecSchema.optional()
11610
11979
  }).superRefine((composition, ctx) => {
11611
11980
  const seen = /* @__PURE__ */ new Set();
11612
11981
  composition.features.forEach((feature, index) => {
@@ -16713,7 +17082,22 @@ var BrokerProviderInfoSchema = object({
16713
17082
  */
16714
17083
  interactiveConnectPath: string().min(1).optional(),
16715
17084
  /** Relative hub path to disconnect the linked account (same popup pattern). */
16716
- interactiveDisconnectPath: string().min(1).optional()
17085
+ interactiveDisconnectPath: string().min(1).optional(),
17086
+ /**
17087
+ * The kind signs in through a server-held interactive session instead of
17088
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17089
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17090
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17091
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17092
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17093
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17094
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17095
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17096
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17097
+ * offers it as the default path; the fields the session fills are
17098
+ * marked `filledBySignIn` in the kind's settings schema.
17099
+ */
17100
+ signIn: object({ basePath: string().min(1) }).optional()
16717
17101
  }))
16718
17102
  });
16719
17103
  var ListInputSchema = object({
@@ -17815,7 +18199,11 @@ var CompositionProblemSchema = object({
17815
18199
  "target-missing",
17816
18200
  "target-unreadable",
17817
18201
  "not-replaceable",
17818
- "native-capability-replace"
18202
+ "native-capability-replace",
18203
+ "mixed-quantity",
18204
+ "helper-mismatch",
18205
+ "member-constraint",
18206
+ "retention"
17819
18207
  ]),
17820
18208
  path: string(),
17821
18209
  message: string()
@@ -17836,7 +18224,8 @@ var CompositionUnavailableModeSchema = _enum([
17836
18224
  "null",
17837
18225
  "offline",
17838
18226
  "unknown",
17839
- "release"
18227
+ "release",
18228
+ "omit"
17840
18229
  ]);
17841
18230
  /**
17842
18231
  * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
@@ -18048,8 +18437,392 @@ Object.freeze({
18048
18437
  latchedAt: {
18049
18438
  kind: "fixed",
18050
18439
  result: ["number", "null"]
18440
+ },
18441
+ schmitt: {
18442
+ kind: "fixed",
18443
+ result: ["boolean", "null"]
18051
18444
  }
18052
18445
  });
18446
+ /**
18447
+ * One catalog row per base reading a group helper can build (D944 §3).
18448
+ * Data, not a form default written into the block.
18449
+ */
18450
+ var NOW$2 = {
18451
+ fieldPath: "lastFetchedAt",
18452
+ expr: "now"
18453
+ };
18454
+ var CHANGED = {
18455
+ fieldPath: "lastChangedAt",
18456
+ expr: "now"
18457
+ };
18458
+ function numeric(input) {
18459
+ return {
18460
+ ...input,
18461
+ family: "numeric",
18462
+ deviceType: DeviceType.Sensor,
18463
+ memberDeviceType: DeviceType.Sensor,
18464
+ memberDeviceTypes: [DeviceType.Sensor],
18465
+ activeWhen: void 0,
18466
+ commandCaps: [],
18467
+ baseUnit: baseUnitOf(input.quantity),
18468
+ aggregates: NUMERIC_AGGREGATES,
18469
+ accept: [{
18470
+ cap: input.outputCap,
18471
+ fieldPath: input.outputField
18472
+ }]
18473
+ };
18474
+ }
18475
+ function binary(input) {
18476
+ return {
18477
+ ...input,
18478
+ family: "binary",
18479
+ deviceType: DeviceType.Sensor,
18480
+ memberDeviceType: DeviceType.Sensor,
18481
+ memberDeviceTypes: [DeviceType.Sensor],
18482
+ activeWhen: void 0,
18483
+ commandCaps: [],
18484
+ quantity: "none",
18485
+ baseUnit: void 0,
18486
+ aggregates: BINARY_AGGREGATES,
18487
+ empty: "offline"
18488
+ };
18489
+ }
18490
+ var GROUP_TEMPLATES = [
18491
+ numeric({
18492
+ id: "temperature",
18493
+ summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
18494
+ role: DeviceRole.TemperatureSensor,
18495
+ outputCap: "temperature-sensor",
18496
+ outputField: "celsius",
18497
+ quantity: "temperature",
18498
+ defaultAggregate: "mean",
18499
+ empty: "null",
18500
+ companions: [NOW$2]
18501
+ }),
18502
+ numeric({
18503
+ id: "humidity",
18504
+ summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
18505
+ role: DeviceRole.HumiditySensor,
18506
+ outputCap: "humidity-sensor",
18507
+ outputField: "percent",
18508
+ quantity: "humidity",
18509
+ defaultAggregate: "mean",
18510
+ empty: "null",
18511
+ companions: [NOW$2]
18512
+ }),
18513
+ numeric({
18514
+ id: "pressure",
18515
+ summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
18516
+ role: DeviceRole.PressureSensor,
18517
+ outputCap: "pressure-sensor",
18518
+ outputField: "hpa",
18519
+ quantity: "pressure",
18520
+ defaultAggregate: "mean",
18521
+ empty: "null",
18522
+ companions: [NOW$2]
18523
+ }),
18524
+ numeric({
18525
+ id: "illuminance",
18526
+ summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
18527
+ role: DeviceRole.AmbientLightSensor,
18528
+ outputCap: "ambient-light-sensor",
18529
+ outputField: "lux",
18530
+ quantity: "illuminance",
18531
+ defaultAggregate: "mean",
18532
+ empty: "null",
18533
+ companions: [NOW$2]
18534
+ }),
18535
+ numeric({
18536
+ id: "power",
18537
+ summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
18538
+ role: DeviceRole.PowerSensor,
18539
+ outputCap: "power-meter",
18540
+ outputField: "watts",
18541
+ quantity: "power",
18542
+ defaultAggregate: "sum",
18543
+ empty: "omit",
18544
+ companions: [NOW$2]
18545
+ }),
18546
+ numeric({
18547
+ id: "energy",
18548
+ summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
18549
+ role: DeviceRole.EnergySensor,
18550
+ outputCap: "power-meter",
18551
+ outputField: "kwhTotal",
18552
+ quantity: "energy",
18553
+ defaultAggregate: "sum",
18554
+ empty: "omit",
18555
+ companions: [NOW$2]
18556
+ }),
18557
+ numeric({
18558
+ id: "battery",
18559
+ summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
18560
+ role: DeviceRole.BatterySensor,
18561
+ outputCap: "battery",
18562
+ outputField: "percentage",
18563
+ quantity: "percentage",
18564
+ defaultAggregate: "mean",
18565
+ empty: "null",
18566
+ companions: [
18567
+ {
18568
+ fieldPath: "charging",
18569
+ expr: "\"unknown\""
18570
+ },
18571
+ {
18572
+ fieldPath: "sleeping",
18573
+ expr: "false"
18574
+ },
18575
+ {
18576
+ fieldPath: "lastUpdated",
18577
+ expr: "now"
18578
+ }
18579
+ ]
18580
+ }),
18581
+ numeric({
18582
+ id: "numeric",
18583
+ summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
18584
+ role: DeviceRole.NumericSensor,
18585
+ outputCap: "numeric-sensor",
18586
+ outputField: "value",
18587
+ quantity: "device",
18588
+ defaultAggregate: "mean",
18589
+ empty: "null",
18590
+ companions: [NOW$2]
18591
+ }),
18592
+ binary({
18593
+ id: "motion",
18594
+ summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
18595
+ role: DeviceRole.MotionSensor,
18596
+ outputCap: "motion",
18597
+ outputField: "detected",
18598
+ defaultAggregate: "any",
18599
+ accept: [{
18600
+ cap: "motion",
18601
+ fieldPath: "detected"
18602
+ }],
18603
+ companions: [{
18604
+ fieldPath: "lastDetectedAt",
18605
+ expr: "null"
18606
+ }, {
18607
+ fieldPath: "autoClearAfterMs",
18608
+ expr: "null"
18609
+ }]
18610
+ }),
18611
+ binary({
18612
+ id: "contact",
18613
+ summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
18614
+ role: DeviceRole.ContactSensor,
18615
+ outputCap: "contact",
18616
+ outputField: "entryOpen",
18617
+ defaultAggregate: "any",
18618
+ accept: [{
18619
+ cap: "contact",
18620
+ fieldPath: "entryOpen"
18621
+ }],
18622
+ companions: [CHANGED]
18623
+ }),
18624
+ binary({
18625
+ id: "leak",
18626
+ summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
18627
+ role: DeviceRole.LeakSensor,
18628
+ outputCap: "flood",
18629
+ outputField: "flooded",
18630
+ defaultAggregate: "any",
18631
+ accept: [{
18632
+ cap: "flood",
18633
+ fieldPath: "flooded"
18634
+ }],
18635
+ companions: [CHANGED]
18636
+ }),
18637
+ binary({
18638
+ id: "smoke",
18639
+ summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
18640
+ role: DeviceRole.SmokeSensor,
18641
+ outputCap: "smoke",
18642
+ outputField: "detected",
18643
+ defaultAggregate: "any",
18644
+ accept: [{
18645
+ cap: "smoke",
18646
+ fieldPath: "detected"
18647
+ }],
18648
+ companions: [CHANGED]
18649
+ }),
18650
+ binary({
18651
+ id: "occupancy",
18652
+ summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
18653
+ role: DeviceRole.BinarySensor,
18654
+ outputCap: "binary",
18655
+ outputField: "on",
18656
+ defaultAggregate: "any",
18657
+ accept: [{
18658
+ cap: "motion",
18659
+ fieldPath: "detected"
18660
+ }, {
18661
+ cap: "binary",
18662
+ fieldPath: "on"
18663
+ }],
18664
+ companions: [CHANGED]
18665
+ }),
18666
+ binary({
18667
+ id: "binary",
18668
+ summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
18669
+ role: DeviceRole.BinarySensor,
18670
+ outputCap: "binary",
18671
+ outputField: "on",
18672
+ defaultAggregate: "any",
18673
+ accept: [{
18674
+ cap: "binary",
18675
+ fieldPath: "on"
18676
+ }],
18677
+ companions: [CHANGED]
18678
+ }),
18679
+ actuator({
18680
+ id: "switch",
18681
+ 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.",
18682
+ deviceType: DeviceType.Switch,
18683
+ outputCap: "switch",
18684
+ outputField: "on",
18685
+ member: {
18686
+ cap: "switch",
18687
+ fieldPath: "on"
18688
+ },
18689
+ commandCaps: ["switch"]
18690
+ }),
18691
+ actuator({
18692
+ id: "light",
18693
+ 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.",
18694
+ deviceType: DeviceType.Light,
18695
+ outputCap: "switch",
18696
+ outputField: "on",
18697
+ member: {
18698
+ cap: "switch",
18699
+ fieldPath: "on"
18700
+ },
18701
+ commandCaps: [
18702
+ "switch",
18703
+ "brightness",
18704
+ "color"
18705
+ ]
18706
+ }),
18707
+ actuator({
18708
+ id: "fan",
18709
+ 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.",
18710
+ deviceType: DeviceType.Fan,
18711
+ outputCap: "switch",
18712
+ outputField: "on",
18713
+ member: {
18714
+ cap: "switch",
18715
+ fieldPath: "on"
18716
+ },
18717
+ commandCaps: ["switch", "fan-control"]
18718
+ }),
18719
+ actuator({
18720
+ id: "cover",
18721
+ 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.",
18722
+ deviceType: DeviceType.Cover,
18723
+ outputCap: "group-active",
18724
+ outputField: "active",
18725
+ member: {
18726
+ cap: "cover",
18727
+ fieldPath: "state"
18728
+ },
18729
+ activeWhen: [
18730
+ "open",
18731
+ "opening",
18732
+ "stopped"
18733
+ ],
18734
+ commandCaps: ["cover"]
18735
+ }),
18736
+ actuator({
18737
+ id: "valve",
18738
+ 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.",
18739
+ deviceType: DeviceType.Valve,
18740
+ outputCap: "group-active",
18741
+ outputField: "active",
18742
+ member: {
18743
+ cap: "valve",
18744
+ fieldPath: "state"
18745
+ },
18746
+ activeWhen: [
18747
+ "open",
18748
+ "opening",
18749
+ "stopped"
18750
+ ],
18751
+ commandCaps: ["valve"]
18752
+ }),
18753
+ actuator({
18754
+ id: "lock",
18755
+ 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.",
18756
+ deviceType: DeviceType.Lock,
18757
+ outputCap: "group-active",
18758
+ outputField: "active",
18759
+ member: {
18760
+ cap: "lock-control",
18761
+ fieldPath: "state"
18762
+ },
18763
+ activeWhen: ["locked"],
18764
+ commandCaps: ["lock-control"]
18765
+ }),
18766
+ actuator({
18767
+ id: "media-player",
18768
+ 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.",
18769
+ deviceType: DeviceType.MediaPlayer,
18770
+ outputCap: "group-active",
18771
+ outputField: "active",
18772
+ member: {
18773
+ cap: "media-player",
18774
+ fieldPath: "state"
18775
+ },
18776
+ activeWhen: ["playing", "buffering"],
18777
+ commandCaps: ["media-player"]
18778
+ }),
18779
+ actuator({
18780
+ id: "climate",
18781
+ 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.",
18782
+ deviceType: DeviceType.Thermostat,
18783
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18784
+ outputCap: "group-active",
18785
+ outputField: "active",
18786
+ member: {
18787
+ cap: "climate-control",
18788
+ fieldPath: "mode"
18789
+ },
18790
+ activeWhen: [
18791
+ "heat",
18792
+ "cool",
18793
+ "auto",
18794
+ "heat_cool",
18795
+ "fan_only",
18796
+ "dry"
18797
+ ],
18798
+ commandCaps: ["climate-control"]
18799
+ })
18800
+ ];
18801
+ function actuator(input) {
18802
+ return {
18803
+ id: input.id,
18804
+ summary: input.summary,
18805
+ deviceType: input.deviceType,
18806
+ outputCap: input.outputCap,
18807
+ outputField: input.outputField,
18808
+ commandCaps: input.commandCaps,
18809
+ family: "actuator",
18810
+ role: void 0,
18811
+ memberDeviceType: input.deviceType,
18812
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18813
+ activeWhen: input.activeWhen,
18814
+ quantity: "none",
18815
+ baseUnit: void 0,
18816
+ aggregates: BINARY_AGGREGATES,
18817
+ defaultAggregate: "any",
18818
+ empty: "offline",
18819
+ accept: [input.member],
18820
+ companions: [CHANGED]
18821
+ };
18822
+ }
18823
+ new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18824
+ DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18825
+ DeviceType.Camera;
18053
18826
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18054
18827
  /**
18055
18828
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43369,7 +44142,7 @@ var NetworkAccessStatusSchema = object({
43369
44142
  });
43370
44143
  /**
43371
44144
  * Optional, richer endpoint shape returned by providers that expose
43372
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44145
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43373
44146
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43374
44147
  * the originating provider config (mode + sourcePort) so the
43375
44148
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -44965,6 +45738,8 @@ var NcSystemEventKindSchema = _enum([
44965
45738
  "detection-blind",
44966
45739
  "motion-noisy",
44967
45740
  "motion-calm",
45741
+ "package-llm-silent",
45742
+ "package-llm-answered",
44968
45743
  "recording-stalled",
44969
45744
  "recording-healthy",
44970
45745
  "recording-degraded",
@@ -46054,7 +46829,20 @@ var NcRuleInputSchema = object({
46054
46829
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46055
46830
  * path does not run Zod defaults.
46056
46831
  */
46057
- groupingSec: number().int().min(5).max(60).optional()
46832
+ groupingSec: number().int().min(5).max(60).optional(),
46833
+ /**
46834
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46835
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46836
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46837
+ * same mark the Library writes, and records whose notification it was and
46838
+ * when. A channel with no buttons gets the same two choices as links.
46839
+ *
46840
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46841
+ * cap path): absent and `false` both mean off, which is what every rule
46842
+ * authored before this field meant. An editor turns it off by writing
46843
+ * `false`, so it needs no `clear` key.
46844
+ */
46845
+ askVerdict: boolean().optional()
46058
46846
  });
46059
46847
  /**
46060
46848
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -56056,6 +56844,28 @@ var PackageVersionInfoSchema = object({
56056
56844
  deprecated: string().optional(),
56057
56845
  distTags: array(string()).readonly()
56058
56846
  });
56847
+ /**
56848
+ * One published document. `ok` is markdown from the registry. `missing` means
56849
+ * the registry answered and the file was not there. `error` is a registry or
56850
+ * tarball failure — never an empty string standing in for either.
56851
+ */
56852
+ var PackageDocBodySchema = discriminatedUnion("status", [
56853
+ object({
56854
+ status: literal("ok"),
56855
+ markdown: string()
56856
+ }),
56857
+ object({ status: literal("missing") }),
56858
+ object({
56859
+ status: literal("error"),
56860
+ message: string()
56861
+ })
56862
+ ]);
56863
+ var PackageDocsSchema = object({
56864
+ name: string(),
56865
+ version: string(),
56866
+ readme: PackageDocBodySchema,
56867
+ changelog: PackageDocBodySchema
56868
+ });
56059
56869
  var SearchResultSchema = object({
56060
56870
  name: string(),
56061
56871
  version: string(),
@@ -56274,7 +57084,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56274
57084
  }), object({ success: literal(true) }), {
56275
57085
  kind: "mutation",
56276
57086
  auth: "admin"
56277
- }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
57087
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
57088
+ name: string().min(1),
57089
+ version: string().min(1).optional()
57090
+ }), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
56278
57091
  kind: "mutation",
56279
57092
  auth: "admin"
56280
57093
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -56749,7 +57562,8 @@ var BATTERY_DEVICE_TYPES = [
56749
57562
  DeviceType.Switch,
56750
57563
  DeviceType.PetFeeder,
56751
57564
  DeviceType.Container,
56752
- DeviceType.Thermostat
57565
+ DeviceType.Thermostat,
57566
+ DeviceType.EventEmitter
56753
57567
  ];
56754
57568
  /** Generic Customize target for the percentage reading (D936). */
56755
57569
  var batteryCustomize = {
@@ -59610,6 +60424,148 @@ var gasCapability = {
59610
60424
  * whether persisting is worth a SQLite commit. */
59611
60425
  volatileStateFields: ["lastChangedAt"]
59612
60426
  };
60427
+ var GroupCommandsSchema = object({
60428
+ /** One row per member that has been commanded. A later command replaces that member's row. */
60429
+ results: array(object({
60430
+ deviceId: number().int().nonnegative(),
60431
+ cap: string().min(1),
60432
+ method: string().min(1),
60433
+ ok: boolean(),
60434
+ error: string().optional(),
60435
+ /** Ms epoch of the attempt. */
60436
+ at: number()
60437
+ })) });
60438
+ var groupCommandsCapability = {
60439
+ name: "group-commands",
60440
+ scope: "device",
60441
+ deviceNative: true,
60442
+ mode: "singleton",
60443
+ deviceTypes: [
60444
+ DeviceType.Switch,
60445
+ DeviceType.Light,
60446
+ DeviceType.Fan,
60447
+ DeviceType.Cover,
60448
+ DeviceType.Valve,
60449
+ DeviceType.Lock,
60450
+ DeviceType.MediaPlayer,
60451
+ DeviceType.Thermostat,
60452
+ DeviceType.Climate
60453
+ ],
60454
+ methods: {},
60455
+ status: {
60456
+ schema: GroupCommandsSchema,
60457
+ kind: "push"
60458
+ },
60459
+ runtimeState: GroupCommandsSchema,
60460
+ /**
60461
+ * Runtime-state durability: **session** — the last attempt. A restored
60462
+ * failure would outlive the command that caused it.
60463
+ *
60464
+ * See `RuntimeStateDurability`. Enforced by
60465
+ * `scripts/check-runtime-state-durability.ts`.
60466
+ */
60467
+ durability: "session",
60468
+ history: "none"
60469
+ };
60470
+ /**
60471
+ * Whether a helper actuator group counts as active (D944): at least one
60472
+ * included member is, or every included member is. What "active" means is the
60473
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60474
+ * climate device is not off. A group of lights, switches and fans reports
60475
+ * `switch.on` instead; this cap is for the types whose own state is not a
60476
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60477
+ * empty included set takes the device offline, never `active: false`.
60478
+ */
60479
+ var GroupActiveSchema = object({
60480
+ active: boolean().meta({ label: "Active" }),
60481
+ /** Ms epoch when the slice was last updated. */
60482
+ lastChangedAt: number()
60483
+ });
60484
+ var groupActiveCapability = {
60485
+ name: "group-active",
60486
+ scope: "device",
60487
+ deviceNative: true,
60488
+ mode: "singleton",
60489
+ deviceTypes: [
60490
+ DeviceType.Cover,
60491
+ DeviceType.Valve,
60492
+ DeviceType.Lock,
60493
+ DeviceType.MediaPlayer,
60494
+ DeviceType.Climate,
60495
+ DeviceType.Thermostat
60496
+ ],
60497
+ methods: {},
60498
+ status: {
60499
+ schema: GroupActiveSchema,
60500
+ kind: "push"
60501
+ },
60502
+ runtimeState: GroupActiveSchema,
60503
+ /**
60504
+ * Runtime-state durability: **session** — recomputed from the members on the
60505
+ * next source event; a restored value would outlive the members it named.
60506
+ *
60507
+ * See `RuntimeStateDurability`. Enforced by
60508
+ * `scripts/check-runtime-state-durability.ts`.
60509
+ */
60510
+ durability: "session",
60511
+ history: "none"
60512
+ };
60513
+ /**
60514
+ * How many members of a helper group answered (D944). Counts are integers,
60515
+ * not measurements: zero included is a real count, never a stand-in reading.
60516
+ * The reading itself stays on the output capability. History is none — the
60517
+ * series that later statistics read is the output cap's own history block.
60518
+ */
60519
+ var GroupStatusSchema = object({
60520
+ /** Members whose current value entered the aggregate. */
60521
+ included: number().int().nonnegative().meta(readingMeta("count", {
60522
+ precision: 0,
60523
+ label: "Reporting"
60524
+ })),
60525
+ /** Members left out: offline, unknown, or not a finite reading (D393). */
60526
+ excluded: number().int().nonnegative().meta(readingMeta("count", {
60527
+ precision: 0,
60528
+ label: "Excluded"
60529
+ })),
60530
+ /** `included` + `excluded`. */
60531
+ total: number().int().nonnegative().meta(readingMeta("count", {
60532
+ precision: 0,
60533
+ label: "Members"
60534
+ }))
60535
+ });
60536
+ var groupStatusCapability = {
60537
+ name: "group-status",
60538
+ scope: "device",
60539
+ deviceNative: true,
60540
+ mode: "singleton",
60541
+ deviceTypes: [
60542
+ DeviceType.Sensor,
60543
+ DeviceType.Switch,
60544
+ DeviceType.Light,
60545
+ DeviceType.Fan,
60546
+ DeviceType.Cover,
60547
+ DeviceType.Valve,
60548
+ DeviceType.Lock,
60549
+ DeviceType.MediaPlayer,
60550
+ DeviceType.Thermostat,
60551
+ DeviceType.Climate
60552
+ ],
60553
+ methods: {},
60554
+ status: {
60555
+ schema: GroupStatusSchema,
60556
+ kind: "push"
60557
+ },
60558
+ runtimeState: GroupStatusSchema,
60559
+ /**
60560
+ * Runtime-state durability: **session** — recomputed from members on the
60561
+ * next source event; a restored count would outlive the readings it named.
60562
+ *
60563
+ * See `RuntimeStateDurability`. Enforced by
60564
+ * `scripts/check-runtime-state-durability.ts`.
60565
+ */
60566
+ durability: "session",
60567
+ history: "none"
60568
+ };
59613
60569
  var HeatingValveStatusSchema = object({
59614
60570
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59615
60571
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -60865,7 +61821,14 @@ var lockControlCapability = {
60865
61821
  }),
60866
61822
  unlock: method(object({
60867
61823
  deviceId: number().int().nonnegative(),
60868
- code: string().min(1).optional()
61824
+ code: string().min(1).optional(),
61825
+ /**
61826
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61827
+ * with one call is refused unless the caller says it was confirmed. A
61828
+ * single lock ignores it. The refusal lives in the callee, so no
61829
+ * automation or API caller reaches the doors by skipping a dialog.
61830
+ */
61831
+ confirm: boolean().optional()
60869
61832
  }), _void(), {
60870
61833
  kind: "mutation",
60871
61834
  auth: "protected"
@@ -60902,6 +61865,44 @@ var lockControlCapability = {
60902
61865
  volatileStateFields: ["lastChangedAt"]
60903
61866
  };
60904
61867
  /**
61868
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
61869
+ * so dashboards keep one series; every other instantaneous reading lands here.
61870
+ * `value` is the time integral in the source quantity's accumulated base
61871
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
61872
+ */
61873
+ var MeterStatusSchema = object({
61874
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61875
+ lastFetchedAt: number()
61876
+ });
61877
+ var meterCapability = {
61878
+ name: "meter",
61879
+ scope: "device",
61880
+ deviceNative: true,
61881
+ mode: "singleton",
61882
+ deviceTypes: [DeviceType.Sensor],
61883
+ methods: {},
61884
+ status: {
61885
+ schema: MeterStatusSchema,
61886
+ kind: "push"
61887
+ },
61888
+ runtimeState: MeterStatusSchema,
61889
+ /**
61890
+ * Runtime-state durability: **restored** — the total is a cache of the
61891
+ * history integral. A restart shows it only until the history pass
61892
+ * recomputes the open period; it is not an in-memory buffer.
61893
+ *
61894
+ * See `RuntimeStateDurability`. Enforced by
61895
+ * `scripts/check-runtime-state-durability.ts`.
61896
+ */
61897
+ durability: "restored",
61898
+ history: { fields: { value: {
61899
+ kind: "counter",
61900
+ deadband: .001,
61901
+ minIntervalMs: 6e4
61902
+ } } },
61903
+ volatileStateFields: ["lastFetchedAt"]
61904
+ };
61905
+ /**
60905
61906
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
60906
61907
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
60907
61908
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -61379,12 +62380,18 @@ var motionCapability = {
61379
62380
  methods: {
61380
62381
  /**
61381
62382
  * Pull the current motion state synchronously. Convenience shortcut
61382
- * for consumers that don't need the full status object; equivalent
61383
- * to `getStatus()?.detected ?? false`. Will likely be folded into
61384
- * `getStatus` once the auto-injected status surface lands in every
61385
- * consumer.
62383
+ * for consumers that don't need the full status object. A composed
62384
+ * group answers from its slice (D944): unknown throws, it is not off.
61386
62385
  */
61387
62386
  isDetected: method(object({ deviceId: number() }), boolean()) },
62387
+ /**
62388
+ * A composed motion group serves `isDetected` from `detected` (D944).
62389
+ * Without this the cap stays uncomposable (`has-commands`).
62390
+ */
62391
+ composedMethods: { isDetected: {
62392
+ kind: "slice",
62393
+ field: "detected"
62394
+ } },
61388
62395
  events: {
61389
62396
  /**
61390
62397
  * Fires every time the runner transitions a camera between
@@ -63407,9 +64414,9 @@ var PowerMeterStatusSchema = object({
63407
64414
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
63408
64415
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
63409
64416
  /** Voltage in volts. */
63410
- volts: number().optional().meta(readingMeta("voltage")),
64417
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
63411
64418
  /** Current in amperes. */
63412
- amps: number().optional().meta(readingMeta("current")),
64419
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
63413
64420
  /** Apparent power in volt-amperes. */
63414
64421
  va: number().optional().meta(readingMeta("apparent-power")),
63415
64422
  /** Power factor (0..1) if reported. */
@@ -63417,12 +64424,74 @@ var PowerMeterStatusSchema = object({
63417
64424
  /** Ms epoch when the slice was last updated. */
63418
64425
  lastFetchedAt: number()
63419
64426
  });
64427
+ /**
64428
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64429
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64430
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64431
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64432
+ * camera and the like are left out: their draw is not what anyone meters.
64433
+ */
64434
+ var POWER_METER_DEVICE_TYPES = [
64435
+ DeviceType.Sensor,
64436
+ DeviceType.Switch,
64437
+ DeviceType.Light,
64438
+ DeviceType.Fan,
64439
+ DeviceType.Climate,
64440
+ DeviceType.Thermostat,
64441
+ DeviceType.Humidifier,
64442
+ DeviceType.WaterHeater,
64443
+ DeviceType.MediaPlayer,
64444
+ DeviceType.Washer,
64445
+ DeviceType.Dryer,
64446
+ DeviceType.Dishwasher,
64447
+ DeviceType.Vacuum,
64448
+ DeviceType.LawnMower,
64449
+ DeviceType.PetFeeder
64450
+ ];
64451
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64452
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64453
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64454
+ function powerTarget(id, unit) {
64455
+ return {
64456
+ id,
64457
+ cardinality: "scalar",
64458
+ vocabulary: {
64459
+ cap: "power-meter",
64460
+ stateField: id
64461
+ },
64462
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64463
+ apply: "add",
64464
+ path: id,
64465
+ sources: [{
64466
+ kind: "numeric",
64467
+ requiredUnit: unit,
64468
+ transforms: [{ kind: "identity" }]
64469
+ }],
64470
+ companions: [{
64471
+ kind: "clock",
64472
+ path: "lastFetchedAt",
64473
+ when: "always"
64474
+ }],
64475
+ sourceReport: { status: "assignment-status" },
64476
+ advancedExpression: true
64477
+ };
64478
+ }
64479
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64480
+ var powerMeterCustomize = {
64481
+ version: 1,
64482
+ targets: [
64483
+ powerTarget("watts", "W"),
64484
+ powerTarget("kwhTotal", "kWh"),
64485
+ powerTarget("volts", "V"),
64486
+ powerTarget("amps", "A")
64487
+ ]
64488
+ };
63420
64489
  var powerMeterCapability = {
63421
64490
  name: "power-meter",
63422
64491
  scope: "device",
63423
64492
  deviceNative: true,
63424
64493
  mode: "singleton",
63425
- deviceTypes: [DeviceType.Sensor],
64494
+ deviceTypes: POWER_METER_DEVICE_TYPES,
63426
64495
  methods: {},
63427
64496
  status: {
63428
64497
  schema: PowerMeterStatusSchema,
@@ -63479,7 +64548,8 @@ var powerMeterCapability = {
63479
64548
  } },
63480
64549
  /** Clock fields: written, but excluded from the compare that decides
63481
64550
  * whether persisting is worth a SQLite commit. */
63482
- volatileStateFields: ["lastFetchedAt"]
64551
+ volatileStateFields: ["lastFetchedAt"],
64552
+ customize: powerMeterCustomize
63483
64553
  };
63484
64554
  /**
63485
64555
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64160,6 +65230,8 @@ var runningCustomize = {
64160
65230
  stateField: "running"
64161
65231
  },
64162
65232
  deviceTypes: [
65233
+ DeviceType.Washer,
65234
+ DeviceType.Dryer,
64163
65235
  DeviceType.Dishwasher,
64164
65236
  DeviceType.Vacuum,
64165
65237
  DeviceType.LawnMower,
@@ -66649,7 +67721,8 @@ var switchCapability = {
66649
67721
  deviceTypes: [
66650
67722
  DeviceType.Switch,
66651
67723
  DeviceType.Siren,
66652
- DeviceType.Light
67724
+ DeviceType.Light,
67725
+ DeviceType.Fan
66653
67726
  ],
66654
67727
  methods: { setState: method(object({
66655
67728
  deviceId: number(),
@@ -68862,8 +69935,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
68862
69935
  kind: "mutation",
68863
69936
  auth: "admin"
68864
69937
  });
69938
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
68865
69939
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
68866
- 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.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
69940
+ 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;
68867
69941
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
68868
69942
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
68869
69943
  new Set(CAP_NAMES);
@@ -69192,6 +70266,9 @@ var DEVICE_LOCAL_STATE_CAPS = {
69192
70266
  featureProbe: featureProbeCapability,
69193
70267
  flood: floodCapability,
69194
70268
  gas: gasCapability,
70269
+ groupActive: groupActiveCapability,
70270
+ groupCommands: groupCommandsCapability,
70271
+ groupStatus: groupStatusCapability,
69195
70272
  heatingValve: heatingValveCapability,
69196
70273
  humidifier: humidifierCapability,
69197
70274
  humiditySensor: humiditySensorCapability,
@@ -69201,6 +70278,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
69201
70278
  lawnMowerControl: lawnMowerControlCapability,
69202
70279
  lockControl: lockControlCapability,
69203
70280
  mediaPlayer: mediaPlayerCapability,
70281
+ meter: meterCapability,
69204
70282
  motion: motionCapability,
69205
70283
  motionTrigger: motionTriggerCapability,
69206
70284
  motionZones: motionZonesCapability,
@@ -70460,7 +71538,7 @@ var BaseDeviceProvider = class extends BaseAddon {
70460
71538
  return toDeviceSummary(device, this.addonId);
70461
71539
  }
70462
71540
  };
70463
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
71541
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, 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;
70464
71542
  new Set(Object.values(DeviceType));
70465
71543
  Object.freeze({
70466
71544
  "accessories.getStatus": {
@@ -70568,6 +71646,13 @@ Object.freeze({
70568
71646
  access: "view",
70569
71647
  role: "admin"
70570
71648
  },
71649
+ "addons.getPackageDocs": {
71650
+ capName: "addons",
71651
+ capScope: "system",
71652
+ addonId: null,
71653
+ access: "view",
71654
+ role: "admin"
71655
+ },
70571
71656
  "addons.getVersions": {
70572
71657
  capName: "addons",
70573
71658
  capScope: "system",
@@ -73676,6 +74761,27 @@ Object.freeze({
73676
74761
  access: "view",
73677
74762
  role: "viewer"
73678
74763
  },
74764
+ "groupActive.getStatus": {
74765
+ capName: "group-active",
74766
+ capScope: "device",
74767
+ addonId: null,
74768
+ access: "view",
74769
+ role: "viewer"
74770
+ },
74771
+ "groupCommands.getStatus": {
74772
+ capName: "group-commands",
74773
+ capScope: "device",
74774
+ addonId: null,
74775
+ access: "view",
74776
+ role: "viewer"
74777
+ },
74778
+ "groupStatus.getStatus": {
74779
+ capName: "group-status",
74780
+ capScope: "device",
74781
+ addonId: null,
74782
+ access: "view",
74783
+ role: "viewer"
74784
+ },
73679
74785
  "heatingValve.getStatus": {
73680
74786
  capName: "heating-valve",
73681
74787
  capScope: "device",
@@ -74628,6 +75734,13 @@ Object.freeze({
74628
75734
  access: "create",
74629
75735
  role: "admin"
74630
75736
  },
75737
+ "meter.getStatus": {
75738
+ capName: "meter",
75739
+ capScope: "device",
75740
+ addonId: null,
75741
+ access: "view",
75742
+ role: "viewer"
75743
+ },
74631
75744
  "metricsProvider.collectSnapshot": {
74632
75745
  capName: "metrics-provider",
74633
75746
  capScope: "system",
@@ -82726,7 +83839,39 @@ var APPLIANCE_CAP_VOCABULARY = {
82726
83839
  phrase: t("When {device} finishes", "Quando {device} finisce"),
82727
83840
  icon: "square"
82728
83841
  }
82729
- }
83842
+ },
83843
+ overrides: { byType: {
83844
+ [DeviceType.Washer]: {
83845
+ state: { running: {
83846
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
83847
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
83848
+ } },
83849
+ events: {
83850
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
83851
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
83852
+ }
83853
+ },
83854
+ [DeviceType.Dryer]: {
83855
+ state: { running: {
83856
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
83857
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
83858
+ } },
83859
+ events: {
83860
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
83861
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
83862
+ }
83863
+ },
83864
+ [DeviceType.Dishwasher]: {
83865
+ state: { running: {
83866
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
83867
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
83868
+ } },
83869
+ events: {
83870
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
83871
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
83872
+ }
83873
+ }
83874
+ } }
82730
83875
  },
82731
83876
  update: {
82732
83877
  scope: "device",
@@ -83498,6 +84643,41 @@ var SENSOR_CAP_VOCABULARY = {
83498
84643
  icon: "flame"
83499
84644
  }]
83500
84645
  },
84646
+ "group-active": {
84647
+ scope: "device",
84648
+ noun: t("Group state", "Stato del gruppo")
84649
+ },
84650
+ "group-commands": {
84651
+ scope: "device",
84652
+ noun: t("Group command", "Comando di gruppo")
84653
+ },
84654
+ "group-status": {
84655
+ scope: "device",
84656
+ noun: t("Group", "Gruppo"),
84657
+ state: [
84658
+ {
84659
+ kind: "numeric",
84660
+ field: "included",
84661
+ quantity: t("the members reporting", "i membri che rispondono"),
84662
+ label: t("Reporting", "Rispondono"),
84663
+ icon: "users"
84664
+ },
84665
+ {
84666
+ kind: "numeric",
84667
+ field: "excluded",
84668
+ quantity: t("the members left out", "i membri esclusi"),
84669
+ label: t("Excluded", "Esclusi"),
84670
+ icon: "users"
84671
+ },
84672
+ {
84673
+ kind: "numeric",
84674
+ field: "total",
84675
+ quantity: t("the member count", "il numero di membri"),
84676
+ label: t("Members", "Membri"),
84677
+ icon: "sigma"
84678
+ }
84679
+ ]
84680
+ },
83501
84681
  "humidity-sensor": {
83502
84682
  scope: "device",
83503
84683
  noun: t("Humidity", "Umidità"),
@@ -83523,6 +84703,17 @@ var SENSOR_CAP_VOCABULARY = {
83523
84703
  }],
83524
84704
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
83525
84705
  },
84706
+ meter: {
84707
+ scope: "device",
84708
+ noun: t("Meter", "Contatore"),
84709
+ state: [{
84710
+ kind: "numeric",
84711
+ field: "value",
84712
+ quantity: t("the total", "il totale"),
84713
+ label: t("Total", "Totale"),
84714
+ icon: "gauge"
84715
+ }]
84716
+ },
83526
84717
  "numeric-sensor": {
83527
84718
  scope: "device",
83528
84719
  noun: t("Sensor", "Sensore"),
@@ -83995,8 +85186,47 @@ function projectAction(cap, action) {
83995
85186
  };
83996
85187
  }
83997
85188
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
83998
- 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;
85189
+ 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;
83999
85190
  DeviceFeature.BatteryOperated;
85191
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
85192
+ var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
85193
+ var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
85194
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
85195
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
85196
+ var MATTER_REASON = "No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.";
85197
+ function withheld(reason) {
85198
+ return {
85199
+ [DeviceType.Washer]: {
85200
+ exported: false,
85201
+ reason
85202
+ },
85203
+ [DeviceType.Dryer]: {
85204
+ exported: false,
85205
+ reason
85206
+ },
85207
+ [DeviceType.Dishwasher]: {
85208
+ exported: false,
85209
+ reason
85210
+ }
85211
+ };
85212
+ }
85213
+ function offered(received) {
85214
+ return {
85215
+ [DeviceType.Washer]: {
85216
+ exported: true,
85217
+ as: received
85218
+ },
85219
+ [DeviceType.Dryer]: {
85220
+ exported: true,
85221
+ as: received
85222
+ },
85223
+ [DeviceType.Dishwasher]: {
85224
+ exported: true,
85225
+ as: received
85226
+ }
85227
+ };
85228
+ }
85229
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
84000
85230
  Object.freeze({
84001
85231
  "accessories.getStatus": [{
84002
85232
  name: "deviceId",
@@ -84963,6 +86193,21 @@ Object.freeze({
84963
86193
  form: "single",
84964
86194
  optional: false
84965
86195
  }],
86196
+ "groupActive.getStatus": [{
86197
+ name: "deviceId",
86198
+ form: "single",
86199
+ optional: false
86200
+ }],
86201
+ "groupCommands.getStatus": [{
86202
+ name: "deviceId",
86203
+ form: "single",
86204
+ optional: false
86205
+ }],
86206
+ "groupStatus.getStatus": [{
86207
+ name: "deviceId",
86208
+ form: "single",
86209
+ optional: false
86210
+ }],
84966
86211
  "heatingValve.getStatus": [{
84967
86212
  name: "deviceId",
84968
86213
  form: "single",
@@ -85163,6 +86408,11 @@ Object.freeze({
85163
86408
  form: "single",
85164
86409
  optional: false
85165
86410
  }],
86411
+ "meter.getStatus": [{
86412
+ name: "deviceId",
86413
+ form: "single",
86414
+ optional: false
86415
+ }],
85166
86416
  "motion.getStatus": [{
85167
86417
  name: "deviceId",
85168
86418
  form: "single",
@@ -86770,7 +88020,6 @@ Object.freeze({
86770
88020
  "network-access": "ingress",
86771
88021
  "smtp-provider": "email"
86772
88022
  });
86773
- DeviceType.Camera;
86774
88023
  /**
86775
88024
  * A saved Customize assignment (D936). The schema is the type: callers use
86776
88025
  * `z.infer`, they do not restate the shape.
@@ -86947,6 +88196,8 @@ new Map(Object.entries({
86947
88196
  "detection-blind": "device-events",
86948
88197
  "motion-noisy": "device-events",
86949
88198
  "motion-calm": "device-events",
88199
+ "package-llm-silent": "device-events",
88200
+ "package-llm-answered": "device-events",
86950
88201
  "recording-stalled": "device-events",
86951
88202
  "recording-healthy": "device-events",
86952
88203
  "recording-degraded": "device-events",
@@ -87030,6 +88281,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
87030
88281
  label: "Motion without a subject",
87031
88282
  kinds: ["motion-noisy", "motion-calm"]
87032
88283
  },
88284
+ {
88285
+ id: "package-llm",
88286
+ family: "device-events",
88287
+ label: "Package confirm",
88288
+ kinds: ["package-llm-silent", "package-llm-answered"]
88289
+ },
87033
88290
  {
87034
88291
  id: "recording",
87035
88292
  family: "device-events",
@@ -87211,6 +88468,8 @@ var DEVICE_EVENTS = [
87211
88468
  "detection-blind",
87212
88469
  "motion-noisy",
87213
88470
  "motion-calm",
88471
+ "package-llm-silent",
88472
+ "package-llm-answered",
87214
88473
  "recording-stalled",
87215
88474
  "recording-healthy",
87216
88475
  "recording-degraded",
@@ -87479,6 +88738,15 @@ new Map([
87479
88738
  snapshotLabel: "Cameras with constant motion now",
87480
88739
  snapshotSection: null
87481
88740
  },
88741
+ {
88742
+ id: "package-llm-confirm",
88743
+ family: "device-events",
88744
+ label: "Package confirm (not answering / answering again)",
88745
+ bad: ["package-llm-silent"],
88746
+ recovery: ["package-llm-answered"],
88747
+ snapshotLabel: "Cameras whose package confirm is not answering",
88748
+ snapshotSection: null
88749
+ },
87482
88750
  {
87483
88751
  id: "recording-health",
87484
88752
  family: "device-events",