@camstack/addon-provider-dreame 0.2.157 → 0.2.158

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.mjs CHANGED
@@ -5484,7 +5484,7 @@ var ZodIssueCode$1 = {
5484
5484
  var ZodFirstPartyTypeKind$1;
5485
5485
  ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
5486
5486
  //#endregion
5487
- //#region ../types/dist/sleep-bykKrTgu.mjs
5487
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5488
5488
  /**
5489
5489
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5490
5490
  * window to float samples (D455).
@@ -8677,6 +8677,7 @@ var CAP_NAMES = Object.freeze([
8677
8677
  "filesystem-browse",
8678
8678
  "flood",
8679
8679
  "gas",
8680
+ "group-active",
8680
8681
  "group-commands",
8681
8682
  "group-status",
8682
8683
  "heating-valve",
@@ -8699,6 +8700,7 @@ var CAP_NAMES = Object.freeze([
8699
8700
  "login-method",
8700
8701
  "media-player",
8701
8702
  "mesh-network",
8703
+ "meter",
8702
8704
  "metrics-provider",
8703
8705
  "model-convert",
8704
8706
  "model-distributor",
@@ -9497,6 +9499,10 @@ Object.freeze({
9497
9499
  "path": "detected",
9498
9500
  "valueType": "boolean"
9499
9501
  }],
9502
+ "group-active": [{
9503
+ "path": "active",
9504
+ "valueType": "boolean"
9505
+ }],
9500
9506
  "group-status": [
9501
9507
  {
9502
9508
  "path": "included",
@@ -9756,6 +9762,10 @@ Object.freeze({
9756
9762
  ]
9757
9763
  }
9758
9764
  ],
9765
+ "meter": [{
9766
+ "path": "value",
9767
+ "valueType": "number"
9768
+ }],
9759
9769
  "motion": [
9760
9770
  {
9761
9771
  "path": "detected",
@@ -10513,7 +10523,7 @@ function userError(code, params, englishFallback) {
10513
10523
  return new CamstackError(code, params, englishFallback);
10514
10524
  }
10515
10525
  //#endregion
10516
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10526
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10517
10527
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10518
10528
  DeviceType["Camera"] = "camera";
10519
10529
  DeviceType["Hub"] = "hub";
@@ -10607,8 +10617,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10607
10617
  DeviceType["PetFeeder"] = "pet-feeder";
10608
10618
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10609
10619
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10610
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10620
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10621
+ * A plug-built dishwasher carries running-state and power instead. */
10611
10622
  DeviceType["Dishwasher"] = "dishwasher";
10623
+ /** Washing machine. A plug-built one is running while its power stays
10624
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10625
+ DeviceType["Washer"] = "washer";
10626
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10627
+ DeviceType["Dryer"] = "dryer";
10612
10628
  return DeviceType;
10613
10629
  }({});
10614
10630
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10866,7 +10882,7 @@ function errMsg(err) {
10866
10882
  return String(err);
10867
10883
  }
10868
10884
  //#endregion
10869
- //#region ../types/dist/composition-OhpuespA.mjs
10885
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10870
10886
  /**
10871
10887
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10872
10888
  *
@@ -11181,6 +11197,13 @@ var table = {
11181
11197
  apply: () => {
11182
11198
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11183
11199
  }
11200
+ },
11201
+ schmitt: {
11202
+ minArgs: 3,
11203
+ maxArgs: 5,
11204
+ apply: () => {
11205
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11206
+ }
11184
11207
  }
11185
11208
  };
11186
11209
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11622,6 +11645,99 @@ function validateExpressionSource(src) {
11622
11645
  return null;
11623
11646
  }
11624
11647
  /**
11648
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11649
+ *
11650
+ * Standby of the control board is under 5 W; a motor or a heater is far
11651
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11652
+ * a cycle, so running starts only after 30 s above the line.
11653
+ *
11654
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11655
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11656
+ * report "finished" in the middle of the program, so the stop dwell is
11657
+ * 10 minutes on every type. The number is stored per type so one machine
11658
+ * can move later without moving the others.
11659
+ */
11660
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11661
+ var APPLIANCE_KINDS = [
11662
+ "washer",
11663
+ "dryer",
11664
+ "dishwasher"
11665
+ ];
11666
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11667
+ /**
11668
+ * Statistics and integrals over a history read (D944).
11669
+ *
11670
+ * Pure: the same points always give the same answer, so a restart recomputes
11671
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11672
+ * never the mean of the samples. A hole with no held value is not integrated
11673
+ * as zero. A truncated read is not published.
11674
+ */
11675
+ var STATISTIC_STATS = [
11676
+ "min",
11677
+ "max",
11678
+ "mean",
11679
+ "sum",
11680
+ "count",
11681
+ "change"
11682
+ ];
11683
+ /**
11684
+ * The range a statistics or integral helper asks history for (D944).
11685
+ *
11686
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11687
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11688
+ * is strictly longer than the longest that range can be. Forever qualifies.
11689
+ * Equal to a tier's retention is a refusal, not a short answer.
11690
+ */
11691
+ var MINUTE_MS = 6e4;
11692
+ var HOUR_MS = 60 * MINUTE_MS;
11693
+ var DAY_MS = 24 * HOUR_MS;
11694
+ var ROLLING_SPANS = [
11695
+ "1h",
11696
+ "24h",
11697
+ "2d",
11698
+ "7d",
11699
+ "30d",
11700
+ "custom"
11701
+ ];
11702
+ var CALENDAR_PERIODS = [
11703
+ "today",
11704
+ "yesterday",
11705
+ "this-week",
11706
+ "this-month"
11707
+ ];
11708
+ var RESET_PERIODS = [
11709
+ "never",
11710
+ "daily",
11711
+ "weekly",
11712
+ "monthly"
11713
+ ];
11714
+ 5 * MINUTE_MS;
11715
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11716
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11717
+ var rollingWindowObject = object({
11718
+ kind: literal("rolling"),
11719
+ span: _enum(ROLLING_SPANS),
11720
+ customMinutes: number().int().min(5).optional()
11721
+ }).check((payload) => {
11722
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11723
+ code: "custom",
11724
+ message: "a custom range needs a duration in minutes",
11725
+ path: ["customMinutes"],
11726
+ input: payload.value
11727
+ });
11728
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11729
+ code: "custom",
11730
+ message: "only a custom range carries a duration",
11731
+ path: ["customMinutes"],
11732
+ input: payload.value
11733
+ });
11734
+ });
11735
+ var RollingWindowSchema = rollingWindowObject;
11736
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11737
+ kind: literal("calendar"),
11738
+ period: _enum(CALENDAR_PERIODS)
11739
+ })]);
11740
+ /**
11625
11741
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11626
11742
  * id. Split out so helper schemas can name it without a cycle through
11627
11743
  * `composition.ts` (D659).
@@ -11647,7 +11763,13 @@ var GROUP_TEMPLATE_IDS = [
11647
11763
  "occupancy",
11648
11764
  "binary",
11649
11765
  "switch",
11650
- "light"
11766
+ "light",
11767
+ "fan",
11768
+ "cover",
11769
+ "valve",
11770
+ "lock",
11771
+ "media-player",
11772
+ "climate"
11651
11773
  ];
11652
11774
  var NUMERIC_AGGREGATES = [
11653
11775
  "mean",
@@ -11677,14 +11799,73 @@ var HelperMemberSchema = object({
11677
11799
  cap: string().min(1),
11678
11800
  fieldPath: string().min(1)
11679
11801
  });
11680
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11681
- kind: literal("group"),
11682
- templateId: GroupTemplateIdSchema,
11683
- aggregate: AggregateReducerSchema,
11684
- members: array(HelperMemberSchema).min(1).max(64),
11685
- /** Actuator groups only. Readings leave this unset. */
11686
- active: ActiveCriterionSchema.optional()
11687
- })]);
11802
+ var HelperSpecSchema = discriminatedUnion("kind", [
11803
+ object({
11804
+ kind: literal("group"),
11805
+ templateId: GroupTemplateIdSchema,
11806
+ aggregate: AggregateReducerSchema,
11807
+ members: array(HelperMemberSchema).min(1).max(64),
11808
+ /** Actuator groups only. Readings leave this unset. */
11809
+ active: ActiveCriterionSchema.optional()
11810
+ }),
11811
+ object({
11812
+ kind: literal("appliance"),
11813
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11814
+ appliance: _enum(APPLIANCE_KINDS),
11815
+ thresholdWatts: number().positive(),
11816
+ startDwellMs: number().int().nonnegative(),
11817
+ stopDwellMs: number().int().nonnegative(),
11818
+ member: HelperMemberSchema
11819
+ }),
11820
+ object({
11821
+ kind: literal("statistic"),
11822
+ stat: _enum(STATISTIC_STATS),
11823
+ window: StatisticWindowSchema,
11824
+ source: HelperMemberSchema
11825
+ }),
11826
+ object({
11827
+ kind: literal("integral"),
11828
+ reset: _enum(RESET_PERIODS),
11829
+ output: _enum(["energy", "meter"]),
11830
+ source: HelperMemberSchema
11831
+ }),
11832
+ object({
11833
+ kind: literal("threshold"),
11834
+ source: HelperMemberSchema,
11835
+ high: number(),
11836
+ low: number(),
11837
+ onForMs: number().int().nonnegative(),
11838
+ offForMs: number().int().nonnegative()
11839
+ }),
11840
+ object({
11841
+ kind: literal("arithmetic"),
11842
+ op: _enum([
11843
+ "sum",
11844
+ "difference",
11845
+ "ratio"
11846
+ ]),
11847
+ inputs: array(HelperMemberSchema).min(2).max(64)
11848
+ }),
11849
+ object({
11850
+ kind: literal("expression"),
11851
+ expr: string().min(1),
11852
+ inputs: array(object({
11853
+ name: string().min(1),
11854
+ member: HelperMemberSchema
11855
+ })).min(1).max(64),
11856
+ output: _enum(["number", "boolean"])
11857
+ }),
11858
+ object({
11859
+ kind: literal("derivative"),
11860
+ window: RollingWindowSchema,
11861
+ per: _enum([
11862
+ "second",
11863
+ "minute",
11864
+ "hour"
11865
+ ]),
11866
+ source: HelperMemberSchema
11867
+ })
11868
+ ]);
11688
11869
  /** A composed device's stableId is this prefix plus the block id. */
