@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.js CHANGED
@@ -5487,7 +5487,7 @@ var ZodIssueCode$1 = {
5487
5487
  var ZodFirstPartyTypeKind$1;
5488
5488
  ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
5489
5489
  //#endregion
5490
- //#region ../types/dist/sleep-bykKrTgu.mjs
5490
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5491
5491
  /**
5492
5492
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5493
5493
  * window to float samples (D455).
@@ -8680,6 +8680,7 @@ var CAP_NAMES = Object.freeze([
8680
8680
  "filesystem-browse",
8681
8681
  "flood",
8682
8682
  "gas",
8683
+ "group-active",
8683
8684
  "group-commands",
8684
8685
  "group-status",
8685
8686
  "heating-valve",
@@ -8702,6 +8703,7 @@ var CAP_NAMES = Object.freeze([
8702
8703
  "login-method",
8703
8704
  "media-player",
8704
8705
  "mesh-network",
8706
+ "meter",
8705
8707
  "metrics-provider",
8706
8708
  "model-convert",
8707
8709
  "model-distributor",
@@ -9500,6 +9502,10 @@ Object.freeze({
9500
9502
  "path": "detected",
9501
9503
  "valueType": "boolean"
9502
9504
  }],
9505
+ "group-active": [{
9506
+ "path": "active",
9507
+ "valueType": "boolean"
9508
+ }],
9503
9509
  "group-status": [
9504
9510
  {
9505
9511
  "path": "included",
@@ -9759,6 +9765,10 @@ Object.freeze({
9759
9765
  ]
9760
9766
  }
9761
9767
  ],
9768
+ "meter": [{
9769
+ "path": "value",
9770
+ "valueType": "number"
9771
+ }],
9762
9772
  "motion": [
9763
9773
  {
9764
9774
  "path": "detected",
@@ -10516,7 +10526,7 @@ function userError(code, params, englishFallback) {
10516
10526
  return new CamstackError(code, params, englishFallback);
10517
10527
  }
10518
10528
  //#endregion
10519
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10529
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10520
10530
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10521
10531
  DeviceType["Camera"] = "camera";
10522
10532
  DeviceType["Hub"] = "hub";
@@ -10610,8 +10620,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10610
10620
  DeviceType["PetFeeder"] = "pet-feeder";
10611
10621
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10612
10622
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10613
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10623
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10624
+ * A plug-built dishwasher carries running-state and power instead. */
10614
10625
  DeviceType["Dishwasher"] = "dishwasher";
10626
+ /** Washing machine. A plug-built one is running while its power stays
10627
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10628
+ DeviceType["Washer"] = "washer";
10629
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10630
+ DeviceType["Dryer"] = "dryer";
10615
10631
  return DeviceType;
10616
10632
  }({});
10617
10633
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10869,7 +10885,7 @@ function errMsg(err) {
10869
10885
  return String(err);
10870
10886
  }
10871
10887
  //#endregion
10872
- //#region ../types/dist/composition-OhpuespA.mjs
10888
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10873
10889
  /**
10874
10890
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10875
10891
  *
@@ -11184,6 +11200,13 @@ var table = {
11184
11200
  apply: () => {
11185
11201
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11186
11202
  }
11203
+ },
11204
+ schmitt: {
11205
+ minArgs: 3,
11206
+ maxArgs: 5,
11207
+ apply: () => {
11208
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11209
+ }
11187
11210
  }
11188
11211
  };
11189
11212
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11625,6 +11648,99 @@ function validateExpressionSource(src) {
11625
11648
  return null;
11626
11649
  }
11627
11650
  /**
11651
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11652
+ *
11653
+ * Standby of the control board is under 5 W; a motor or a heater is far
11654
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11655
+ * a cycle, so running starts only after 30 s above the line.
11656
+ *
11657
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11658
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11659
+ * report "finished" in the middle of the program, so the stop dwell is
11660
+ * 10 minutes on every type. The number is stored per type so one machine
11661
+ * can move later without moving the others.
11662
+ */
11663
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11664
+ var APPLIANCE_KINDS = [
11665
+ "washer",
11666
+ "dryer",
11667
+ "dishwasher"
11668
+ ];
11669
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11670
+ /**
11671
+ * Statistics and integrals over a history read (D944).
11672
+ *
11673
+ * Pure: the same points always give the same answer, so a restart recomputes
11674
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11675
+ * never the mean of the samples. A hole with no held value is not integrated
11676
+ * as zero. A truncated read is not published.
11677
+ */
11678
+ var STATISTIC_STATS = [
11679
+ "min",
11680
+ "max",
11681
+ "mean",
11682
+ "sum",
11683
+ "count",
11684
+ "change"
11685
+ ];
11686
+ /**
11687
+ * The range a statistics or integral helper asks history for (D944).
11688
+ *
11689
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11690
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11691
+ * is strictly longer than the longest that range can be. Forever qualifies.
11692
+ * Equal to a tier's retention is a refusal, not a short answer.
11693
+ */
11694
+ var MINUTE_MS = 6e4;
11695
+ var HOUR_MS = 60 * MINUTE_MS;
11696
+ var DAY_MS = 24 * HOUR_MS;
11697
+ var ROLLING_SPANS = [
11698
+ "1h",
11699
+ "24h",
11700
+ "2d",
11701
+ "7d",
11702
+ "30d",
11703
+ "custom"
11704
+ ];
11705
+ var CALENDAR_PERIODS = [
11706
+ "today",
11707
+ "yesterday",
11708
+ "this-week",
11709
+ "this-month"
11710
+ ];
11711
+ var RESET_PERIODS = [
11712
+ "never",
11713
+ "daily",
11714
+ "weekly",
11715
+ "monthly"
11716
+ ];
11717
+ 5 * MINUTE_MS;
11718
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11719
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11720
+ var rollingWindowObject = object({
11721
+ kind: literal("rolling"),
11722
+ span: _enum(ROLLING_SPANS),
11723
+ customMinutes: number().int().min(5).optional()
11724
+ }).check((payload) => {
11725
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11726
+ code: "custom",
11727
+ message: "a custom range needs a duration in minutes",
11728
+ path: ["customMinutes"],
11729
+ input: payload.value
11730
+ });
11731
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11732
+ code: "custom",
11733
+ message: "only a custom range carries a duration",
11734
+ path: ["customMinutes"],
11735
+ input: payload.value
11736
+ });
11737
+ });
11738
+ var RollingWindowSchema = rollingWindowObject;
11739
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11740
+ kind: literal("calendar"),
11741
+ period: _enum(CALENDAR_PERIODS)
11742
+ })]);
11743
+ /**
11628
11744
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11629
11745
  * id. Split out so helper schemas can name it without a cycle through
11630
11746
  * `composition.ts` (D659).
@@ -11650,7 +11766,13 @@ var GROUP_TEMPLATE_IDS = [
11650
11766
  "occupancy",
11651
11767
  "binary",
11652
11768
  "switch",
11653
- "light"
11769
+ "light",
11770
+ "fan",
11771
+ "cover",
11772
+ "valve",
11773
+ "lock",
11774
+ "media-player",
11775
+ "climate"
11654
11776
  ];
11655
11777
  var NUMERIC_AGGREGATES = [
11656
11778
  "mean",
@@ -11680,14 +11802,73 @@ var HelperMemberSchema = object({
11680
11802
  cap: string().min(1),
11681
11803
  fieldPath: string().min(1)
11682
11804
  });
11683
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11684
- kind: literal("group"),
11685
- templateId: GroupTemplateIdSchema,
11686
- aggregate: AggregateReducerSchema,
11687
- members: array(HelperMemberSchema).min(1).max(64),
11688
- /** Actuator groups only. Readings leave this unset. */
11689
- active: ActiveCriterionSchema.optional()
11690
- })]);
11805
+ var HelperSpecSchema = discriminatedUnion("kind", [
11806
+ object({
11807
+ kind: literal("group"),
11808
+ templateId: GroupTemplateIdSchema,
11809
+ aggregate: AggregateReducerSchema,
11810
+ members: array(HelperMemberSchema).min(1).max(64),
11811
+ /** Actuator groups only. Readings leave this unset. */
11812
+ active: ActiveCriterionSchema.optional()
11813
+ }),
11814
+ object({
11815
+ kind: literal("appliance"),
11816
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11817
+ appliance: _enum(APPLIANCE_KINDS),
11818
+ thresholdWatts: number().positive(),
11819
+ startDwellMs: number().int().nonnegative(),
11820
+ stopDwellMs: number().int().nonnegative(),
11821
+ member: HelperMemberSchema
11822
+ }),
11823
+ object({
11824
+ kind: literal("statistic"),
11825
+ stat: _enum(STATISTIC_STATS),
11826
+ window: StatisticWindowSchema,
11827
+ source: HelperMemberSchema
11828
+ }),
11829
+ object({
11830
+ kind: literal("integral"),
11831
+ reset: _enum(RESET_PERIODS),
11832
+ output: _enum(["energy", "meter"]),
11833
+ source: HelperMemberSchema
11834
+ }),
11835
+ object({
11836
+ kind: literal("threshold"),
11837
+ source: HelperMemberSchema,
11838
+ high: number(),
11839
+ low: number(),
11840
+ onForMs: number().int().nonnegative(),
11841
+ offForMs: number().int().nonnegative()
11842
+ }),
11843
+ object({
11844
+ kind: literal("arithmetic"),
11845
+ op: _enum([
11846
+ "sum",
11847
+ "difference",
11848
+ "ratio"
11849
+ ]),
11850
+ inputs: array(HelperMemberSchema).min(2).max(64)
11851
+ }),
11852
+ object({
11853
+ kind: literal("expression"),
11854
+ expr: string().min(1),
11855
+ inputs: array(object({
11856
+ name: string().min(1),
11857
+ member: HelperMemberSchema
11858
+ })).min(1).max(64),
11859
+ output: _enum(["number", "boolean"])
11860
+ }),
11861
+ object({
11862
+ kind: literal("derivative"),
11863
+ window: RollingWindowSchema,
11864
+ per: _enum([
11865
+ "second",
11866
+ "minute",
11867
+ "hour"
11868
+ ]),
11869
+ source: HelperMemberSchema
11870
+ })
11871
+ ]);
11691
11872
  /** A composed device's stableId is this prefix plus the block id. */
