@camstack/addon-terminal 0.1.154 → 0.1.155

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
@@ -5474,7 +5474,7 @@ var ZodIssueCode = {
5474
5474
  var ZodFirstPartyTypeKind;
5475
5475
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5476
5476
  //#endregion
5477
- //#region ../types/dist/sleep-bykKrTgu.mjs
5477
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5478
5478
  /**
5479
5479
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5480
5480
  * window to float samples (D455).
@@ -8726,6 +8726,7 @@ var CAP_NAMES = Object.freeze([
8726
8726
  "filesystem-browse",
8727
8727
  "flood",
8728
8728
  "gas",
8729
+ "group-active",
8729
8730
  "group-commands",
8730
8731
  "group-status",
8731
8732
  "heating-valve",
@@ -8748,6 +8749,7 @@ var CAP_NAMES = Object.freeze([
8748
8749
  "login-method",
8749
8750
  "media-player",
8750
8751
  "mesh-network",
8752
+ "meter",
8751
8753
  "metrics-provider",
8752
8754
  "model-convert",
8753
8755
  "model-distributor",
@@ -9546,6 +9548,10 @@ Object.freeze({
9546
9548
  "path": "detected",
9547
9549
  "valueType": "boolean"
9548
9550
  }],
9551
+ "group-active": [{
9552
+ "path": "active",
9553
+ "valueType": "boolean"
9554
+ }],
9549
9555
  "group-status": [
9550
9556
  {
9551
9557
  "path": "included",
@@ -9805,6 +9811,10 @@ Object.freeze({
9805
9811
  ]
9806
9812
  }
9807
9813
  ],
9814
+ "meter": [{
9815
+ "path": "value",
9816
+ "valueType": "number"
9817
+ }],
9808
9818
  "motion": [
9809
9819
  {
9810
9820
  "path": "detected",
@@ -10548,7 +10558,7 @@ object({
10548
10558
  params: record(string(), union([string(), number()])).optional()
10549
10559
  });
10550
10560
  //#endregion
10551
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10561
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10552
10562
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10553
10563
  DeviceType["Camera"] = "camera";
10554
10564
  DeviceType["Hub"] = "hub";
@@ -10642,8 +10652,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10642
10652
  DeviceType["PetFeeder"] = "pet-feeder";
10643
10653
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10644
10654
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10645
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10655
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10656
+ * A plug-built dishwasher carries running-state and power instead. */
10646
10657
  DeviceType["Dishwasher"] = "dishwasher";
10658
+ /** Washing machine. A plug-built one is running while its power stays
10659
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10660
+ DeviceType["Washer"] = "washer";
10661
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10662
+ DeviceType["Dryer"] = "dryer";
10647
10663
  return DeviceType;
10648
10664
  }({});
10649
10665
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10901,7 +10917,7 @@ function errMsg(err) {
10901
10917
  return String(err);
10902
10918
  }
10903
10919
  //#endregion
10904
- //#region ../types/dist/composition-OhpuespA.mjs
10920
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10905
10921
  /**
10906
10922
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10907
10923
  *
@@ -11216,6 +11232,13 @@ var table = {
11216
11232
  apply: () => {
11217
11233
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11218
11234
  }
11235
+ },
11236
+ schmitt: {
11237
+ minArgs: 3,
11238
+ maxArgs: 5,
11239
+ apply: () => {
11240
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11241
+ }
11219
11242
  }
11220
11243
  };
11221
11244
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11657,6 +11680,99 @@ function validateExpressionSource(src) {
11657
11680
  return null;
11658
11681
  }
11659
11682
  /**
11683
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11684
+ *
11685
+ * Standby of the control board is under 5 W; a motor or a heater is far
11686
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11687
+ * a cycle, so running starts only after 30 s above the line.
11688
+ *
11689
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11690
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11691
+ * report "finished" in the middle of the program, so the stop dwell is
11692
+ * 10 minutes on every type. The number is stored per type so one machine
11693
+ * can move later without moving the others.
11694
+ */
11695
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11696
+ var APPLIANCE_KINDS = [
11697
+ "washer",
11698
+ "dryer",
11699
+ "dishwasher"
11700
+ ];
11701
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11702
+ /**
11703
+ * Statistics and integrals over a history read (D944).
11704
+ *
11705
+ * Pure: the same points always give the same answer, so a restart recomputes
11706
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11707
+ * never the mean of the samples. A hole with no held value is not integrated
11708
+ * as zero. A truncated read is not published.
11709
+ */
11710
+ var STATISTIC_STATS = [
11711
+ "min",
11712
+ "max",
11713
+ "mean",
11714
+ "sum",
11715
+ "count",
11716
+ "change"
11717
+ ];
11718
+ /**
11719
+ * The range a statistics or integral helper asks history for (D944).
11720
+ *
11721
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11722
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11723
+ * is strictly longer than the longest that range can be. Forever qualifies.
11724
+ * Equal to a tier's retention is a refusal, not a short answer.
11725
+ */
11726
+ var MINUTE_MS = 6e4;
11727
+ var HOUR_MS = 60 * MINUTE_MS;
11728
+ var DAY_MS = 24 * HOUR_MS;
11729
+ var ROLLING_SPANS = [
11730
+ "1h",
11731
+ "24h",
11732
+ "2d",
11733
+ "7d",
11734
+ "30d",
11735
+ "custom"
11736
+ ];
11737
+ var CALENDAR_PERIODS = [
11738
+ "today",
11739
+ "yesterday",
11740
+ "this-week",
11741
+ "this-month"
11742
+ ];
11743
+ var RESET_PERIODS = [
11744
+ "never",
11745
+ "daily",
11746
+ "weekly",
11747
+ "monthly"
11748
+ ];
11749
+ 5 * MINUTE_MS;
11750
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11751
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11752
+ var rollingWindowObject = object({
11753
+ kind: literal("rolling"),
11754
+ span: _enum(ROLLING_SPANS),
11755
+ customMinutes: number().int().min(5).optional()
11756
+ }).check((payload) => {
11757
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11758
+ code: "custom",
11759
+ message: "a custom range needs a duration in minutes",
11760
+ path: ["customMinutes"],
11761
+ input: payload.value
11762
+ });
11763
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11764
+ code: "custom",
11765
+ message: "only a custom range carries a duration",
11766
+ path: ["customMinutes"],
11767
+ input: payload.value
11768
+ });
11769
+ });
11770
+ var RollingWindowSchema = rollingWindowObject;
11771
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11772
+ kind: literal("calendar"),
11773
+ period: _enum(CALENDAR_PERIODS)
11774
+ })]);
11775
+ /**
11660
11776
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11661
11777
  * id. Split out so helper schemas can name it without a cycle through
11662
11778
  * `composition.ts` (D659).
@@ -11682,7 +11798,13 @@ var GROUP_TEMPLATE_IDS = [
11682
11798
  "occupancy",
11683
11799
  "binary",
11684
11800
  "switch",
11685
- "light"
11801
+ "light",
11802
+ "fan",
11803
+ "cover",
11804
+ "valve",
11805
+ "lock",
11806
+ "media-player",
11807
+ "climate"
11686
11808
  ];
11687
11809
  var NUMERIC_AGGREGATES = [
11688
11810
  "mean",
@@ -11712,14 +11834,73 @@ var HelperMemberSchema = object({
11712
11834
  cap: string().min(1),
11713
11835
  fieldPath: string().min(1)
11714
11836
  });
11715
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11716
- kind: literal("group"),
11717
- templateId: GroupTemplateIdSchema,
11718
- aggregate: AggregateReducerSchema,
11719
- members: array(HelperMemberSchema).min(1).max(64),
11720
- /** Actuator groups only. Readings leave this unset. */
11721
- active: ActiveCriterionSchema.optional()
11722
- })]);
11837
+ var HelperSpecSchema = discriminatedUnion("kind", [
11838
+ object({
11839
+ kind: literal("group"),
11840
+ templateId: GroupTemplateIdSchema,
11841
+ aggregate: AggregateReducerSchema,
11842
+ members: array(HelperMemberSchema).min(1).max(64),
11843
+ /** Actuator groups only. Readings leave this unset. */
11844
+ active: ActiveCriterionSchema.optional()
11845
+ }),
11846
+ object({
11847
+ kind: literal("appliance"),
11848
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11849
+ appliance: _enum(APPLIANCE_KINDS),
11850
+ thresholdWatts: number().positive(),
11851
+ startDwellMs: number().int().nonnegative(),
11852
+ stopDwellMs: number().int().nonnegative(),
11853
+ member: HelperMemberSchema
11854
+ }),
11855
+ object({
11856
+ kind: literal("statistic"),
11857
+ stat: _enum(STATISTIC_STATS),
11858
+ window: StatisticWindowSchema,
11859
+ source: HelperMemberSchema
11860
+ }),
11861
+ object({
11862
+ kind: literal("integral"),
11863
+ reset: _enum(RESET_PERIODS),
11864
+ output: _enum(["energy", "meter"]),
11865
+ source: HelperMemberSchema
11866
+ }),
11867
+ object({
11868
+ kind: literal("threshold"),
11869
+ source: HelperMemberSchema,
11870
+ high: number(),
11871
+ low: number(),
11872
+ onForMs: number().int().nonnegative(),
11873
+ offForMs: number().int().nonnegative()
11874
+ }),
11875
+ object({
11876
+ kind: literal("arithmetic"),
11877
+ op: _enum([
11878
+ "sum",
11879
+ "difference",
11880
+ "ratio"
11881
+ ]),
11882
+ inputs: array(HelperMemberSchema).min(2).max(64)
11883
+ }),
11884
+ object({
11885
+ kind: literal("expression"),
11886
+ expr: string().min(1),
11887
+ inputs: array(object({
11888
+ name: string().min(1),
11889
+ member: HelperMemberSchema
11890
+ })).min(1).max(64),
11891
+ output: _enum(["number", "boolean"])
11892
+ }),
11893
+ object({
11894
+ kind: literal("derivative"),
11895
+ window: RollingWindowSchema,
11896
+ per: _enum([
11897
+ "second",
11898
+ "minute",
11899
+ "hour"
11900
+ ]),
11901
+ source: HelperMemberSchema
11902
+ })
11903
+ ]);
11723
11904
  /** A composed device's stableId is this prefix plus the block id. */