11689
11870
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11690
11871
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11745,6 +11926,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11745
11926
  "all"
11746
11927
  ]),
11747
11928
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11929
+ /**
11930
+ * Set when the reads are an enum state, not a yes/no: the listed states
11931
+ * count as active (a cover is `open`). A state outside the list is inactive;
11932
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11933
+ */
11934
+ activeWhen: array(string().min(1)).min(1).optional(),
11748
11935
  /** `value` is the reading; the others are the member counts. */
11749
11936
  publish: _enum([
11750
11937
  "value",
@@ -11758,6 +11945,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11758
11945
  "omit",
11759
11946
  "offline"
11760
11947
  ])
11948
+ }),
11949
+ object({
11950
+ kind: literal("series"),
11951
+ read: CompositionFieldReadSchema,
11952
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11953
+ publish: _enum([
11954
+ "value",
11955
+ "included",
11956
+ "excluded",
11957
+ "total"
11958
+ ]),
11959
+ /**
11960
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11961
+ * device unseeded until history answers, so a restart cannot publish 0.
11962
+ */
11963
+ empty: _enum([
11964
+ "null",
11965
+ "omit",
11966
+ "offline"
11967
+ ])
11761
11968
  })
11762
11969
  ]);
11763
11970
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -16917,7 +17124,22 @@ var BrokerProviderInfoSchema = object({
16917
17124
  */
16918
17125
  interactiveConnectPath: string().min(1).optional(),
16919
17126
  /** Relative hub path to disconnect the linked account (same popup pattern). */
16920
- interactiveDisconnectPath: string().min(1).optional()
17127
+ interactiveDisconnectPath: string().min(1).optional(),
17128
+ /**
17129
+ * The kind signs in through a server-held interactive session instead of
17130
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17131
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17132
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17133
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17134
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17135
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17136
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17137
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17138
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17139
+ * offers it as the default path; the fields the session fills are
17140
+ * marked `filledBySignIn` in the kind's settings schema.
17141
+ */
17142
+ signIn: object({ basePath: string().min(1) }).optional()
16921
17143
  }))