11692
11873
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11693
11874
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11748,6 +11929,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11748
11929
  "all"
11749
11930
  ]),
11750
11931
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11932
+ /**
11933
+ * Set when the reads are an enum state, not a yes/no: the listed states
11934
+ * count as active (a cover is `open`). A state outside the list is inactive;
11935
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11936
+ */
11937
+ activeWhen: array(string().min(1)).min(1).optional(),
11751
11938
  /** `value` is the reading; the others are the member counts. */
11752
11939
  publish: _enum([
11753
11940
  "value",
@@ -11761,6 +11948,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11761
11948
  "omit",
11762
11949
  "offline"
11763
11950
  ])
11951
+ }),
11952
+ object({
11953
+ kind: literal("series"),
11954
+ read: CompositionFieldReadSchema,
11955
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11956
+ publish: _enum([
11957
+ "value",
11958
+ "included",
11959
+ "excluded",
11960
+ "total"
11961
+ ]),
11962
+ /**
11963
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11964
+ * device unseeded until history answers, so a restart cannot publish 0.
11965
+ */
11966
+ empty: _enum([
11967
+ "null",
11968
+ "omit",
11969
+ "offline"
11970
+ ])
11764
11971
  })
11765
11972
  ]);
11766
11973
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -16920,7 +17127,22 @@ var BrokerProviderInfoSchema = object({
16920
17127
  */
16921
17128
  interactiveConnectPath: string().min(1).optional(),
16922
17129
  /** Relative hub path to disconnect the linked account (same popup pattern). */
16923
- interactiveDisconnectPath: string().min(1).optional()
17130
+ interactiveDisconnectPath: string().min(1).optional(),
17131
+ /**
17132
+ * The kind signs in through a server-held interactive session instead of
17133
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17134
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17135
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17136
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17137
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17138
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17139
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17140
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17141
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17142
+ * offers it as the default path; the fields the session fills are
17143
+ * marked `filledBySignIn` in the kind's settings schema.
17144
+ */
17145
+ signIn: object({ basePath: string().min(1) }).optional()
16924
17146
  }))