11724
11905
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11725
11906
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11780,6 +11961,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11780
11961
  "all"
11781
11962
  ]),
11782
11963
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11964
+ /**
11965
+ * Set when the reads are an enum state, not a yes/no: the listed states
11966
+ * count as active (a cover is `open`). A state outside the list is inactive;
11967
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11968
+ */
11969
+ activeWhen: array(string().min(1)).min(1).optional(),
11783
11970
  /** `value` is the reading; the others are the member counts. */
11784
11971
  publish: _enum([
11785
11972
  "value",
@@ -11793,6 +11980,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11793
11980
  "omit",
11794
11981
  "offline"
11795
11982
  ])
11983
+ }),
11984
+ object({
11985
+ kind: literal("series"),
11986
+ read: CompositionFieldReadSchema,
11987
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11988
+ publish: _enum([
11989
+ "value",
11990
+ "included",
11991
+ "excluded",
11992
+ "total"
11993
+ ]),
11994
+ /**
11995
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11996
+ * device unseeded until history answers, so a restart cannot publish 0.
11997
+ */
11998
+ empty: _enum([
11999
+ "null",
12000
+ "omit",
12001
+ "offline"
12002
+ ])
11796
12003
  })
11797
12004
  ]);
11798
12005
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -16984,7 +17191,22 @@ var BrokerProviderInfoSchema = object({
16984
17191
  */
16985
17192
  interactiveConnectPath: string().min(1).optional(),
16986
17193
  /** Relative hub path to disconnect the linked account (same popup pattern). */
16987
- interactiveDisconnectPath: string().min(1).optional()
17194
+ interactiveDisconnectPath: string().min(1).optional(),
17195
+ /**
17196
+ * The kind signs in through a server-held interactive session instead of
17197
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17198
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17199
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17200
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17201
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17202
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17203
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17204
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17205
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17206
+ * offers it as the default path; the fields the session fills are
17207
+ * marked `filledBySignIn` in the kind's settings schema.
17208
+ */
17209
+ signIn: object({ basePath: string().min(1) }).optional()
16988
17210
  }))