16922
17144
  });
16923
17145
  var ListInputSchema = object({
@@ -18022,7 +18244,8 @@ var CompositionProblemSchema = object({
18022
18244
  "native-capability-replace",
18023
18245
  "mixed-quantity",
18024
18246
  "helper-mismatch",
18025
- "member-constraint"
18247
+ "member-constraint",
18248
+ "retention"
18026
18249
  ]),
18027
18250
  path: string(),
18028
18251
  message: string()
@@ -18256,13 +18479,17 @@ Object.freeze({
18256
18479
  latchedAt: {
18257
18480
  kind: "fixed",
18258
18481
  result: ["number", "null"]
18482
+ },
18483
+ schmitt: {
18484
+ kind: "fixed",
18485
+ result: ["boolean", "null"]
18259
18486
  }
18260
18487
  });
18261
18488
  /**
18262
18489
  * One catalog row per base reading a group helper can build (D944 §3).
18263
18490
  * Data, not a form default written into the block.
18264
18491
  */
18265
- var NOW = {
18492
+ var NOW$2 = {
18266
18493
  fieldPath: "lastFetchedAt",
18267
18494
  expr: "now"
18268
18495
  };
@@ -18276,6 +18503,8 @@ function numeric(input) {
18276
18503
  family: "numeric",
18277
18504
  deviceType: DeviceType.Sensor,
18278
18505
  memberDeviceType: DeviceType.Sensor,
18506
+ memberDeviceTypes: [DeviceType.Sensor],
18507
+ activeWhen: void 0,
18279
18508
  commandCaps: [],
18280
18509
  baseUnit: baseUnitOf(input.quantity),
18281
18510
  aggregates: NUMERIC_AGGREGATES,
@@ -18291,6 +18520,8 @@ function binary(input) {
18291
18520
  family: "binary",
18292
18521
  deviceType: DeviceType.Sensor,
18293
18522
  memberDeviceType: DeviceType.Sensor,
18523
+ memberDeviceTypes: [DeviceType.Sensor],
18524
+ activeWhen: void 0,
18294
18525
  commandCaps: [],
18295
18526
  quantity: "none",
18296
18527
  baseUnit: void 0,
@@ -18308,7 +18539,7 @@ var GROUP_TEMPLATES = [
18308
18539
  quantity: "temperature",
18309
18540
  defaultAggregate: "mean",
18310
18541
  empty: "null",
18311
- companions: [NOW]
18542
+ companions: [NOW$2]
18312
18543
  }),
18313
18544
  numeric({
18314
18545
  id: "humidity",
@@ -18319,7 +18550,7 @@ var GROUP_TEMPLATES = [
18319
18550
  quantity: "humidity",
18320
18551
  defaultAggregate: "mean",
18321
18552
  empty: "null",
18322
- companions: [NOW]
18553
+ companions: [NOW$2]
18323
18554
  }),
18324
18555
  numeric({
18325
18556
  id: "pressure",
@@ -18330,7 +18561,7 @@ var GROUP_TEMPLATES = [
18330
18561
  quantity: "pressure",
18331
18562
  defaultAggregate: "mean",
18332
18563
  empty: "null",
18333
- companions: [NOW]
18564
+ companions: [NOW$2]
18334
18565
  }),
18335
18566
  numeric({
18336
18567
  id: "illuminance",
@@ -18341,7 +18572,7 @@ var GROUP_TEMPLATES = [
18341
18572
  quantity: "illuminance",
18342
18573
  defaultAggregate: "mean",
18343
18574
  empty: "null",
18344
- companions: [NOW]
18575
+ companions: [NOW$2]
18345
18576
  }),
18346
18577
  numeric({
18347
18578
  id: "power",
@@ -18352,7 +18583,7 @@ var GROUP_TEMPLATES = [
18352
18583
  quantity: "power",
18353
18584
  defaultAggregate: "sum",
18354
18585
  empty: "omit",
18355
- companions: [NOW]
18586
+ companions: [NOW$2]
18356
18587
  }),
18357
18588
  numeric({
18358
18589
  id: "energy",
@@ -18363,7 +18594,7 @@ var GROUP_TEMPLATES = [
18363
18594
  quantity: "energy",
18364
18595
  defaultAggregate: "sum",
18365
18596
  empty: "omit",
18366
- companions: [NOW]
18597
+ companions: [NOW$2]
18367
18598
  }),
18368
18599
  numeric({
18369
18600
  id: "battery",
@@ -18398,7 +18629,7 @@ var GROUP_TEMPLATES = [
18398
18629
  quantity: "device",
18399
18630
  defaultAggregate: "mean",
18400
18631
  empty: "null",
18401
- companions: [NOW]
18632
+ companions: [NOW$2]
18402
18633
  }),
18403
18634
  binary({
18404
18635
  id: "motion",
@@ -18492,6 +18723,11 @@ var GROUP_TEMPLATES = [
18492
18723
  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.",
18493
18724
  deviceType: DeviceType.Switch,
18494
18725
  outputCap: "switch",
18726
+ outputField: "on",
18727
+ member: {
18728
+ cap: "switch",
18729
+ fieldPath: "on"
18730
+ },
18495
18731
  commandCaps: ["switch"]
18496
18732
  }),
18497
18733
  actuator({
@@ -18499,34 +18735,136 @@ var GROUP_TEMPLATES = [
18499
18735
  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.",
18500
18736
  deviceType: DeviceType.Light,
18501
18737
  outputCap: "switch",
18738
+ outputField: "on",
18739
+ member: {
18740
+ cap: "switch",
18741
+ fieldPath: "on"
18742
+ },
18502
18743
  commandCaps: [
18503
18744
  "switch",
18504
18745
  "brightness",
18505
18746
  "color"
18506
18747
  ]
18748
+ }),
18749
+ actuator({
18750
+ id: "fan",
18751
+ 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.",
18752
+ deviceType: DeviceType.Fan,
18753
+ outputCap: "switch",
18754
+ outputField: "on",
18755
+ member: {
18756
+ cap: "switch",
18757
+ fieldPath: "on"
18758
+ },
18759
+ commandCaps: ["switch", "fan-control"]
18760
+ }),
18761
+ actuator({
18762
+ id: "cover",
18763
+ 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.",
18764
+ deviceType: DeviceType.Cover,
18765
+ outputCap: "group-active",
18766
+ outputField: "active",
18767
+ member: {
18768
+ cap: "cover",
18769
+ fieldPath: "state"
18770
+ },
18771
+ activeWhen: [
18772
+ "open",
18773
+ "opening",
18774
+ "stopped"
18775
+ ],
18776
+ commandCaps: ["cover"]
18777
+ }),
18778
+ actuator({
18779
+ id: "valve",
18780
+ 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.",
18781
+ deviceType: DeviceType.Valve,
18782
+ outputCap: "group-active",
18783
+ outputField: "active",
18784
+ member: {
18785
+ cap: "valve",
18786
+ fieldPath: "state"
18787
+ },
18788
+ activeWhen: [
18789
+ "open",
18790
+ "opening",
18791
+ "stopped"
18792
+ ],
18793
+ commandCaps: ["valve"]
18794
+ }),
18795
+ actuator({
18796
+ id: "lock",
18797
+ 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.",
18798
+ deviceType: DeviceType.Lock,
18799
+ outputCap: "group-active",
18800
+ outputField: "active",
18801
+ member: {
18802
+ cap: "lock-control",
18803
+ fieldPath: "state"
18804
+ },
18805
+ activeWhen: ["locked"],
18806
+ commandCaps: ["lock-control"]
18807
+ }),
18808
+ actuator({
18809
+ id: "media-player",
18810
+ 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.",
18811
+ deviceType: DeviceType.MediaPlayer,
18812
+ outputCap: "group-active",
18813
+ outputField: "active",
18814
+ member: {
18815
+ cap: "media-player",
18816
+ fieldPath: "state"
18817
+ },
18818
+ activeWhen: ["playing", "buffering"],
18819
+ commandCaps: ["media-player"]
18820
+ }),
18821
+ actuator({
18822
+ id: "climate",
18823
+ 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.",
18824
+ deviceType: DeviceType.Thermostat,
18825
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18826
+ outputCap: "group-active",
18827
+ outputField: "active",
18828
+ member: {
18829
+ cap: "climate-control",
18830
+ fieldPath: "mode"
18831
+ },
18832
+ activeWhen: [
18833
+ "heat",
18834
+ "cool",
18835
+ "auto",
18836
+ "heat_cool",
18837
+ "fan_only",
18838
+ "dry"
18839
+ ],
18840
+ commandCaps: ["climate-control"]
18507
18841
  })
18508
18842
  ];
18509
18843
  function actuator(input) {
18510
18844
  return {
18511
- ...input,
18845
+ id: input.id,
18846
+ summary: input.summary,
18847
+ deviceType: input.deviceType,
18848
+ outputCap: input.outputCap,
18849
+ outputField: input.outputField,
18850
+ commandCaps: input.commandCaps,
18512
18851
  family: "actuator",
18513
18852
  role: void 0,
18514
18853
  memberDeviceType: input.deviceType,
18515
- outputField: "on",
18854
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18855
+ activeWhen: input.activeWhen,
18516
18856
  quantity: "none",
18517
18857
  baseUnit: void 0,
18518
18858
  aggregates: BINARY_AGGREGATES,
18519
18859
  defaultAggregate: "any",
18520
18860
  empty: "offline",
18521
- accept: [{
18522
- cap: "switch",
18523
- fieldPath: "on"
18524
- }],
18861
+ accept: [input.member],
18525
18862
  companions: [CHANGED]
18526
18863
  };
18527
18864
  }
18528
18865
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18529
18866
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18867
+ DeviceType.Camera;
18530
18868
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18531
18869
  /**
18532
18870
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43836,7 +44174,7 @@ var NetworkAccessStatusSchema = object({
43836
44174
  });
43837
44175
  /**
43838
44176
  * Optional, richer endpoint shape returned by providers that expose
43839
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44177
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43840
44178
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43841
44179
  * the originating provider config (mode + sourcePort) so the
43842
44180
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46523,7 +46861,20 @@ var NcRuleInputSchema = object({
46523
46861
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46524
46862
  * path does not run Zod defaults.
46525
46863
  */
46526
- groupingSec: number().int().min(5).max(60).optional()
46864
+ groupingSec: number().int().min(5).max(60).optional(),
46865
+ /**
46866
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46867
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46868
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46869
+ * same mark the Library writes, and records whose notification it was and
46870
+ * when. A channel with no buttons gets the same two choices as links.
46871
+ *
46872
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46873
+ * cap path): absent and `false` both mean off, which is what every rule
46874
+ * authored before this field meant. An editor turns it off by writing
46875
+ * `false`, so it needs no `clear` key.
46876
+ */
46877
+ askVerdict: boolean().optional()
46527
46878
  });
46528
46879
  /**
46529
46880
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57243,7 +57594,8 @@ var BATTERY_DEVICE_TYPES = [
57243
57594
  DeviceType.Switch,
57244
57595
  DeviceType.PetFeeder,
57245
57596
  DeviceType.Container,
57246
- DeviceType.Thermostat
57597
+ DeviceType.Thermostat,
57598
+ DeviceType.EventEmitter
57247
57599
  ];
57248
57600
  /** Generic Customize target for the percentage reading (D936). */
57249
57601
  var batteryCustomize = {
@@ -60132,7 +60484,17 @@ var groupCommandsCapability = {
60132
60484
  scope: "device",
60133
60485
  deviceNative: true,
60134
60486
  mode: "singleton",
60135
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60487
+ deviceTypes: [
60488
+ DeviceType.Switch,
60489
+ DeviceType.Light,
60490
+ DeviceType.Fan,
60491
+ DeviceType.Cover,
60492
+ DeviceType.Valve,
60493
+ DeviceType.Lock,
60494
+ DeviceType.MediaPlayer,
60495
+ DeviceType.Thermostat,
60496
+ DeviceType.Climate
60497
+ ],
60136
60498
  methods: {},
60137
60499
  status: {
60138
60500
  schema: GroupCommandsSchema,
@@ -60150,6 +60512,49 @@ var groupCommandsCapability = {
60150
60512
  history: "none"
60151
60513
  };
60152
60514
  /**
60515
+ * Whether a helper actuator group counts as active (D944): at least one
60516
+ * included member is, or every included member is. What "active" means is the
60517
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60518
+ * climate device is not off. A group of lights, switches and fans reports
60519
+ * `switch.on` instead; this cap is for the types whose own state is not a
60520
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60521
+ * empty included set takes the device offline, never `active: false`.
60522
+ */
60523
+ var GroupActiveSchema = object({
60524
+ active: boolean().meta({ label: "Active" }),
60525
+ /** Ms epoch when the slice was last updated. */
60526
+ lastChangedAt: number()
60527
+ });
60528
+ var groupActiveCapability = {
60529
+ name: "group-active",
60530
+ scope: "device",
60531
+ deviceNative: true,
60532
+ mode: "singleton",
60533
+ deviceTypes: [
60534
+ DeviceType.Cover,
60535
+ DeviceType.Valve,
60536
+ DeviceType.Lock,
60537
+ DeviceType.MediaPlayer,
60538
+ DeviceType.Climate,
60539
+ DeviceType.Thermostat
60540
+ ],
60541
+ methods: {},
60542
+ status: {
60543
+ schema: GroupActiveSchema,
60544
+ kind: "push"
60545
+ },
60546
+ runtimeState: GroupActiveSchema,
60547
+ /**
60548
+ * Runtime-state durability: **session** — recomputed from the members on the
60549
+ * next source event; a restored value would outlive the members it named.
60550
+ *
60551
+ * See `RuntimeStateDurability`. Enforced by
60552
+ * `scripts/check-runtime-state-durability.ts`.
60553
+ */
60554
+ durability: "session",
60555
+ history: "none"
60556
+ };
60557
+ /**
60153
60558
  * How many members of a helper group answered (D944). Counts are integers,
60154
60559
  * not measurements: zero included is a real count, never a stand-in reading.
60155
60560
  * The reading itself stays on the output capability. History is none — the
@@ -60180,7 +60585,14 @@ var groupStatusCapability = {
60180
60585
  deviceTypes: [
60181
60586
  DeviceType.Sensor,
60182
60587
  DeviceType.Switch,
60183
- DeviceType.Light
60588
+ DeviceType.Light,
60589
+ DeviceType.Fan,
60590
+ DeviceType.Cover,
60591
+ DeviceType.Valve,
60592
+ DeviceType.Lock,
60593
+ DeviceType.MediaPlayer,
60594
+ DeviceType.Thermostat,
60595
+ DeviceType.Climate
60184
60596
  ],
60185
60597
  methods: {},
60186
60598
  status: {
@@ -61453,7 +61865,14 @@ var lockControlCapability = {
61453
61865
  }),
61454
61866
  unlock: method(object({
61455
61867
  deviceId: number().int().nonnegative(),
61456
- code: string().min(1).optional()
61868
+ code: string().min(1).optional(),
61869
+ /**
61870
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61871
+ * with one call is refused unless the caller says it was confirmed. A
61872
+ * single lock ignores it. The refusal lives in the callee, so no
61873
+ * automation or API caller reaches the doors by skipping a dialog.
61874
+ */
61875
+ confirm: boolean().optional()
61457
61876
  }), _void(), {
61458
61877
  kind: "mutation",
61459
61878
  auth: "protected"
@@ -61490,6 +61909,44 @@ var lockControlCapability = {
61490
61909
  volatileStateFields: ["lastChangedAt"]
61491
61910
  };
61492
61911
  /**
61912
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
61913
+ * so dashboards keep one series; every other instantaneous reading lands here.
61914
+ * `value` is the time integral in the source quantity's accumulated base
61915
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
61916
+ */
61917
+ var MeterStatusSchema = object({
61918
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61919
+ lastFetchedAt: number()
61920
+ });
61921
+ var meterCapability = {
61922
+ name: "meter",
61923
+ scope: "device",
61924
+ deviceNative: true,
61925
+ mode: "singleton",
61926
+ deviceTypes: [DeviceType.Sensor],
61927
+ methods: {},
61928
+ status: {
61929
+ schema: MeterStatusSchema,
61930
+ kind: "push"
61931
+ },
61932
+ runtimeState: MeterStatusSchema,
61933
+ /**
61934
+ * Runtime-state durability: **restored** — the total is a cache of the
61935
+ * history integral. A restart shows it only until the history pass
61936
+ * recomputes the open period; it is not an in-memory buffer.
61937
+ *
61938
+ * See `RuntimeStateDurability`. Enforced by
61939
+ * `scripts/check-runtime-state-durability.ts`.
61940
+ */
61941
+ durability: "restored",
61942
+ history: { fields: { value: {
61943
+ kind: "counter",
61944
+ deadband: .001,
61945
+ minIntervalMs: 6e4
61946
+ } } },
61947
+ volatileStateFields: ["lastFetchedAt"]
61948
+ };
61949
+ /**
61493
61950
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61494
61951
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61495
61952
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64149,9 +64606,9 @@ var PowerMeterStatusSchema = object({
64149
64606
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64150
64607
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64151
64608
  /** Voltage in volts. */
64152
- volts: number().optional().meta(readingMeta("voltage")),
64609
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64153
64610
  /** Current in amperes. */
64154
- amps: number().optional().meta(readingMeta("current")),
64611
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64155
64612
  /** Apparent power in volt-amperes. */
64156
64613
  va: number().optional().meta(readingMeta("apparent-power")),
64157
64614
  /** Power factor (0..1) if reported. */
@@ -64159,12 +64616,74 @@ var PowerMeterStatusSchema = object({
64159
64616
  /** Ms epoch when the slice was last updated. */
64160
64617
  lastFetchedAt: number()
64161
64618
  });
64619
+ /**
64620
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64621
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64622
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64623
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64624
+ * camera and the like are left out: their draw is not what anyone meters.
64625
+ */
64626
+ var POWER_METER_DEVICE_TYPES = [
64627
+ DeviceType.Sensor,
64628
+ DeviceType.Switch,
64629
+ DeviceType.Light,
64630
+ DeviceType.Fan,
64631
+ DeviceType.Climate,
64632
+ DeviceType.Thermostat,
64633
+ DeviceType.Humidifier,
64634
+ DeviceType.WaterHeater,
64635
+ DeviceType.MediaPlayer,
64636
+ DeviceType.Washer,
64637
+ DeviceType.Dryer,
64638
+ DeviceType.Dishwasher,
64639
+ DeviceType.Vacuum,
64640
+ DeviceType.LawnMower,
64641
+ DeviceType.PetFeeder
64642
+ ];
64643
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64644
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64645
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64646
+ function powerTarget(id, unit) {
64647
+ return {
64648
+ id,
64649
+ cardinality: "scalar",
64650
+ vocabulary: {
64651
+ cap: "power-meter",
64652
+ stateField: id
64653
+ },
64654
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64655
+ apply: "add",
64656
+ path: id,
64657
+ sources: [{
64658
+ kind: "numeric",
64659
+ requiredUnit: unit,
64660
+ transforms: [{ kind: "identity" }]
64661
+ }],
64662
+ companions: [{
64663
+ kind: "clock",
64664
+ path: "lastFetchedAt",
64665
+ when: "always"
64666
+ }],
64667
+ sourceReport: { status: "assignment-status" },
64668
+ advancedExpression: true
64669
+ };
64670
+ }
64671
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64672
+ var powerMeterCustomize = {
64673
+ version: 1,
64674
+ targets: [
64675
+ powerTarget("watts", "W"),
64676
+ powerTarget("kwhTotal", "kWh"),
64677
+ powerTarget("volts", "V"),
64678
+ powerTarget("amps", "A")
64679
+ ]
64680
+ };
64162
64681
  var powerMeterCapability = {
64163
64682
  name: "power-meter",
64164
64683
  scope: "device",
64165
64684
  deviceNative: true,
64166
64685
  mode: "singleton",
64167
- deviceTypes: [DeviceType.Sensor],
64686
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64168
64687
  methods: {},
64169
64688
  status: {
64170
64689
  schema: PowerMeterStatusSchema,
@@ -64221,7 +64740,8 @@ var powerMeterCapability = {
64221
64740
  } },
64222
64741
  /** Clock fields: written, but excluded from the compare that decides
64223
64742
  * whether persisting is worth a SQLite commit. */
64224
- volatileStateFields: ["lastFetchedAt"]
64743
+ volatileStateFields: ["lastFetchedAt"],
64744
+ customize: powerMeterCustomize
64225
64745
  };
64226
64746
  /**
64227
64747
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64910,6 +65430,8 @@ var runningCustomize = {
64910
65430
  stateField: "running"
64911
65431
  },
64912
65432
  deviceTypes: [
65433
+ DeviceType.Washer,
65434
+ DeviceType.Dryer,
64913
65435
  DeviceType.Dishwasher,
64914
65436
  DeviceType.Vacuum,
64915
65437
  DeviceType.LawnMower,
@@ -67399,7 +67921,8 @@ var switchCapability = {
67399
67921
  deviceTypes: [
67400
67922
  DeviceType.Switch,
67401
67923
  DeviceType.Siren,
67402
- DeviceType.Light
67924
+ DeviceType.Light,
67925
+ DeviceType.Fan
67403
67926
  ],
67404
67927
  methods: { setState: method(object({
67405
67928
  deviceId: number(),
@@ -69642,6 +70165,7 @@ function runningFromLawnMower(activity, previous, fetchedAt, transitionAt) {
69642
70165
  if (activity === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
69643
70166
  return nativeSlice(false, activity, previous, transitionAtMs, fetchedAt, null);
69644
70167
  }
70168
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69645
70169
  /**
69646
70170
  * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
69647
70171
  * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
@@ -70041,7 +70565,7 @@ function tryConvertDelta(value, from, to) {
70041
70565
  return shifted - origin;
70042
70566
  }
70043
70567
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
70044
- 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;
70568
+ 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;
70045
70569
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
70046
70570
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
70047
70571
  new Set(CAP_NAMES);
@@ -70370,6 +70894,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70370
70894
  featureProbe: featureProbeCapability,
70371
70895
  flood: floodCapability,
70372
70896
  gas: gasCapability,
70897
+ groupActive: groupActiveCapability,
70373
70898
  groupCommands: groupCommandsCapability,
70374
70899
  groupStatus: groupStatusCapability,
70375
70900
  heatingValve: heatingValveCapability,
@@ -70381,6 +70906,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70381
70906
  lawnMowerControl: lawnMowerControlCapability,
70382
70907
  lockControl: lockControlCapability,
70383
70908
  mediaPlayer: mediaPlayerCapability,
70909
+ meter: meterCapability,
70384
70910
  motion: motionCapability,
70385
70911
  motionTrigger: motionTriggerCapability,
70386
70912
  motionZones: motionZonesCapability,
@@ -71656,7 +72182,7 @@ var BaseDeviceProvider = class extends BaseAddon {
71656
72182
  return toDeviceSummary(device, this.addonId);
71657
72183
  }
71658
72184
  };
71659
- 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;
72185
+ 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;
71660
72186
  new Set(Object.values(DeviceType));
71661
72187
  Object.freeze({
71662
72188
  "accessories.getStatus": {
@@ -74879,6 +75405,13 @@ Object.freeze({
74879
75405
  access: "view",
74880
75406
  role: "viewer"
74881
75407
  },
75408
+ "groupActive.getStatus": {
75409
+ capName: "group-active",
75410
+ capScope: "device",
75411
+ addonId: null,
75412
+ access: "view",
75413
+ role: "viewer"
75414
+ },
74882
75415
  "groupCommands.getStatus": {
74883
75416
  capName: "group-commands",
74884
75417
  capScope: "device",
@@ -75845,6 +76378,13 @@ Object.freeze({
75845
76378
  access: "create",
75846
76379
  role: "admin"
75847
76380
  },
76381
+ "meter.getStatus": {
76382
+ capName: "meter",
76383
+ capScope: "device",
76384
+ addonId: null,
76385
+ access: "view",
76386
+ role: "viewer"
76387
+ },
75848
76388
  "metricsProvider.collectSnapshot": {
75849
76389
  capName: "metrics-provider",
75850
76390
  capScope: "system",
@@ -83943,7 +84483,39 @@ var APPLIANCE_CAP_VOCABULARY = {
83943
84483
  phrase: t("When {device} finishes", "Quando {device} finisce"),
83944
84484
  icon: "square"
83945
84485
  }
83946
- }
84486
+ },
84487
+ overrides: { byType: {
84488
+ [DeviceType.Washer]: {
84489
+ state: { running: {
84490
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
84491
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
84492
+ } },
84493
+ events: {
84494
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
84495
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
84496
+ }
84497
+ },
84498
+ [DeviceType.Dryer]: {
84499
+ state: { running: {
84500
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
84501
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
84502
+ } },
84503
+ events: {
84504
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
84505
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
84506
+ }
84507
+ },
84508
+ [DeviceType.Dishwasher]: {
84509
+ state: { running: {
84510
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
84511
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
84512
+ } },
84513
+ events: {
84514
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
84515
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
84516
+ }
84517
+ }
84518
+ } }
83947
84519
  },
83948
84520
  update: {
83949
84521
  scope: "device",
@@ -84715,6 +85287,10 @@ var SENSOR_CAP_VOCABULARY = {
84715
85287
  icon: "flame"
84716
85288
  }]
84717
85289
  },
85290
+ "group-active": {
85291
+ scope: "device",
85292
+ noun: t("Group state", "Stato del gruppo")
85293
+ },
84718
85294
  "group-commands": {
84719
85295
  scope: "device",
84720
85296
  noun: t("Group command", "Comando di gruppo")
@@ -84771,6 +85347,17 @@ var SENSOR_CAP_VOCABULARY = {
84771
85347
  }],
84772
85348
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
84773
85349
  },
85350
+ meter: {
85351
+ scope: "device",
85352
+ noun: t("Meter", "Contatore"),
85353
+ state: [{
85354
+ kind: "numeric",
85355
+ field: "value",
85356
+ quantity: t("the total", "il totale"),
85357
+ label: t("Total", "Totale"),
85358
+ icon: "gauge"
85359
+ }]
85360
+ },
84774
85361
  "numeric-sensor": {
84775
85362
  scope: "device",
84776
85363
  noun: t("Sensor", "Sensore"),
@@ -85243,8 +85830,47 @@ function projectAction(cap, action) {
85243
85830
  };
85244
85831
  }
85245
85832
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
85246
- 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;
85833
+ 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;
85247
85834
  DeviceFeature.BatteryOperated;
85835
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
85836
+ 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.";
85837
+ 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.";
85838
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
85839
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
85840
+ 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.";
85841
+ function withheld(reason) {
85842
+ return {
85843
+ [DeviceType.Washer]: {
85844
+ exported: false,
85845
+ reason
85846
+ },
85847
+ [DeviceType.Dryer]: {
85848
+ exported: false,
85849
+ reason
85850
+ },
85851
+ [DeviceType.Dishwasher]: {
85852
+ exported: false,
85853
+ reason
85854
+ }
85855
+ };
85856
+ }
85857
+ function offered(received) {
85858
+ return {
85859
+ [DeviceType.Washer]: {
85860
+ exported: true,
85861
+ as: received
85862
+ },
85863
+ [DeviceType.Dryer]: {
85864
+ exported: true,
85865
+ as: received
85866
+ },
85867
+ [DeviceType.Dishwasher]: {
85868
+ exported: true,
85869
+ as: received
85870
+ }
85871
+ };
85872
+ }
85873
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
85248
85874
  Object.freeze({
85249
85875
  "accessories.getStatus": [{
85250
85876
  name: "deviceId",
@@ -86211,6 +86837,11 @@ Object.freeze({
86211
86837
  form: "single",
86212
86838
  optional: false
86213
86839
  }],
86840
+ "groupActive.getStatus": [{
86841
+ name: "deviceId",
86842
+ form: "single",
86843
+ optional: false
86844
+ }],
86214
86845
  "groupCommands.getStatus": [{
86215
86846
  name: "deviceId",
86216
86847
  form: "single",
@@ -86421,6 +87052,11 @@ Object.freeze({
86421
87052
  form: "single",
86422
87053
  optional: false
86423
87054
  }],
87055
+ "meter.getStatus": [{
87056
+ name: "deviceId",
87057
+ form: "single",
87058
+ optional: false
87059
+ }],
86424
87060
  "motion.getStatus": [{
86425
87061
  name: "deviceId",
86426
87062
  form: "single",
@@ -88028,7 +88664,6 @@ Object.freeze({
88028
88664
  "network-access": "ingress",
88029
88665
  "smtp-provider": "email"
88030
88666
  });
88031
- DeviceType.Camera;
88032
88667
  /**
88033
88668
  * A saved Customize assignment (D936). The schema is the type: callers use
88034
88669
  * `z.infer`, they do not restate the shape.