16925
17147
  });
16926
17148
  var ListInputSchema = object({
@@ -18025,7 +18247,8 @@ var CompositionProblemSchema = object({
18025
18247
  "native-capability-replace",
18026
18248
  "mixed-quantity",
18027
18249
  "helper-mismatch",
18028
- "member-constraint"
18250
+ "member-constraint",
18251
+ "retention"
18029
18252
  ]),
18030
18253
  path: string(),
18031
18254
  message: string()
@@ -18259,13 +18482,17 @@ Object.freeze({
18259
18482
  latchedAt: {
18260
18483
  kind: "fixed",
18261
18484
  result: ["number", "null"]
18485
+ },
18486
+ schmitt: {
18487
+ kind: "fixed",
18488
+ result: ["boolean", "null"]
18262
18489
  }
18263
18490
  });
18264
18491
  /**
18265
18492
  * One catalog row per base reading a group helper can build (D944 §3).
18266
18493
  * Data, not a form default written into the block.
18267
18494
  */
18268
- var NOW = {
18495
+ var NOW$2 = {
18269
18496
  fieldPath: "lastFetchedAt",
18270
18497
  expr: "now"
18271
18498
  };
@@ -18279,6 +18506,8 @@ function numeric(input) {
18279
18506
  family: "numeric",
18280
18507
  deviceType: DeviceType.Sensor,
18281
18508
  memberDeviceType: DeviceType.Sensor,
18509
+ memberDeviceTypes: [DeviceType.Sensor],
18510
+ activeWhen: void 0,
18282
18511
  commandCaps: [],
18283
18512
  baseUnit: baseUnitOf(input.quantity),
18284
18513
  aggregates: NUMERIC_AGGREGATES,
@@ -18294,6 +18523,8 @@ function binary(input) {
18294
18523
  family: "binary",
18295
18524
  deviceType: DeviceType.Sensor,
18296
18525
  memberDeviceType: DeviceType.Sensor,
18526
+ memberDeviceTypes: [DeviceType.Sensor],
18527
+ activeWhen: void 0,
18297
18528
  commandCaps: [],
18298
18529
  quantity: "none",
18299
18530
  baseUnit: void 0,
@@ -18311,7 +18542,7 @@ var GROUP_TEMPLATES = [
18311
18542
  quantity: "temperature",
18312
18543
  defaultAggregate: "mean",
18313
18544
  empty: "null",
18314
- companions: [NOW]
18545
+ companions: [NOW$2]
18315
18546
  }),
18316
18547
  numeric({
18317
18548
  id: "humidity",
@@ -18322,7 +18553,7 @@ var GROUP_TEMPLATES = [
18322
18553
  quantity: "humidity",
18323
18554
  defaultAggregate: "mean",
18324
18555
  empty: "null",
18325
- companions: [NOW]
18556
+ companions: [NOW$2]
18326
18557
  }),
18327
18558
  numeric({
18328
18559
  id: "pressure",
@@ -18333,7 +18564,7 @@ var GROUP_TEMPLATES = [
18333
18564
  quantity: "pressure",
18334
18565
  defaultAggregate: "mean",
18335
18566
  empty: "null",
18336
- companions: [NOW]
18567
+ companions: [NOW$2]
18337
18568
  }),
18338
18569
  numeric({
18339
18570
  id: "illuminance",
@@ -18344,7 +18575,7 @@ var GROUP_TEMPLATES = [
18344
18575
  quantity: "illuminance",
18345
18576
  defaultAggregate: "mean",
18346
18577
  empty: "null",
18347
- companions: [NOW]
18578
+ companions: [NOW$2]
18348
18579
  }),
18349
18580
  numeric({
18350
18581
  id: "power",
@@ -18355,7 +18586,7 @@ var GROUP_TEMPLATES = [
18355
18586
  quantity: "power",
18356
18587
  defaultAggregate: "sum",
18357
18588
  empty: "omit",
18358
- companions: [NOW]
18589
+ companions: [NOW$2]
18359
18590
  }),
18360
18591
  numeric({
18361
18592
  id: "energy",
@@ -18366,7 +18597,7 @@ var GROUP_TEMPLATES = [
18366
18597
  quantity: "energy",
18367
18598
  defaultAggregate: "sum",
18368
18599
  empty: "omit",
18369
- companions: [NOW]
18600
+ companions: [NOW$2]
18370
18601
  }),
18371
18602
  numeric({
18372
18603
  id: "battery",
@@ -18401,7 +18632,7 @@ var GROUP_TEMPLATES = [
18401
18632
  quantity: "device",
18402
18633
  defaultAggregate: "mean",
18403
18634
  empty: "null",
18404
- companions: [NOW]
18635
+ companions: [NOW$2]
18405
18636
  }),
18406
18637
  binary({
18407
18638
  id: "motion",
@@ -18495,6 +18726,11 @@ var GROUP_TEMPLATES = [
18495
18726
  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.",
18496
18727
  deviceType: DeviceType.Switch,
18497
18728
  outputCap: "switch",
18729
+ outputField: "on",
18730
+ member: {
18731
+ cap: "switch",
18732
+ fieldPath: "on"
18733
+ },
18498
18734
  commandCaps: ["switch"]
18499
18735
  }),
18500
18736
  actuator({
@@ -18502,34 +18738,136 @@ var GROUP_TEMPLATES = [
18502
18738
  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.",
18503
18739
  deviceType: DeviceType.Light,
18504
18740
  outputCap: "switch",
18741
+ outputField: "on",
18742
+ member: {
18743
+ cap: "switch",
18744
+ fieldPath: "on"
18745
+ },
18505
18746
  commandCaps: [
18506
18747
  "switch",
18507
18748
  "brightness",
18508
18749
  "color"
18509
18750
  ]
18751
+ }),
18752
+ actuator({
18753
+ id: "fan",
18754
+ 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.",
18755
+ deviceType: DeviceType.Fan,
18756
+ outputCap: "switch",
18757
+ outputField: "on",
18758
+ member: {
18759
+ cap: "switch",
18760
+ fieldPath: "on"
18761
+ },
18762
+ commandCaps: ["switch", "fan-control"]
18763
+ }),
18764
+ actuator({
18765
+ id: "cover",
18766
+ 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.",
18767
+ deviceType: DeviceType.Cover,
18768
+ outputCap: "group-active",
18769
+ outputField: "active",
18770
+ member: {
18771
+ cap: "cover",
18772
+ fieldPath: "state"
18773
+ },
18774
+ activeWhen: [
18775
+ "open",
18776
+ "opening",
18777
+ "stopped"
18778
+ ],
18779
+ commandCaps: ["cover"]
18780
+ }),
18781
+ actuator({
18782
+ id: "valve",
18783
+ 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.",
18784
+ deviceType: DeviceType.Valve,
18785
+ outputCap: "group-active",
18786
+ outputField: "active",
18787
+ member: {
18788
+ cap: "valve",
18789
+ fieldPath: "state"
18790
+ },
18791
+ activeWhen: [
18792
+ "open",
18793
+ "opening",
18794
+ "stopped"
18795
+ ],
18796
+ commandCaps: ["valve"]
18797
+ }),
18798
+ actuator({
18799
+ id: "lock",
18800
+ 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.",
18801
+ deviceType: DeviceType.Lock,
18802
+ outputCap: "group-active",
18803
+ outputField: "active",
18804
+ member: {
18805
+ cap: "lock-control",
18806
+ fieldPath: "state"
18807
+ },
18808
+ activeWhen: ["locked"],
18809
+ commandCaps: ["lock-control"]
18810
+ }),
18811
+ actuator({
18812
+ id: "media-player",
18813
+ 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.",
18814
+ deviceType: DeviceType.MediaPlayer,
18815
+ outputCap: "group-active",
18816
+ outputField: "active",
18817
+ member: {
18818
+ cap: "media-player",
18819
+ fieldPath: "state"
18820
+ },
18821
+ activeWhen: ["playing", "buffering"],
18822
+ commandCaps: ["media-player"]
18823
+ }),
18824
+ actuator({
18825
+ id: "climate",
18826
+ 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.",
18827
+ deviceType: DeviceType.Thermostat,
18828
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18829
+ outputCap: "group-active",
18830
+ outputField: "active",
18831
+ member: {
18832
+ cap: "climate-control",
18833
+ fieldPath: "mode"
18834
+ },
18835
+ activeWhen: [
18836
+ "heat",
18837
+ "cool",
18838
+ "auto",
18839
+ "heat_cool",
18840
+ "fan_only",
18841
+ "dry"
18842
+ ],
18843
+ commandCaps: ["climate-control"]
18510
18844
  })
18511
18845
  ];
18512
18846
  function actuator(input) {
18513
18847
  return {
18514
- ...input,
18848
+ id: input.id,
18849
+ summary: input.summary,
18850
+ deviceType: input.deviceType,
18851
+ outputCap: input.outputCap,
18852
+ outputField: input.outputField,
18853
+ commandCaps: input.commandCaps,
18515
18854
  family: "actuator",
18516
18855
  role: void 0,
18517
18856
  memberDeviceType: input.deviceType,
18518
- outputField: "on",
18857
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18858
+ activeWhen: input.activeWhen,
18519
18859
  quantity: "none",
18520
18860
  baseUnit: void 0,
18521
18861
  aggregates: BINARY_AGGREGATES,
18522
18862
  defaultAggregate: "any",
18523
18863
  empty: "offline",
18524
- accept: [{
18525
- cap: "switch",
18526
- fieldPath: "on"
18527
- }],
18864
+ accept: [input.member],
18528
18865
  companions: [CHANGED]
18529
18866
  };
18530
18867
  }
18531
18868
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18532
18869
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18870
+ DeviceType.Camera;
18533
18871
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18534
18872
  /**
18535
18873
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43839,7 +44177,7 @@ var NetworkAccessStatusSchema = object({
43839
44177
  });
43840
44178
  /**
43841
44179
  * Optional, richer endpoint shape returned by providers that expose
43842
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44180
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43843
44181
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43844
44182
  * the originating provider config (mode + sourcePort) so the
43845
44183
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46526,7 +46864,20 @@ var NcRuleInputSchema = object({
46526
46864
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46527
46865
  * path does not run Zod defaults.
46528
46866
  */
46529
- groupingSec: number().int().min(5).max(60).optional()
46867
+ groupingSec: number().int().min(5).max(60).optional(),
46868
+ /**
46869
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46870
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46871
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46872
+ * same mark the Library writes, and records whose notification it was and
46873
+ * when. A channel with no buttons gets the same two choices as links.
46874
+ *
46875
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46876
+ * cap path): absent and `false` both mean off, which is what every rule
46877
+ * authored before this field meant. An editor turns it off by writing
46878
+ * `false`, so it needs no `clear` key.
46879
+ */
46880
+ askVerdict: boolean().optional()
46530
46881
  });
46531
46882
  /**
46532
46883
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57246,7 +57597,8 @@ var BATTERY_DEVICE_TYPES = [
57246
57597
  DeviceType.Switch,
57247
57598
  DeviceType.PetFeeder,
57248
57599
  DeviceType.Container,
57249
- DeviceType.Thermostat
57600
+ DeviceType.Thermostat,
57601
+ DeviceType.EventEmitter
57250
57602
  ];
57251
57603
  /** Generic Customize target for the percentage reading (D936). */
57252
57604
  var batteryCustomize = {
@@ -60135,7 +60487,17 @@ var groupCommandsCapability = {
60135
60487
  scope: "device",
60136
60488
  deviceNative: true,
60137
60489
  mode: "singleton",
60138
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60490
+ deviceTypes: [
60491
+ DeviceType.Switch,
60492
+ DeviceType.Light,
60493
+ DeviceType.Fan,
60494
+ DeviceType.Cover,
60495
+ DeviceType.Valve,
60496
+ DeviceType.Lock,
60497
+ DeviceType.MediaPlayer,
60498
+ DeviceType.Thermostat,
60499
+ DeviceType.Climate
60500
+ ],
60139
60501
  methods: {},
60140
60502
  status: {
60141
60503
  schema: GroupCommandsSchema,
@@ -60153,6 +60515,49 @@ var groupCommandsCapability = {
60153
60515
  history: "none"
60154
60516
  };
60155
60517
  /**
60518
+ * Whether a helper actuator group counts as active (D944): at least one
60519
+ * included member is, or every included member is. What "active" means is the
60520
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60521
+ * climate device is not off. A group of lights, switches and fans reports
60522
+ * `switch.on` instead; this cap is for the types whose own state is not a
60523
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60524
+ * empty included set takes the device offline, never `active: false`.
60525
+ */
60526
+ var GroupActiveSchema = object({
60527
+ active: boolean().meta({ label: "Active" }),
60528
+ /** Ms epoch when the slice was last updated. */
60529
+ lastChangedAt: number()
60530
+ });
60531
+ var groupActiveCapability = {
60532
+ name: "group-active",
60533
+ scope: "device",
60534
+ deviceNative: true,
60535
+ mode: "singleton",
60536
+ deviceTypes: [
60537
+ DeviceType.Cover,
60538
+ DeviceType.Valve,
60539
+ DeviceType.Lock,
60540
+ DeviceType.MediaPlayer,
60541
+ DeviceType.Climate,
60542
+ DeviceType.Thermostat
60543
+ ],
60544
+ methods: {},
60545
+ status: {
60546
+ schema: GroupActiveSchema,
60547
+ kind: "push"
60548
+ },
60549
+ runtimeState: GroupActiveSchema,
60550
+ /**
60551
+ * Runtime-state durability: **session** — recomputed from the members on the
60552
+ * next source event; a restored value would outlive the members it named.
60553
+ *
60554
+ * See `RuntimeStateDurability`. Enforced by
60555
+ * `scripts/check-runtime-state-durability.ts`.
60556
+ */
60557
+ durability: "session",
60558
+ history: "none"
60559
+ };
60560
+ /**
60156
60561
  * How many members of a helper group answered (D944). Counts are integers,
60157
60562
  * not measurements: zero included is a real count, never a stand-in reading.
60158
60563
  * The reading itself stays on the output capability. History is none — the
@@ -60183,7 +60588,14 @@ var groupStatusCapability = {
60183
60588
  deviceTypes: [
60184
60589
  DeviceType.Sensor,
60185
60590
  DeviceType.Switch,
60186
- DeviceType.Light
60591
+ DeviceType.Light,
60592
+ DeviceType.Fan,
60593
+ DeviceType.Cover,
60594
+ DeviceType.Valve,
60595
+ DeviceType.Lock,
60596
+ DeviceType.MediaPlayer,
60597
+ DeviceType.Thermostat,
60598
+ DeviceType.Climate
60187
60599
  ],
60188
60600
  methods: {},
60189
60601
  status: {
@@ -61456,7 +61868,14 @@ var lockControlCapability = {
61456
61868
  }),
61457
61869
  unlock: method(object({
61458
61870
  deviceId: number().int().nonnegative(),
61459
- code: string().min(1).optional()
61871
+ code: string().min(1).optional(),
61872
+ /**
61873
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61874
+ * with one call is refused unless the caller says it was confirmed. A
61875
+ * single lock ignores it. The refusal lives in the callee, so no
61876
+ * automation or API caller reaches the doors by skipping a dialog.
61877
+ */
61878
+ confirm: boolean().optional()
61460
61879
  }), _void(), {
61461
61880
  kind: "mutation",
61462
61881
  auth: "protected"
@@ -61493,6 +61912,44 @@ var lockControlCapability = {
61493
61912
  volatileStateFields: ["lastChangedAt"]
61494
61913
  };
61495
61914
  /**
61915
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
61916
+ * so dashboards keep one series; every other instantaneous reading lands here.
61917
+ * `value` is the time integral in the source quantity's accumulated base
61918
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
61919
+ */
61920
+ var MeterStatusSchema = object({
61921
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61922
+ lastFetchedAt: number()
61923
+ });
61924
+ var meterCapability = {
61925
+ name: "meter",
61926
+ scope: "device",
61927
+ deviceNative: true,
61928
+ mode: "singleton",
61929
+ deviceTypes: [DeviceType.Sensor],
61930
+ methods: {},
61931
+ status: {
61932
+ schema: MeterStatusSchema,
61933
+ kind: "push"
61934
+ },
61935
+ runtimeState: MeterStatusSchema,
61936
+ /**
61937
+ * Runtime-state durability: **restored** — the total is a cache of the
61938
+ * history integral. A restart shows it only until the history pass
61939
+ * recomputes the open period; it is not an in-memory buffer.
61940
+ *
61941
+ * See `RuntimeStateDurability`. Enforced by
61942
+ * `scripts/check-runtime-state-durability.ts`.
61943
+ */
61944
+ durability: "restored",
61945
+ history: { fields: { value: {
61946
+ kind: "counter",
61947
+ deadband: .001,
61948
+ minIntervalMs: 6e4
61949
+ } } },
61950
+ volatileStateFields: ["lastFetchedAt"]
61951
+ };
61952
+ /**
61496
61953
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61497
61954
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61498
61955
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64152,9 +64609,9 @@ var PowerMeterStatusSchema = object({
64152
64609
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64153
64610
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64154
64611
  /** Voltage in volts. */
64155
- volts: number().optional().meta(readingMeta("voltage")),
64612
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64156
64613
  /** Current in amperes. */
64157
- amps: number().optional().meta(readingMeta("current")),
64614
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64158
64615
  /** Apparent power in volt-amperes. */
64159
64616
  va: number().optional().meta(readingMeta("apparent-power")),
64160
64617
  /** Power factor (0..1) if reported. */
@@ -64162,12 +64619,74 @@ var PowerMeterStatusSchema = object({
64162
64619
  /** Ms epoch when the slice was last updated. */
64163
64620
  lastFetchedAt: number()
64164
64621
  });
64622
+ /**
64623
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64624
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64625
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64626
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64627
+ * camera and the like are left out: their draw is not what anyone meters.
64628
+ */
64629
+ var POWER_METER_DEVICE_TYPES = [
64630
+ DeviceType.Sensor,
64631
+ DeviceType.Switch,
64632
+ DeviceType.Light,
64633
+ DeviceType.Fan,
64634
+ DeviceType.Climate,
64635
+ DeviceType.Thermostat,
64636
+ DeviceType.Humidifier,
64637
+ DeviceType.WaterHeater,
64638
+ DeviceType.MediaPlayer,
64639
+ DeviceType.Washer,
64640
+ DeviceType.Dryer,
64641
+ DeviceType.Dishwasher,
64642
+ DeviceType.Vacuum,
64643
+ DeviceType.LawnMower,
64644
+ DeviceType.PetFeeder
64645
+ ];
64646
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64647
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64648
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64649
+ function powerTarget(id, unit) {
64650
+ return {
64651
+ id,
64652
+ cardinality: "scalar",
64653
+ vocabulary: {
64654
+ cap: "power-meter",
64655
+ stateField: id
64656
+ },
64657
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64658
+ apply: "add",
64659
+ path: id,
64660
+ sources: [{
64661
+ kind: "numeric",
64662
+ requiredUnit: unit,
64663
+ transforms: [{ kind: "identity" }]
64664
+ }],
64665
+ companions: [{
64666
+ kind: "clock",
64667
+ path: "lastFetchedAt",
64668
+ when: "always"
64669
+ }],
64670
+ sourceReport: { status: "assignment-status" },
64671
+ advancedExpression: true
64672
+ };
64673
+ }
64674
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64675
+ var powerMeterCustomize = {
64676
+ version: 1,
64677
+ targets: [
64678
+ powerTarget("watts", "W"),
64679
+ powerTarget("kwhTotal", "kWh"),
64680
+ powerTarget("volts", "V"),
64681
+ powerTarget("amps", "A")
64682
+ ]
64683
+ };
64165
64684
  var powerMeterCapability = {
64166
64685
  name: "power-meter",
64167
64686
  scope: "device",
64168
64687
  deviceNative: true,
64169
64688
  mode: "singleton",
64170
- deviceTypes: [DeviceType.Sensor],
64689
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64171
64690
  methods: {},
64172
64691
  status: {
64173
64692
  schema: PowerMeterStatusSchema,
@@ -64224,7 +64743,8 @@ var powerMeterCapability = {
64224
64743
  } },
64225
64744
  /** Clock fields: written, but excluded from the compare that decides
64226
64745
  * whether persisting is worth a SQLite commit. */
64227
- volatileStateFields: ["lastFetchedAt"]
64746
+ volatileStateFields: ["lastFetchedAt"],
64747
+ customize: powerMeterCustomize
64228
64748
  };
64229
64749
  /**
64230
64750
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64913,6 +65433,8 @@ var runningCustomize = {
64913
65433
  stateField: "running"
64914
65434
  },
64915
65435
  deviceTypes: [
65436
+ DeviceType.Washer,
65437
+ DeviceType.Dryer,
64916
65438
  DeviceType.Dishwasher,
64917
65439
  DeviceType.Vacuum,
64918
65440
  DeviceType.LawnMower,
@@ -67402,7 +67924,8 @@ var switchCapability = {
67402
67924
  deviceTypes: [
67403
67925
  DeviceType.Switch,
67404
67926
  DeviceType.Siren,
67405
- DeviceType.Light
67927
+ DeviceType.Light,
67928
+ DeviceType.Fan
67406
67929
  ],
67407
67930
  methods: { setState: method(object({
67408
67931
  deviceId: number(),
@@ -69645,6 +70168,7 @@ function runningFromLawnMower(activity, previous, fetchedAt, transitionAt) {
69645
70168
  if (activity === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
69646
70169
  return nativeSlice(false, activity, previous, transitionAtMs, fetchedAt, null);
69647
70170
  }
70171
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69648
70172
  /**
69649
70173
  * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
69650
70174
  * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
@@ -70044,7 +70568,7 @@ function tryConvertDelta(value, from, to) {
70044
70568
  return shifted - origin;
70045
70569
  }
70046
70570
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
70047
- 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;
70571
+ 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;
70048
70572
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
70049
70573
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
70050
70574
  new Set(CAP_NAMES);
@@ -70373,6 +70897,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70373
70897
  featureProbe: featureProbeCapability,
70374
70898
  flood: floodCapability,
70375
70899
  gas: gasCapability,
70900
+ groupActive: groupActiveCapability,
70376
70901
  groupCommands: groupCommandsCapability,
70377
70902
  groupStatus: groupStatusCapability,
70378
70903
  heatingValve: heatingValveCapability,
@@ -70384,6 +70909,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70384
70909
  lawnMowerControl: lawnMowerControlCapability,
70385
70910
  lockControl: lockControlCapability,
70386
70911
  mediaPlayer: mediaPlayerCapability,
70912
+ meter: meterCapability,
70387
70913
  motion: motionCapability,
70388
70914
  motionTrigger: motionTriggerCapability,
70389
70915
  motionZones: motionZonesCapability,
@@ -71659,7 +72185,7 @@ var BaseDeviceProvider = class extends BaseAddon {
71659
72185
  return toDeviceSummary(device, this.addonId);
71660
72186
  }
71661
72187
  };
71662
- 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;
72188
+ 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;
71663
72189
  new Set(Object.values(DeviceType));
71664
72190
  Object.freeze({
71665
72191
  "accessories.getStatus": {
@@ -74882,6 +75408,13 @@ Object.freeze({
74882
75408
  access: "view",
74883
75409
  role: "viewer"
74884
75410
  },
75411
+ "groupActive.getStatus": {
75412
+ capName: "group-active",
75413
+ capScope: "device",
75414
+ addonId: null,
75415
+ access: "view",
75416
+ role: "viewer"
75417
+ },
74885
75418
  "groupCommands.getStatus": {
74886
75419
  capName: "group-commands",
74887
75420
  capScope: "device",
@@ -75848,6 +76381,13 @@ Object.freeze({
75848
76381
  access: "create",
75849
76382
  role: "admin"
75850
76383
  },
76384
+ "meter.getStatus": {
76385
+ capName: "meter",
76386
+ capScope: "device",
76387
+ addonId: null,
76388
+ access: "view",
76389
+ role: "viewer"
76390
+ },
75851
76391
  "metricsProvider.collectSnapshot": {
75852
76392
  capName: "metrics-provider",
75853
76393
  capScope: "system",
@@ -83946,7 +84486,39 @@ var APPLIANCE_CAP_VOCABULARY = {
83946
84486
  phrase: t("When {device} finishes", "Quando {device} finisce"),
83947
84487
  icon: "square"
83948
84488
  }
83949
- }
84489
+ },
84490
+ overrides: { byType: {
84491
+ [DeviceType.Washer]: {
84492
+ state: { running: {
84493
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
84494
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
84495
+ } },
84496
+ events: {
84497
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
84498
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
84499
+ }
84500
+ },
84501
+ [DeviceType.Dryer]: {
84502
+ state: { running: {
84503
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
84504
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
84505
+ } },
84506
+ events: {
84507
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
84508
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
84509
+ }
84510
+ },
84511
+ [DeviceType.Dishwasher]: {
84512
+ state: { running: {
84513
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
84514
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
84515
+ } },
84516
+ events: {
84517
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
84518
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
84519
+ }
84520
+ }
84521
+ } }
83950
84522
  },
83951
84523
  update: {
83952
84524
  scope: "device",
@@ -84718,6 +85290,10 @@ var SENSOR_CAP_VOCABULARY = {
84718
85290
  icon: "flame"
84719
85291
  }]
84720
85292
  },
85293
+ "group-active": {
85294
+ scope: "device",
85295
+ noun: t("Group state", "Stato del gruppo")
85296
+ },
84721
85297
  "group-commands": {
84722
85298
  scope: "device",
84723
85299
  noun: t("Group command", "Comando di gruppo")
@@ -84774,6 +85350,17 @@ var SENSOR_CAP_VOCABULARY = {
84774
85350
  }],
84775
85351
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
84776
85352
  },
85353
+ meter: {
85354
+ scope: "device",
85355
+ noun: t("Meter", "Contatore"),
85356
+ state: [{
85357
+ kind: "numeric",
85358
+ field: "value",
85359
+ quantity: t("the total", "il totale"),
85360
+ label: t("Total", "Totale"),
85361
+ icon: "gauge"
85362
+ }]
85363
+ },
84777
85364
  "numeric-sensor": {
84778
85365
  scope: "device",
84779
85366
  noun: t("Sensor", "Sensore"),
@@ -85246,8 +85833,47 @@ function projectAction(cap, action) {
85246
85833
  };
85247
85834
  }
85248
85835
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
85249
- 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;
85836
+ 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;
85250
85837
  DeviceFeature.BatteryOperated;
85838
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
85839
+ 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.";
85840
+ 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.";
85841
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
85842
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
85843
+ 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.";
85844
+ function withheld(reason) {
85845
+ return {
85846
+ [DeviceType.Washer]: {
85847
+ exported: false,
85848
+ reason
85849
+ },
85850
+ [DeviceType.Dryer]: {
85851
+ exported: false,
85852
+ reason
85853
+ },
85854
+ [DeviceType.Dishwasher]: {
85855
+ exported: false,
85856
+ reason
85857
+ }
85858
+ };
85859
+ }
85860
+ function offered(received) {
85861
+ return {
85862
+ [DeviceType.Washer]: {
85863
+ exported: true,
85864
+ as: received
85865
+ },
85866
+ [DeviceType.Dryer]: {
85867
+ exported: true,
85868
+ as: received
85869
+ },
85870
+ [DeviceType.Dishwasher]: {
85871
+ exported: true,
85872
+ as: received
85873
+ }
85874
+ };
85875
+ }
85876
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
85251
85877
  Object.freeze({
85252
85878
  "accessories.getStatus": [{
85253
85879
  name: "deviceId",
@@ -86214,6 +86840,11 @@ Object.freeze({
86214
86840
  form: "single",
86215
86841
  optional: false
86216
86842
  }],
86843
+ "groupActive.getStatus": [{
86844
+ name: "deviceId",
86845
+ form: "single",
86846
+ optional: false
86847
+ }],
86217
86848
  "groupCommands.getStatus": [{
86218
86849
  name: "deviceId",
86219
86850
  form: "single",
@@ -86424,6 +87055,11 @@ Object.freeze({
86424
87055
  form: "single",
86425
87056
  optional: false
86426
87057
  }],
87058
+ "meter.getStatus": [{
87059
+ name: "deviceId",
87060
+ form: "single",
87061
+ optional: false
87062
+ }],
86427
87063
  "motion.getStatus": [{
86428
87064
  name: "deviceId",
86429
87065
  form: "single",
@@ -88031,7 +88667,6 @@ Object.freeze({
88031
88667
  "network-access": "ingress",
88032
88668
  "smtp-provider": "email"
88033
88669
  });
88034
- DeviceType.Camera;
88035
88670
  /**
88036
88671
  * A saved Customize assignment (D936). The schema is the type: callers use
88037
88672
  * `z.infer`, they do not restate the shape.