16989
17211
  });
16990
17212
  var ListInputSchema = object({
@@ -18089,7 +18311,8 @@ var CompositionProblemSchema = object({
18089
18311
  "native-capability-replace",
18090
18312
  "mixed-quantity",
18091
18313
  "helper-mismatch",
18092
- "member-constraint"
18314
+ "member-constraint",
18315
+ "retention"
18093
18316
  ]),
18094
18317
  path: string(),
18095
18318
  message: string()
@@ -18323,13 +18546,17 @@ Object.freeze({
18323
18546
  latchedAt: {
18324
18547
  kind: "fixed",
18325
18548
  result: ["number", "null"]
18549
+ },
18550
+ schmitt: {
18551
+ kind: "fixed",
18552
+ result: ["boolean", "null"]
18326
18553
  }
18327
18554
  });
18328
18555
  /**
18329
18556
  * One catalog row per base reading a group helper can build (D944 §3).
18330
18557
  * Data, not a form default written into the block.
18331
18558
  */
18332
- var NOW = {
18559
+ var NOW$2 = {
18333
18560
  fieldPath: "lastFetchedAt",
18334
18561
  expr: "now"
18335
18562
  };
@@ -18343,6 +18570,8 @@ function numeric(input) {
18343
18570
  family: "numeric",
18344
18571
  deviceType: DeviceType.Sensor,
18345
18572
  memberDeviceType: DeviceType.Sensor,
18573
+ memberDeviceTypes: [DeviceType.Sensor],
18574
+ activeWhen: void 0,
18346
18575
  commandCaps: [],
18347
18576
  baseUnit: baseUnitOf(input.quantity),
18348
18577
  aggregates: NUMERIC_AGGREGATES,
@@ -18358,6 +18587,8 @@ function binary(input) {
18358
18587
  family: "binary",
18359
18588
  deviceType: DeviceType.Sensor,
18360
18589
  memberDeviceType: DeviceType.Sensor,
18590
+ memberDeviceTypes: [DeviceType.Sensor],
18591
+ activeWhen: void 0,
18361
18592
  commandCaps: [],
18362
18593
  quantity: "none",
18363
18594
  baseUnit: void 0,
@@ -18375,7 +18606,7 @@ var GROUP_TEMPLATES = [
18375
18606
  quantity: "temperature",
18376
18607
  defaultAggregate: "mean",
18377
18608
  empty: "null",
18378
- companions: [NOW]
18609
+ companions: [NOW$2]
18379
18610
  }),
18380
18611
  numeric({
18381
18612
  id: "humidity",
@@ -18386,7 +18617,7 @@ var GROUP_TEMPLATES = [
18386
18617
  quantity: "humidity",
18387
18618
  defaultAggregate: "mean",
18388
18619
  empty: "null",
18389
- companions: [NOW]
18620
+ companions: [NOW$2]
18390
18621
  }),
18391
18622
  numeric({
18392
18623
  id: "pressure",
@@ -18397,7 +18628,7 @@ var GROUP_TEMPLATES = [
18397
18628
  quantity: "pressure",
18398
18629
  defaultAggregate: "mean",
18399
18630
  empty: "null",
18400
- companions: [NOW]
18631
+ companions: [NOW$2]
18401
18632
  }),
18402
18633
  numeric({
18403
18634
  id: "illuminance",
@@ -18408,7 +18639,7 @@ var GROUP_TEMPLATES = [
18408
18639
  quantity: "illuminance",
18409
18640
  defaultAggregate: "mean",
18410
18641
  empty: "null",
18411
- companions: [NOW]
18642
+ companions: [NOW$2]
18412
18643
  }),
18413
18644
  numeric({
18414
18645
  id: "power",
@@ -18419,7 +18650,7 @@ var GROUP_TEMPLATES = [
18419
18650
  quantity: "power",
18420
18651
  defaultAggregate: "sum",
18421
18652
  empty: "omit",
18422
- companions: [NOW]
18653
+ companions: [NOW$2]
18423
18654
  }),
18424
18655
  numeric({
18425
18656
  id: "energy",
@@ -18430,7 +18661,7 @@ var GROUP_TEMPLATES = [
18430
18661
  quantity: "energy",
18431
18662
  defaultAggregate: "sum",
18432
18663
  empty: "omit",
18433
- companions: [NOW]
18664
+ companions: [NOW$2]
18434
18665
  }),
18435
18666
  numeric({
18436
18667
  id: "battery",
@@ -18465,7 +18696,7 @@ var GROUP_TEMPLATES = [
18465
18696
  quantity: "device",
18466
18697
  defaultAggregate: "mean",
18467
18698
  empty: "null",
18468
- companions: [NOW]
18699
+ companions: [NOW$2]
18469
18700
  }),
18470
18701
  binary({
18471
18702
  id: "motion",
@@ -18559,6 +18790,11 @@ var GROUP_TEMPLATES = [
18559
18790
  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.",
18560
18791
  deviceType: DeviceType.Switch,
18561
18792
  outputCap: "switch",
18793
+ outputField: "on",
18794
+ member: {
18795
+ cap: "switch",
18796
+ fieldPath: "on"
18797
+ },
18562
18798
  commandCaps: ["switch"]
18563
18799
  }),
18564
18800
  actuator({
@@ -18566,34 +18802,136 @@ var GROUP_TEMPLATES = [
18566
18802
  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.",
18567
18803
  deviceType: DeviceType.Light,
18568
18804
  outputCap: "switch",
18805
+ outputField: "on",
18806
+ member: {
18807
+ cap: "switch",
18808
+ fieldPath: "on"
18809
+ },
18569
18810
  commandCaps: [
18570
18811
  "switch",
18571
18812
  "brightness",
18572
18813
  "color"
18573
18814
  ]
18815
+ }),
18816
+ actuator({
18817
+ id: "fan",
18818
+ 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.",
18819
+ deviceType: DeviceType.Fan,
18820
+ outputCap: "switch",
18821
+ outputField: "on",
18822
+ member: {
18823
+ cap: "switch",
18824
+ fieldPath: "on"
18825
+ },
18826
+ commandCaps: ["switch", "fan-control"]
18827
+ }),
18828
+ actuator({
18829
+ id: "cover",
18830
+ 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.",
18831
+ deviceType: DeviceType.Cover,
18832
+ outputCap: "group-active",
18833
+ outputField: "active",
18834
+ member: {
18835
+ cap: "cover",
18836
+ fieldPath: "state"
18837
+ },
18838
+ activeWhen: [
18839
+ "open",
18840
+ "opening",
18841
+ "stopped"
18842
+ ],
18843
+ commandCaps: ["cover"]
18844
+ }),
18845
+ actuator({
18846
+ id: "valve",
18847
+ 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.",
18848
+ deviceType: DeviceType.Valve,
18849
+ outputCap: "group-active",
18850
+ outputField: "active",
18851
+ member: {
18852
+ cap: "valve",
18853
+ fieldPath: "state"
18854
+ },
18855
+ activeWhen: [
18856
+ "open",
18857
+ "opening",
18858
+ "stopped"
18859
+ ],
18860
+ commandCaps: ["valve"]
18861
+ }),
18862
+ actuator({
18863
+ id: "lock",
18864
+ 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.",
18865
+ deviceType: DeviceType.Lock,
18866
+ outputCap: "group-active",
18867
+ outputField: "active",
18868
+ member: {
18869
+ cap: "lock-control",
18870
+ fieldPath: "state"
18871
+ },
18872
+ activeWhen: ["locked"],
18873
+ commandCaps: ["lock-control"]
18874
+ }),
18875
+ actuator({
18876
+ id: "media-player",
18877
+ 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.",
18878
+ deviceType: DeviceType.MediaPlayer,
18879
+ outputCap: "group-active",
18880
+ outputField: "active",
18881
+ member: {
18882
+ cap: "media-player",
18883
+ fieldPath: "state"
18884
+ },
18885
+ activeWhen: ["playing", "buffering"],
18886
+ commandCaps: ["media-player"]
18887
+ }),
18888
+ actuator({
18889
+ id: "climate",
18890
+ 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.",
18891
+ deviceType: DeviceType.Thermostat,
18892
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18893
+ outputCap: "group-active",
18894
+ outputField: "active",
18895
+ member: {
18896
+ cap: "climate-control",
18897
+ fieldPath: "mode"
18898
+ },
18899
+ activeWhen: [
18900
+ "heat",
18901
+ "cool",
18902
+ "auto",
18903
+ "heat_cool",
18904
+ "fan_only",
18905
+ "dry"
18906
+ ],
18907
+ commandCaps: ["climate-control"]
18574
18908
  })
18575
18909
  ];
18576
18910
  function actuator(input) {
18577
18911
  return {
18578
- ...input,
18912
+ id: input.id,
18913
+ summary: input.summary,
18914
+ deviceType: input.deviceType,
18915
+ outputCap: input.outputCap,
18916
+ outputField: input.outputField,
18917
+ commandCaps: input.commandCaps,
18579
18918
  family: "actuator",
18580
18919
  role: void 0,
18581
18920
  memberDeviceType: input.deviceType,
18582
- outputField: "on",
18921
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18922
+ activeWhen: input.activeWhen,
18583
18923
  quantity: "none",
18584
18924
  baseUnit: void 0,
18585
18925
  aggregates: BINARY_AGGREGATES,
18586
18926
  defaultAggregate: "any",
18587
18927
  empty: "offline",
18588
- accept: [{
18589
- cap: "switch",
18590
- fieldPath: "on"
18591
- }],
18928
+ accept: [input.member],
18592
18929
  companions: [CHANGED]
18593
18930
  };
18594
18931
  }
18595
18932
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18596
18933
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18934
+ DeviceType.Camera;
18597
18935
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18598
18936
  /**
18599
18937
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43719,7 +44057,7 @@ var NetworkAccessStatusSchema = object({
43719
44057
  });
43720
44058
  /**
43721
44059
  * Optional, richer endpoint shape returned by providers that expose
43722
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44060
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43723
44061
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43724
44062
  * the originating provider config (mode + sourcePort) so the
43725
44063
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46406,7 +46744,20 @@ var NcRuleInputSchema = object({
46406
46744
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46407
46745
  * path does not run Zod defaults.
46408
46746
  */
46409
- groupingSec: number().int().min(5).max(60).optional()
46747
+ groupingSec: number().int().min(5).max(60).optional(),
46748
+ /**
46749
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46750
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46751
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46752
+ * same mark the Library writes, and records whose notification it was and
46753
+ * when. A channel with no buttons gets the same two choices as links.
46754
+ *
46755
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46756
+ * cap path): absent and `false` both mean off, which is what every rule
46757
+ * authored before this field meant. An editor turns it off by writing
46758
+ * `false`, so it needs no `clear` key.
46759
+ */
46760
+ askVerdict: boolean().optional()
46410
46761
  });
46411
46762
  /**
46412
46763
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57274,7 +57625,8 @@ var BATTERY_DEVICE_TYPES = [
57274
57625
  DeviceType.Switch,
57275
57626
  DeviceType.PetFeeder,
57276
57627
  DeviceType.Container,
57277
- DeviceType.Thermostat
57628
+ DeviceType.Thermostat,
57629
+ DeviceType.EventEmitter
57278
57630
  ];
57279
57631
  /** Generic Customize target for the percentage reading (D936). */
57280
57632
  var batteryCustomize = {
@@ -60134,7 +60486,17 @@ var groupCommandsCapability = {
60134
60486
  scope: "device",
60135
60487
  deviceNative: true,
60136
60488
  mode: "singleton",
60137
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60489
+ deviceTypes: [
60490
+ DeviceType.Switch,
60491
+ DeviceType.Light,
60492
+ DeviceType.Fan,
60493
+ DeviceType.Cover,
60494
+ DeviceType.Valve,
60495
+ DeviceType.Lock,
60496
+ DeviceType.MediaPlayer,
60497
+ DeviceType.Thermostat,
60498
+ DeviceType.Climate
60499
+ ],
60138
60500
  methods: {},
60139
60501
  status: {
60140
60502
  schema: GroupCommandsSchema,
@@ -60152,6 +60514,49 @@ var groupCommandsCapability = {
60152
60514
  history: "none"
60153
60515
  };
60154
60516
  /**
60517
+ * Whether a helper actuator group counts as active (D944): at least one
60518
+ * included member is, or every included member is. What "active" means is the
60519
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60520
+ * climate device is not off. A group of lights, switches and fans reports
60521
+ * `switch.on` instead; this cap is for the types whose own state is not a
60522
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60523
+ * empty included set takes the device offline, never `active: false`.
60524
+ */
60525
+ var GroupActiveSchema = object({
60526
+ active: boolean().meta({ label: "Active" }),
60527
+ /** Ms epoch when the slice was last updated. */
60528
+ lastChangedAt: number()
60529
+ });
60530
+ var groupActiveCapability = {
60531
+ name: "group-active",
60532
+ scope: "device",
60533
+ deviceNative: true,
60534
+ mode: "singleton",
60535
+ deviceTypes: [
60536
+ DeviceType.Cover,
60537
+ DeviceType.Valve,
60538
+ DeviceType.Lock,
60539
+ DeviceType.MediaPlayer,
60540
+ DeviceType.Climate,
60541
+ DeviceType.Thermostat
60542
+ ],
60543
+ methods: {},
60544
+ status: {
60545
+ schema: GroupActiveSchema,
60546
+ kind: "push"
60547
+ },
60548
+ runtimeState: GroupActiveSchema,
60549
+ /**
60550
+ * Runtime-state durability: **session** — recomputed from the members on the
60551
+ * next source event; a restored value would outlive the members it named.
60552
+ *
60553
+ * See `RuntimeStateDurability`. Enforced by
60554
+ * `scripts/check-runtime-state-durability.ts`.
60555
+ */
60556
+ durability: "session",
60557
+ history: "none"
60558
+ };
60559
+ /**
60155
60560
  * How many members of a helper group answered (D944). Counts are integers,
60156
60561
  * not measurements: zero included is a real count, never a stand-in reading.
60157
60562
  * The reading itself stays on the output capability. History is none — the
@@ -60182,7 +60587,14 @@ var groupStatusCapability = {
60182
60587
  deviceTypes: [
60183
60588
  DeviceType.Sensor,
60184
60589
  DeviceType.Switch,
60185
- DeviceType.Light
60590
+ DeviceType.Light,
60591
+ DeviceType.Fan,
60592
+ DeviceType.Cover,
60593
+ DeviceType.Valve,
60594
+ DeviceType.Lock,
60595
+ DeviceType.MediaPlayer,
60596
+ DeviceType.Thermostat,
60597
+ DeviceType.Climate
60186
60598
  ],
60187
60599
  methods: {},
60188
60600
  status: {
@@ -61455,7 +61867,14 @@ var lockControlCapability = {
61455
61867
  }),
61456
61868
  unlock: method(object({
61457
61869
  deviceId: number().int().nonnegative(),
61458
- code: string().min(1).optional()
61870
+ code: string().min(1).optional(),
61871
+ /**
61872
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61873
+ * with one call is refused unless the caller says it was confirmed. A
61874
+ * single lock ignores it. The refusal lives in the callee, so no
61875
+ * automation or API caller reaches the doors by skipping a dialog.
61876
+ */
61877
+ confirm: boolean().optional()
61459
61878
  }), _void(), {
61460
61879
  kind: "mutation",
61461
61880
  auth: "protected"
@@ -61492,6 +61911,44 @@ var lockControlCapability = {
61492
61911
  volatileStateFields: ["lastChangedAt"]
61493
61912
  };
61494
61913
  /**
61914
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
61915
+ * so dashboards keep one series; every other instantaneous reading lands here.
61916
+ * `value` is the time integral in the source quantity's accumulated base
61917
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
61918
+ */
61919
+ var MeterStatusSchema = object({
61920
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61921
+ lastFetchedAt: number()
61922
+ });
61923
+ var meterCapability = {
61924
+ name: "meter",
61925
+ scope: "device",
61926
+ deviceNative: true,
61927
+ mode: "singleton",
61928
+ deviceTypes: [DeviceType.Sensor],
61929
+ methods: {},
61930
+ status: {
61931
+ schema: MeterStatusSchema,
61932
+ kind: "push"
61933
+ },
61934
+ runtimeState: MeterStatusSchema,
61935
+ /**
61936
+ * Runtime-state durability: **restored** — the total is a cache of the
61937
+ * history integral. A restart shows it only until the history pass
61938
+ * recomputes the open period; it is not an in-memory buffer.
61939
+ *
61940
+ * See `RuntimeStateDurability`. Enforced by
61941
+ * `scripts/check-runtime-state-durability.ts`.
61942
+ */
61943
+ durability: "restored",
61944
+ history: { fields: { value: {
61945
+ kind: "counter",
61946
+ deadband: .001,
61947
+ minIntervalMs: 6e4
61948
+ } } },
61949
+ volatileStateFields: ["lastFetchedAt"]
61950
+ };
61951
+ /**
61495
61952
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61496
61953
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61497
61954
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64003,9 +64460,9 @@ var PowerMeterStatusSchema = object({
64003
64460
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64004
64461
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64005
64462
  /** Voltage in volts. */
64006
- volts: number().optional().meta(readingMeta("voltage")),
64463
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64007
64464
  /** Current in amperes. */
64008
- amps: number().optional().meta(readingMeta("current")),
64465
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64009
64466
  /** Apparent power in volt-amperes. */
64010
64467
  va: number().optional().meta(readingMeta("apparent-power")),
64011
64468
  /** Power factor (0..1) if reported. */
@@ -64013,12 +64470,74 @@ var PowerMeterStatusSchema = object({
64013
64470
  /** Ms epoch when the slice was last updated. */
64014
64471
  lastFetchedAt: number()
64015
64472
  });
64473
+ /**
64474
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64475
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64476
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64477
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64478
+ * camera and the like are left out: their draw is not what anyone meters.
64479
+ */
64480
+ var POWER_METER_DEVICE_TYPES = [
64481
+ DeviceType.Sensor,
64482
+ DeviceType.Switch,
64483
+ DeviceType.Light,
64484
+ DeviceType.Fan,
64485
+ DeviceType.Climate,
64486
+ DeviceType.Thermostat,
64487
+ DeviceType.Humidifier,
64488
+ DeviceType.WaterHeater,
64489
+ DeviceType.MediaPlayer,
64490
+ DeviceType.Washer,
64491
+ DeviceType.Dryer,
64492
+ DeviceType.Dishwasher,
64493
+ DeviceType.Vacuum,
64494
+ DeviceType.LawnMower,
64495
+ DeviceType.PetFeeder
64496
+ ];
64497
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64498
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64499
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64500
+ function powerTarget(id, unit) {
64501
+ return {
64502
+ id,
64503
+ cardinality: "scalar",
64504
+ vocabulary: {
64505
+ cap: "power-meter",
64506
+ stateField: id
64507
+ },
64508
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64509
+ apply: "add",
64510
+ path: id,
64511
+ sources: [{
64512
+ kind: "numeric",
64513
+ requiredUnit: unit,
64514
+ transforms: [{ kind: "identity" }]
64515
+ }],
64516
+ companions: [{
64517
+ kind: "clock",
64518
+ path: "lastFetchedAt",
64519
+ when: "always"
64520
+ }],
64521
+ sourceReport: { status: "assignment-status" },
64522
+ advancedExpression: true
64523
+ };
64524
+ }
64525
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64526
+ var powerMeterCustomize = {
64527
+ version: 1,
64528
+ targets: [
64529
+ powerTarget("watts", "W"),
64530
+ powerTarget("kwhTotal", "kWh"),
64531
+ powerTarget("volts", "V"),
64532
+ powerTarget("amps", "A")
64533
+ ]
64534
+ };
64016
64535
  var powerMeterCapability = {
64017
64536
  name: "power-meter",
64018
64537
  scope: "device",
64019
64538
  deviceNative: true,
64020
64539
  mode: "singleton",
64021
- deviceTypes: [DeviceType.Sensor],
64540
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64022
64541
  methods: {},
64023
64542
  status: {
64024
64543
  schema: PowerMeterStatusSchema,
@@ -64075,7 +64594,8 @@ var powerMeterCapability = {
64075
64594
  } },
64076
64595
  /** Clock fields: written, but excluded from the compare that decides
64077
64596
  * whether persisting is worth a SQLite commit. */
64078
- volatileStateFields: ["lastFetchedAt"]
64597
+ volatileStateFields: ["lastFetchedAt"],
64598
+ customize: powerMeterCustomize
64079
64599
  };
64080
64600
  /**
64081
64601
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64756,6 +65276,8 @@ var runningCustomize = {
64756
65276
  stateField: "running"
64757
65277
  },
64758
65278
  deviceTypes: [
65279
+ DeviceType.Washer,
65280
+ DeviceType.Dryer,
64759
65281
  DeviceType.Dishwasher,
64760
65282
  DeviceType.Vacuum,
64761
65283
  DeviceType.LawnMower,
@@ -67245,7 +67767,8 @@ var switchCapability = {
67245
67767
  deviceTypes: [
67246
67768
  DeviceType.Switch,
67247
67769
  DeviceType.Siren,
67248
- DeviceType.Light
67770
+ DeviceType.Light,
67771
+ DeviceType.Fan
67249
67772
  ],
67250
67773
  methods: { setState: method(object({
67251
67774
  deviceId: number(),
@@ -69458,8 +69981,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
69458
69981
  kind: "mutation",
69459
69982
  auth: "admin"
69460
69983
  });
69984
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69461
69985
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
69462
- 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;
69986
+ 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;
69463
69987
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
69464
69988
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
69465
69989
  new Set(CAP_NAMES);
@@ -69788,6 +70312,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
69788
70312
  featureProbe: featureProbeCapability,
69789
70313
  flood: floodCapability,
69790
70314
  gas: gasCapability,
70315
+ groupActive: groupActiveCapability,
69791
70316
  groupCommands: groupCommandsCapability,
69792
70317
  groupStatus: groupStatusCapability,
69793
70318
  heatingValve: heatingValveCapability,
@@ -69799,6 +70324,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
69799
70324
  lawnMowerControl: lawnMowerControlCapability,
69800
70325
  lockControl: lockControlCapability,
69801
70326
  mediaPlayer: mediaPlayerCapability,
70327
+ meter: meterCapability,
69802
70328
  motion: motionCapability,
69803
70329
  motionTrigger: motionTriggerCapability,
69804
70330
  motionZones: motionZonesCapability,
@@ -70575,7 +71101,7 @@ var DeclaredDevices = class {
70575
71101
  return removed;
70576
71102
  }
70577
71103
  };
70578
- 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;
71104
+ 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;
70579
71105
  new Set(Object.values(DeviceType));
70580
71106
  Object.freeze({
70581
71107
  "accessories.getStatus": {
@@ -73798,6 +74324,13 @@ Object.freeze({
73798
74324
  access: "view",
73799
74325
  role: "viewer"
73800
74326
  },
74327
+ "groupActive.getStatus": {
74328
+ capName: "group-active",
74329
+ capScope: "device",
74330
+ addonId: null,
74331
+ access: "view",
74332
+ role: "viewer"
74333
+ },
73801
74334
  "groupCommands.getStatus": {
73802
74335
  capName: "group-commands",
73803
74336
  capScope: "device",
@@ -74764,6 +75297,13 @@ Object.freeze({
74764
75297
  access: "create",
74765
75298
  role: "admin"
74766
75299
  },
75300
+ "meter.getStatus": {
75301
+ capName: "meter",
75302
+ capScope: "device",
75303
+ addonId: null,
75304
+ access: "view",
75305
+ role: "viewer"
75306
+ },
74767
75307
  "metricsProvider.collectSnapshot": {
74768
75308
  capName: "metrics-provider",
74769
75309
  capScope: "system",
@@ -82862,7 +83402,39 @@ var APPLIANCE_CAP_VOCABULARY = {
82862
83402
  phrase: t("When {device} finishes", "Quando {device} finisce"),
82863
83403
  icon: "square"
82864
83404
  }
82865
- }
83405
+ },
83406
+ overrides: { byType: {
83407
+ [DeviceType.Washer]: {
83408
+ state: { running: {
83409
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
83410
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
83411
+ } },
83412
+ events: {
83413
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
83414
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
83415
+ }
83416
+ },
83417
+ [DeviceType.Dryer]: {
83418
+ state: { running: {
83419
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
83420
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
83421
+ } },
83422
+ events: {
83423
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
83424
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
83425
+ }
83426
+ },
83427
+ [DeviceType.Dishwasher]: {
83428
+ state: { running: {
83429
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
83430
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
83431
+ } },
83432
+ events: {
83433
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
83434
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
83435
+ }
83436
+ }
83437
+ } }
82866
83438
  },
82867
83439
  update: {
82868
83440
  scope: "device",
@@ -83634,6 +84206,10 @@ var SENSOR_CAP_VOCABULARY = {
83634
84206
  icon: "flame"
83635
84207
  }]
83636
84208
  },
84209
+ "group-active": {
84210
+ scope: "device",
84211
+ noun: t("Group state", "Stato del gruppo")
84212
+ },
83637
84213
  "group-commands": {
83638
84214
  scope: "device",
83639
84215
  noun: t("Group command", "Comando di gruppo")
@@ -83690,6 +84266,17 @@ var SENSOR_CAP_VOCABULARY = {
83690
84266
  }],
83691
84267
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
83692
84268
  },
84269
+ meter: {
84270
+ scope: "device",
84271
+ noun: t("Meter", "Contatore"),
84272
+ state: [{
84273
+ kind: "numeric",
84274
+ field: "value",
84275
+ quantity: t("the total", "il totale"),
84276
+ label: t("Total", "Totale"),
84277
+ icon: "gauge"
84278
+ }]
84279
+ },
83693
84280
  "numeric-sensor": {
83694
84281
  scope: "device",
83695
84282
  noun: t("Sensor", "Sensore"),
@@ -84162,8 +84749,47 @@ function projectAction(cap, action) {
84162
84749
  };
84163
84750
  }
84164
84751
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
84165
- 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;
84752
+ 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;
84166
84753
  DeviceFeature.BatteryOperated;
84754
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
84755
+ 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.";
84756
+ 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.";
84757
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
84758
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
84759
+ 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.";
84760
+ function withheld(reason) {
84761
+ return {
84762
+ [DeviceType.Washer]: {
84763
+ exported: false,
84764
+ reason
84765
+ },
84766
+ [DeviceType.Dryer]: {
84767
+ exported: false,
84768
+ reason
84769
+ },
84770
+ [DeviceType.Dishwasher]: {
84771
+ exported: false,
84772
+ reason
84773
+ }
84774
+ };
84775
+ }
84776
+ function offered(received) {
84777
+ return {
84778
+ [DeviceType.Washer]: {
84779
+ exported: true,
84780
+ as: received
84781
+ },
84782
+ [DeviceType.Dryer]: {
84783
+ exported: true,
84784
+ as: received
84785
+ },
84786
+ [DeviceType.Dishwasher]: {
84787
+ exported: true,
84788
+ as: received
84789
+ }
84790
+ };
84791
+ }
84792
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
84167
84793
  Object.freeze({
84168
84794
  "accessories.getStatus": [{
84169
84795
  name: "deviceId",
@@ -85130,6 +85756,11 @@ Object.freeze({
85130
85756
  form: "single",
85131
85757
  optional: false
85132
85758
  }],
85759
+ "groupActive.getStatus": [{
85760
+ name: "deviceId",
85761
+ form: "single",
85762
+ optional: false
85763
+ }],
85133
85764
  "groupCommands.getStatus": [{
85134
85765
  name: "deviceId",
85135
85766
  form: "single",
@@ -85340,6 +85971,11 @@ Object.freeze({
85340
85971
  form: "single",
85341
85972
  optional: false
85342
85973
  }],
85974
+ "meter.getStatus": [{
85975
+ name: "deviceId",
85976
+ form: "single",
85977
+ optional: false
85978
+ }],
85343
85979
  "motion.getStatus": [{
85344
85980
  name: "deviceId",
85345
85981
  form: "single",
@@ -86947,7 +87583,6 @@ Object.freeze({
86947
87583
  "network-access": "ingress",
86948
87584
  "smtp-provider": "email"
86949
87585
  });
86950
- DeviceType.Camera;
86951
87586
  /**
86952
87587
  * A saved Customize assignment (D936). The schema is the type: callers use
86953
87588
  * `z.infer`, they do not restate the shape.