@camstack/addon-provider-ecowitt 0.2.148 → 0.2.149

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
@@ -5445,7 +5445,7 @@ var ZodIssueCode$1 = {
5445
5445
  var ZodFirstPartyTypeKind$1;
5446
5446
  ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
5447
5447
  //#endregion
5448
- //#region ../types/dist/sleep-bykKrTgu.mjs
5448
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5449
5449
  /**
5450
5450
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5451
5451
  * window to float samples (D455).
@@ -8638,6 +8638,7 @@ var CAP_NAMES = Object.freeze([
8638
8638
  "filesystem-browse",
8639
8639
  "flood",
8640
8640
  "gas",
8641
+ "group-active",
8641
8642
  "group-commands",
8642
8643
  "group-status",
8643
8644
  "heating-valve",
@@ -8660,6 +8661,7 @@ var CAP_NAMES = Object.freeze([
8660
8661
  "login-method",
8661
8662
  "media-player",
8662
8663
  "mesh-network",
8664
+ "meter",
8663
8665
  "metrics-provider",
8664
8666
  "model-convert",
8665
8667
  "model-distributor",
@@ -9458,6 +9460,10 @@ Object.freeze({
9458
9460
  "path": "detected",
9459
9461
  "valueType": "boolean"
9460
9462
  }],
9463
+ "group-active": [{
9464
+ "path": "active",
9465
+ "valueType": "boolean"
9466
+ }],
9461
9467
  "group-status": [
9462
9468
  {
9463
9469
  "path": "included",
@@ -9717,6 +9723,10 @@ Object.freeze({
9717
9723
  ]
9718
9724
  }
9719
9725
  ],
9726
+ "meter": [{
9727
+ "path": "value",
9728
+ "valueType": "number"
9729
+ }],
9720
9730
  "motion": [
9721
9731
  {
9722
9732
  "path": "detected",
@@ -10474,7 +10484,7 @@ function userError(code, params, englishFallback) {
10474
10484
  return new CamstackError(code, params, englishFallback);
10475
10485
  }
10476
10486
  //#endregion
10477
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10487
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10478
10488
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10479
10489
  DeviceType["Camera"] = "camera";
10480
10490
  DeviceType["Hub"] = "hub";
@@ -10568,8 +10578,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10568
10578
  DeviceType["PetFeeder"] = "pet-feeder";
10569
10579
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10570
10580
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10571
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10581
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10582
+ * A plug-built dishwasher carries running-state and power instead. */
10572
10583
  DeviceType["Dishwasher"] = "dishwasher";
10584
+ /** Washing machine. A plug-built one is running while its power stays
10585
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10586
+ DeviceType["Washer"] = "washer";
10587
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10588
+ DeviceType["Dryer"] = "dryer";
10573
10589
  return DeviceType;
10574
10590
  }({});
10575
10591
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10827,7 +10843,7 @@ function errMsg(err) {
10827
10843
  return String(err);
10828
10844
  }
10829
10845
  //#endregion
10830
- //#region ../types/dist/composition-OhpuespA.mjs
10846
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10831
10847
  /**
10832
10848
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10833
10849
  *
@@ -11142,6 +11158,13 @@ var table = {
11142
11158
  apply: () => {
11143
11159
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11144
11160
  }
11161
+ },
11162
+ schmitt: {
11163
+ minArgs: 3,
11164
+ maxArgs: 5,
11165
+ apply: () => {
11166
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11167
+ }
11145
11168
  }
11146
11169
  };
11147
11170
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11583,6 +11606,99 @@ function validateExpressionSource(src) {
11583
11606
  return null;
11584
11607
  }
11585
11608
  /**
11609
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11610
+ *
11611
+ * Standby of the control board is under 5 W; a motor or a heater is far
11612
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11613
+ * a cycle, so running starts only after 30 s above the line.
11614
+ *
11615
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11616
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11617
+ * report "finished" in the middle of the program, so the stop dwell is
11618
+ * 10 minutes on every type. The number is stored per type so one machine
11619
+ * can move later without moving the others.
11620
+ */
11621
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11622
+ var APPLIANCE_KINDS = [
11623
+ "washer",
11624
+ "dryer",
11625
+ "dishwasher"
11626
+ ];
11627
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11628
+ /**
11629
+ * Statistics and integrals over a history read (D944).
11630
+ *
11631
+ * Pure: the same points always give the same answer, so a restart recomputes
11632
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11633
+ * never the mean of the samples. A hole with no held value is not integrated
11634
+ * as zero. A truncated read is not published.
11635
+ */
11636
+ var STATISTIC_STATS = [
11637
+ "min",
11638
+ "max",
11639
+ "mean",
11640
+ "sum",
11641
+ "count",
11642
+ "change"
11643
+ ];
11644
+ /**
11645
+ * The range a statistics or integral helper asks history for (D944).
11646
+ *
11647
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11648
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11649
+ * is strictly longer than the longest that range can be. Forever qualifies.
11650
+ * Equal to a tier's retention is a refusal, not a short answer.
11651
+ */
11652
+ var MINUTE_MS = 6e4;
11653
+ var HOUR_MS = 60 * MINUTE_MS;
11654
+ var DAY_MS = 24 * HOUR_MS;
11655
+ var ROLLING_SPANS = [
11656
+ "1h",
11657
+ "24h",
11658
+ "2d",
11659
+ "7d",
11660
+ "30d",
11661
+ "custom"
11662
+ ];
11663
+ var CALENDAR_PERIODS = [
11664
+ "today",
11665
+ "yesterday",
11666
+ "this-week",
11667
+ "this-month"
11668
+ ];
11669
+ var RESET_PERIODS = [
11670
+ "never",
11671
+ "daily",
11672
+ "weekly",
11673
+ "monthly"
11674
+ ];
11675
+ 5 * MINUTE_MS;
11676
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11677
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11678
+ var rollingWindowObject = object({
11679
+ kind: literal("rolling"),
11680
+ span: _enum(ROLLING_SPANS),
11681
+ customMinutes: number().int().min(5).optional()
11682
+ }).check((payload) => {
11683
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11684
+ code: "custom",
11685
+ message: "a custom range needs a duration in minutes",
11686
+ path: ["customMinutes"],
11687
+ input: payload.value
11688
+ });
11689
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11690
+ code: "custom",
11691
+ message: "only a custom range carries a duration",
11692
+ path: ["customMinutes"],
11693
+ input: payload.value
11694
+ });
11695
+ });
11696
+ var RollingWindowSchema = rollingWindowObject;
11697
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11698
+ kind: literal("calendar"),
11699
+ period: _enum(CALENDAR_PERIODS)
11700
+ })]);
11701
+ /**
11586
11702
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11587
11703
  * id. Split out so helper schemas can name it without a cycle through
11588
11704
  * `composition.ts` (D659).
@@ -11608,7 +11724,13 @@ var GROUP_TEMPLATE_IDS = [
11608
11724
  "occupancy",
11609
11725
  "binary",
11610
11726
  "switch",
11611
- "light"
11727
+ "light",
11728
+ "fan",
11729
+ "cover",
11730
+ "valve",
11731
+ "lock",
11732
+ "media-player",
11733
+ "climate"
11612
11734
  ];
11613
11735
  var NUMERIC_AGGREGATES = [
11614
11736
  "mean",
@@ -11638,14 +11760,73 @@ var HelperMemberSchema = object({
11638
11760
  cap: string().min(1),
11639
11761
  fieldPath: string().min(1)
11640
11762
  });
11641
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11642
- kind: literal("group"),
11643
- templateId: GroupTemplateIdSchema,
11644
- aggregate: AggregateReducerSchema,
11645
- members: array(HelperMemberSchema).min(1).max(64),
11646
- /** Actuator groups only. Readings leave this unset. */
11647
- active: ActiveCriterionSchema.optional()
11648
- })]);
11763
+ var HelperSpecSchema = discriminatedUnion("kind", [
11764
+ object({
11765
+ kind: literal("group"),
11766
+ templateId: GroupTemplateIdSchema,
11767
+ aggregate: AggregateReducerSchema,
11768
+ members: array(HelperMemberSchema).min(1).max(64),
11769
+ /** Actuator groups only. Readings leave this unset. */
11770
+ active: ActiveCriterionSchema.optional()
11771
+ }),
11772
+ object({
11773
+ kind: literal("appliance"),
11774
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11775
+ appliance: _enum(APPLIANCE_KINDS),
11776
+ thresholdWatts: number().positive(),
11777
+ startDwellMs: number().int().nonnegative(),
11778
+ stopDwellMs: number().int().nonnegative(),
11779
+ member: HelperMemberSchema
11780
+ }),
11781
+ object({
11782
+ kind: literal("statistic"),
11783
+ stat: _enum(STATISTIC_STATS),
11784
+ window: StatisticWindowSchema,
11785
+ source: HelperMemberSchema
11786
+ }),
11787
+ object({
11788
+ kind: literal("integral"),
11789
+ reset: _enum(RESET_PERIODS),
11790
+ output: _enum(["energy", "meter"]),
11791
+ source: HelperMemberSchema
11792
+ }),
11793
+ object({
11794
+ kind: literal("threshold"),
11795
+ source: HelperMemberSchema,
11796
+ high: number(),
11797
+ low: number(),
11798
+ onForMs: number().int().nonnegative(),
11799
+ offForMs: number().int().nonnegative()
11800
+ }),
11801
+ object({
11802
+ kind: literal("arithmetic"),
11803
+ op: _enum([
11804
+ "sum",
11805
+ "difference",
11806
+ "ratio"
11807
+ ]),
11808
+ inputs: array(HelperMemberSchema).min(2).max(64)
11809
+ }),
11810
+ object({
11811
+ kind: literal("expression"),
11812
+ expr: string().min(1),
11813
+ inputs: array(object({
11814
+ name: string().min(1),
11815
+ member: HelperMemberSchema
11816
+ })).min(1).max(64),
11817
+ output: _enum(["number", "boolean"])
11818
+ }),
11819
+ object({
11820
+ kind: literal("derivative"),
11821
+ window: RollingWindowSchema,
11822
+ per: _enum([
11823
+ "second",
11824
+ "minute",
11825
+ "hour"
11826
+ ]),
11827
+ source: HelperMemberSchema
11828
+ })
11829
+ ]);
11649
11830
  /** A composed device's stableId is this prefix plus the block id. */
11650
11831
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11651
11832
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11706,6 +11887,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11706
11887
  "all"
11707
11888
  ]),
11708
11889
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11890
+ /**
11891
+ * Set when the reads are an enum state, not a yes/no: the listed states
11892
+ * count as active (a cover is `open`). A state outside the list is inactive;
11893
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11894
+ */
11895
+ activeWhen: array(string().min(1)).min(1).optional(),
11709
11896
  /** `value` is the reading; the others are the member counts. */
11710
11897
  publish: _enum([
11711
11898
  "value",
@@ -11719,6 +11906,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11719
11906
  "omit",
11720
11907
  "offline"
11721
11908
  ])
11909
+ }),
11910
+ object({
11911
+ kind: literal("series"),
11912
+ read: CompositionFieldReadSchema,
11913
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11914
+ publish: _enum([
11915
+ "value",
11916
+ "included",
11917
+ "excluded",
11918
+ "total"
11919
+ ]),
11920
+ /**
11921
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11922
+ * device unseeded until history answers, so a restart cannot publish 0.
11923
+ */
11924
+ empty: _enum([
11925
+ "null",
11926
+ "omit",
11927
+ "offline"
11928
+ ])
11722
11929
  })
11723
11930
  ]);
11724
11931
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -16878,7 +17085,22 @@ var BrokerProviderInfoSchema = object({
16878
17085
  */
16879
17086
  interactiveConnectPath: string().min(1).optional(),
16880
17087
  /** Relative hub path to disconnect the linked account (same popup pattern). */
16881
- interactiveDisconnectPath: string().min(1).optional()
17088
+ interactiveDisconnectPath: string().min(1).optional(),
17089
+ /**
17090
+ * The kind signs in through a server-held interactive session instead of
17091
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17092
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17093
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17094
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17095
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17096
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17097
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17098
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17099
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17100
+ * offers it as the default path; the fields the session fills are
17101
+ * marked `filledBySignIn` in the kind's settings schema.
17102
+ */
17103
+ signIn: object({ basePath: string().min(1) }).optional()
16882
17104
  }))
16883
17105
  });
16884
17106
  var ListInputSchema = object({
@@ -17983,7 +18205,8 @@ var CompositionProblemSchema = object({
17983
18205
  "native-capability-replace",
17984
18206
  "mixed-quantity",
17985
18207
  "helper-mismatch",
17986
- "member-constraint"
18208
+ "member-constraint",
18209
+ "retention"
17987
18210
  ]),
17988
18211
  path: string(),
17989
18212
  message: string()
@@ -18217,13 +18440,17 @@ Object.freeze({
18217
18440
  latchedAt: {
18218
18441
  kind: "fixed",
18219
18442
  result: ["number", "null"]
18443
+ },
18444
+ schmitt: {
18445
+ kind: "fixed",
18446
+ result: ["boolean", "null"]
18220
18447
  }
18221
18448
  });
18222
18449
  /**
18223
18450
  * One catalog row per base reading a group helper can build (D944 §3).
18224
18451
  * Data, not a form default written into the block.
18225
18452
  */
18226
- var NOW = {
18453
+ var NOW$2 = {
18227
18454
  fieldPath: "lastFetchedAt",
18228
18455
  expr: "now"
18229
18456
  };
@@ -18237,6 +18464,8 @@ function numeric(input) {
18237
18464
  family: "numeric",
18238
18465
  deviceType: DeviceType.Sensor,
18239
18466
  memberDeviceType: DeviceType.Sensor,
18467
+ memberDeviceTypes: [DeviceType.Sensor],
18468
+ activeWhen: void 0,
18240
18469
  commandCaps: [],
18241
18470
  baseUnit: baseUnitOf(input.quantity),
18242
18471
  aggregates: NUMERIC_AGGREGATES,
@@ -18252,6 +18481,8 @@ function binary(input) {
18252
18481
  family: "binary",
18253
18482
  deviceType: DeviceType.Sensor,
18254
18483
  memberDeviceType: DeviceType.Sensor,
18484
+ memberDeviceTypes: [DeviceType.Sensor],
18485
+ activeWhen: void 0,
18255
18486
  commandCaps: [],
18256
18487
  quantity: "none",
18257
18488
  baseUnit: void 0,
@@ -18269,7 +18500,7 @@ var GROUP_TEMPLATES = [
18269
18500
  quantity: "temperature",
18270
18501
  defaultAggregate: "mean",
18271
18502
  empty: "null",
18272
- companions: [NOW]
18503
+ companions: [NOW$2]
18273
18504
  }),
18274
18505
  numeric({
18275
18506
  id: "humidity",
@@ -18280,7 +18511,7 @@ var GROUP_TEMPLATES = [
18280
18511
  quantity: "humidity",
18281
18512
  defaultAggregate: "mean",
18282
18513
  empty: "null",
18283
- companions: [NOW]
18514
+ companions: [NOW$2]
18284
18515
  }),
18285
18516
  numeric({
18286
18517
  id: "pressure",
@@ -18291,7 +18522,7 @@ var GROUP_TEMPLATES = [
18291
18522
  quantity: "pressure",
18292
18523
  defaultAggregate: "mean",
18293
18524
  empty: "null",
18294
- companions: [NOW]
18525
+ companions: [NOW$2]
18295
18526
  }),
18296
18527
  numeric({
18297
18528
  id: "illuminance",
@@ -18302,7 +18533,7 @@ var GROUP_TEMPLATES = [
18302
18533
  quantity: "illuminance",
18303
18534
  defaultAggregate: "mean",
18304
18535
  empty: "null",
18305
- companions: [NOW]
18536
+ companions: [NOW$2]
18306
18537
  }),
18307
18538
  numeric({
18308
18539
  id: "power",
@@ -18313,7 +18544,7 @@ var GROUP_TEMPLATES = [
18313
18544
  quantity: "power",
18314
18545
  defaultAggregate: "sum",
18315
18546
  empty: "omit",
18316
- companions: [NOW]
18547
+ companions: [NOW$2]
18317
18548
  }),
18318
18549
  numeric({
18319
18550
  id: "energy",
@@ -18324,7 +18555,7 @@ var GROUP_TEMPLATES = [
18324
18555
  quantity: "energy",
18325
18556
  defaultAggregate: "sum",
18326
18557
  empty: "omit",
18327
- companions: [NOW]
18558
+ companions: [NOW$2]
18328
18559
  }),
18329
18560
  numeric({
18330
18561
  id: "battery",
@@ -18359,7 +18590,7 @@ var GROUP_TEMPLATES = [
18359
18590
  quantity: "device",
18360
18591
  defaultAggregate: "mean",
18361
18592
  empty: "null",
18362
- companions: [NOW]
18593
+ companions: [NOW$2]
18363
18594
  }),
18364
18595
  binary({
18365
18596
  id: "motion",
@@ -18453,6 +18684,11 @@ var GROUP_TEMPLATES = [
18453
18684
  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.",
18454
18685
  deviceType: DeviceType.Switch,
18455
18686
  outputCap: "switch",
18687
+ outputField: "on",
18688
+ member: {
18689
+ cap: "switch",
18690
+ fieldPath: "on"
18691
+ },
18456
18692
  commandCaps: ["switch"]
18457
18693
  }),
18458
18694
  actuator({
@@ -18460,34 +18696,136 @@ var GROUP_TEMPLATES = [
18460
18696
  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.",
18461
18697
  deviceType: DeviceType.Light,
18462
18698
  outputCap: "switch",
18699
+ outputField: "on",
18700
+ member: {
18701
+ cap: "switch",
18702
+ fieldPath: "on"
18703
+ },
18463
18704
  commandCaps: [
18464
18705
  "switch",
18465
18706
  "brightness",
18466
18707
  "color"
18467
18708
  ]
18709
+ }),
18710
+ actuator({
18711
+ id: "fan",
18712
+ 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.",
18713
+ deviceType: DeviceType.Fan,
18714
+ outputCap: "switch",
18715
+ outputField: "on",
18716
+ member: {
18717
+ cap: "switch",
18718
+ fieldPath: "on"
18719
+ },
18720
+ commandCaps: ["switch", "fan-control"]
18721
+ }),
18722
+ actuator({
18723
+ id: "cover",
18724
+ 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.",
18725
+ deviceType: DeviceType.Cover,
18726
+ outputCap: "group-active",
18727
+ outputField: "active",
18728
+ member: {
18729
+ cap: "cover",
18730
+ fieldPath: "state"
18731
+ },
18732
+ activeWhen: [
18733
+ "open",
18734
+ "opening",
18735
+ "stopped"
18736
+ ],
18737
+ commandCaps: ["cover"]
18738
+ }),
18739
+ actuator({
18740
+ id: "valve",
18741
+ 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.",
18742
+ deviceType: DeviceType.Valve,
18743
+ outputCap: "group-active",
18744
+ outputField: "active",
18745
+ member: {
18746
+ cap: "valve",
18747
+ fieldPath: "state"
18748
+ },
18749
+ activeWhen: [
18750
+ "open",
18751
+ "opening",
18752
+ "stopped"
18753
+ ],
18754
+ commandCaps: ["valve"]
18755
+ }),
18756
+ actuator({
18757
+ id: "lock",
18758
+ 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.",
18759
+ deviceType: DeviceType.Lock,
18760
+ outputCap: "group-active",
18761
+ outputField: "active",
18762
+ member: {
18763
+ cap: "lock-control",
18764
+ fieldPath: "state"
18765
+ },
18766
+ activeWhen: ["locked"],
18767
+ commandCaps: ["lock-control"]
18768
+ }),
18769
+ actuator({
18770
+ id: "media-player",
18771
+ 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.",
18772
+ deviceType: DeviceType.MediaPlayer,
18773
+ outputCap: "group-active",
18774
+ outputField: "active",
18775
+ member: {
18776
+ cap: "media-player",
18777
+ fieldPath: "state"
18778
+ },
18779
+ activeWhen: ["playing", "buffering"],
18780
+ commandCaps: ["media-player"]
18781
+ }),
18782
+ actuator({
18783
+ id: "climate",
18784
+ 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.",
18785
+ deviceType: DeviceType.Thermostat,
18786
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18787
+ outputCap: "group-active",
18788
+ outputField: "active",
18789
+ member: {
18790
+ cap: "climate-control",
18791
+ fieldPath: "mode"
18792
+ },
18793
+ activeWhen: [
18794
+ "heat",
18795
+ "cool",
18796
+ "auto",
18797
+ "heat_cool",
18798
+ "fan_only",
18799
+ "dry"
18800
+ ],
18801
+ commandCaps: ["climate-control"]
18468
18802
  })
18469
18803
  ];
18470
18804
  function actuator(input) {
18471
18805
  return {
18472
- ...input,
18806
+ id: input.id,
18807
+ summary: input.summary,
18808
+ deviceType: input.deviceType,
18809
+ outputCap: input.outputCap,
18810
+ outputField: input.outputField,
18811
+ commandCaps: input.commandCaps,
18473
18812
  family: "actuator",
18474
18813
  role: void 0,
18475
18814
  memberDeviceType: input.deviceType,
18476
- outputField: "on",
18815
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18816
+ activeWhen: input.activeWhen,
18477
18817
  quantity: "none",
18478
18818
  baseUnit: void 0,
18479
18819
  aggregates: BINARY_AGGREGATES,
18480
18820
  defaultAggregate: "any",
18481
18821
  empty: "offline",
18482
- accept: [{
18483
- cap: "switch",
18484
- fieldPath: "on"
18485
- }],
18822
+ accept: [input.member],
18486
18823
  companions: [CHANGED]
18487
18824
  };
18488
18825
  }
18489
18826
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18490
18827
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18828
+ DeviceType.Camera;
18491
18829
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18492
18830
  /**
18493
18831
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43881,7 +44219,7 @@ var NetworkAccessStatusSchema = object({
43881
44219
  });
43882
44220
  /**
43883
44221
  * Optional, richer endpoint shape returned by providers that expose
43884
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44222
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43885
44223
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43886
44224
  * the originating provider config (mode + sourcePort) so the
43887
44225
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46568,7 +46906,20 @@ var NcRuleInputSchema = object({
46568
46906
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46569
46907
  * path does not run Zod defaults.
46570
46908
  */
46571
- groupingSec: number().int().min(5).max(60).optional()
46909
+ groupingSec: number().int().min(5).max(60).optional(),
46910
+ /**
46911
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46912
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46913
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46914
+ * same mark the Library writes, and records whose notification it was and
46915
+ * when. A channel with no buttons gets the same two choices as links.
46916
+ *
46917
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46918
+ * cap path): absent and `false` both mean off, which is what every rule
46919
+ * authored before this field meant. An editor turns it off by writing
46920
+ * `false`, so it needs no `clear` key.
46921
+ */
46922
+ askVerdict: boolean().optional()
46572
46923
  });
46573
46924
  /**
46574
46925
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57288,7 +57639,8 @@ var BATTERY_DEVICE_TYPES = [
57288
57639
  DeviceType.Switch,
57289
57640
  DeviceType.PetFeeder,
57290
57641
  DeviceType.Container,
57291
- DeviceType.Thermostat
57642
+ DeviceType.Thermostat,
57643
+ DeviceType.EventEmitter
57292
57644
  ];
57293
57645
  /** Generic Customize target for the percentage reading (D936). */
57294
57646
  var batteryCustomize = {
@@ -60148,7 +60500,17 @@ var groupCommandsCapability = {
60148
60500
  scope: "device",
60149
60501
  deviceNative: true,
60150
60502
  mode: "singleton",
60151
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60503
+ deviceTypes: [
60504
+ DeviceType.Switch,
60505
+ DeviceType.Light,
60506
+ DeviceType.Fan,
60507
+ DeviceType.Cover,
60508
+ DeviceType.Valve,
60509
+ DeviceType.Lock,
60510
+ DeviceType.MediaPlayer,
60511
+ DeviceType.Thermostat,
60512
+ DeviceType.Climate
60513
+ ],
60152
60514
  methods: {},
60153
60515
  status: {
60154
60516
  schema: GroupCommandsSchema,
@@ -60166,6 +60528,49 @@ var groupCommandsCapability = {
60166
60528
  history: "none"
60167
60529
  };
60168
60530
  /**
60531
+ * Whether a helper actuator group counts as active (D944): at least one
60532
+ * included member is, or every included member is. What "active" means is the
60533
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60534
+ * climate device is not off. A group of lights, switches and fans reports
60535
+ * `switch.on` instead; this cap is for the types whose own state is not a
60536
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60537
+ * empty included set takes the device offline, never `active: false`.
60538
+ */
60539
+ var GroupActiveSchema = object({
60540
+ active: boolean().meta({ label: "Active" }),
60541
+ /** Ms epoch when the slice was last updated. */
60542
+ lastChangedAt: number()
60543
+ });
60544
+ var groupActiveCapability = {
60545
+ name: "group-active",
60546
+ scope: "device",
60547
+ deviceNative: true,
60548
+ mode: "singleton",
60549
+ deviceTypes: [
60550
+ DeviceType.Cover,
60551
+ DeviceType.Valve,
60552
+ DeviceType.Lock,
60553
+ DeviceType.MediaPlayer,
60554
+ DeviceType.Climate,
60555
+ DeviceType.Thermostat
60556
+ ],
60557
+ methods: {},
60558
+ status: {
60559
+ schema: GroupActiveSchema,
60560
+ kind: "push"
60561
+ },
60562
+ runtimeState: GroupActiveSchema,
60563
+ /**
60564
+ * Runtime-state durability: **session** — recomputed from the members on the
60565
+ * next source event; a restored value would outlive the members it named.
60566
+ *
60567
+ * See `RuntimeStateDurability`. Enforced by
60568
+ * `scripts/check-runtime-state-durability.ts`.
60569
+ */
60570
+ durability: "session",
60571
+ history: "none"
60572
+ };
60573
+ /**
60169
60574
  * How many members of a helper group answered (D944). Counts are integers,
60170
60575
  * not measurements: zero included is a real count, never a stand-in reading.
60171
60576
  * The reading itself stays on the output capability. History is none — the
@@ -60196,7 +60601,14 @@ var groupStatusCapability = {
60196
60601
  deviceTypes: [
60197
60602
  DeviceType.Sensor,
60198
60603
  DeviceType.Switch,
60199
- DeviceType.Light
60604
+ DeviceType.Light,
60605
+ DeviceType.Fan,
60606
+ DeviceType.Cover,
60607
+ DeviceType.Valve,
60608
+ DeviceType.Lock,
60609
+ DeviceType.MediaPlayer,
60610
+ DeviceType.Thermostat,
60611
+ DeviceType.Climate
60200
60612
  ],
60201
60613
  methods: {},
60202
60614
  status: {
@@ -61469,7 +61881,14 @@ var lockControlCapability = {
61469
61881
  }),
61470
61882
  unlock: method(object({
61471
61883
  deviceId: number().int().nonnegative(),
61472
- code: string().min(1).optional()
61884
+ code: string().min(1).optional(),
61885
+ /**
61886
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61887
+ * with one call is refused unless the caller says it was confirmed. A
61888
+ * single lock ignores it. The refusal lives in the callee, so no
61889
+ * automation or API caller reaches the doors by skipping a dialog.
61890
+ */
61891
+ confirm: boolean().optional()
61473
61892
  }), _void(), {
61474
61893
  kind: "mutation",
61475
61894
  auth: "protected"
@@ -61506,6 +61925,44 @@ var lockControlCapability = {
61506
61925
  volatileStateFields: ["lastChangedAt"]
61507
61926
  };
61508
61927
  /**
61928
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
61929
+ * so dashboards keep one series; every other instantaneous reading lands here.
61930
+ * `value` is the time integral in the source quantity's accumulated base
61931
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
61932
+ */
61933
+ var MeterStatusSchema = object({
61934
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61935
+ lastFetchedAt: number()
61936
+ });
61937
+ var meterCapability = {
61938
+ name: "meter",
61939
+ scope: "device",
61940
+ deviceNative: true,
61941
+ mode: "singleton",
61942
+ deviceTypes: [DeviceType.Sensor],
61943
+ methods: {},
61944
+ status: {
61945
+ schema: MeterStatusSchema,
61946
+ kind: "push"
61947
+ },
61948
+ runtimeState: MeterStatusSchema,
61949
+ /**
61950
+ * Runtime-state durability: **restored** — the total is a cache of the
61951
+ * history integral. A restart shows it only until the history pass
61952
+ * recomputes the open period; it is not an in-memory buffer.
61953
+ *
61954
+ * See `RuntimeStateDurability`. Enforced by
61955
+ * `scripts/check-runtime-state-durability.ts`.
61956
+ */
61957
+ durability: "restored",
61958
+ history: { fields: { value: {
61959
+ kind: "counter",
61960
+ deadband: .001,
61961
+ minIntervalMs: 6e4
61962
+ } } },
61963
+ volatileStateFields: ["lastFetchedAt"]
61964
+ };
61965
+ /**
61509
61966
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61510
61967
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61511
61968
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64017,9 +64474,9 @@ var PowerMeterStatusSchema = object({
64017
64474
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64018
64475
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64019
64476
  /** Voltage in volts. */
64020
- volts: number().optional().meta(readingMeta("voltage")),
64477
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64021
64478
  /** Current in amperes. */
64022
- amps: number().optional().meta(readingMeta("current")),
64479
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64023
64480
  /** Apparent power in volt-amperes. */
64024
64481
  va: number().optional().meta(readingMeta("apparent-power")),
64025
64482
  /** Power factor (0..1) if reported. */
@@ -64027,12 +64484,74 @@ var PowerMeterStatusSchema = object({
64027
64484
  /** Ms epoch when the slice was last updated. */
64028
64485
  lastFetchedAt: number()
64029
64486
  });
64487
+ /**
64488
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64489
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64490
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64491
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64492
+ * camera and the like are left out: their draw is not what anyone meters.
64493
+ */
64494
+ var POWER_METER_DEVICE_TYPES = [
64495
+ DeviceType.Sensor,
64496
+ DeviceType.Switch,
64497
+ DeviceType.Light,
64498
+ DeviceType.Fan,
64499
+ DeviceType.Climate,
64500
+ DeviceType.Thermostat,
64501
+ DeviceType.Humidifier,
64502
+ DeviceType.WaterHeater,
64503
+ DeviceType.MediaPlayer,
64504
+ DeviceType.Washer,
64505
+ DeviceType.Dryer,
64506
+ DeviceType.Dishwasher,
64507
+ DeviceType.Vacuum,
64508
+ DeviceType.LawnMower,
64509
+ DeviceType.PetFeeder
64510
+ ];
64511
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64512
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64513
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64514
+ function powerTarget(id, unit) {
64515
+ return {
64516
+ id,
64517
+ cardinality: "scalar",
64518
+ vocabulary: {
64519
+ cap: "power-meter",
64520
+ stateField: id
64521
+ },
64522
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64523
+ apply: "add",
64524
+ path: id,
64525
+ sources: [{
64526
+ kind: "numeric",
64527
+ requiredUnit: unit,
64528
+ transforms: [{ kind: "identity" }]
64529
+ }],
64530
+ companions: [{
64531
+ kind: "clock",
64532
+ path: "lastFetchedAt",
64533
+ when: "always"
64534
+ }],
64535
+ sourceReport: { status: "assignment-status" },
64536
+ advancedExpression: true
64537
+ };
64538
+ }
64539
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64540
+ var powerMeterCustomize = {
64541
+ version: 1,
64542
+ targets: [
64543
+ powerTarget("watts", "W"),
64544
+ powerTarget("kwhTotal", "kWh"),
64545
+ powerTarget("volts", "V"),
64546
+ powerTarget("amps", "A")
64547
+ ]
64548
+ };
64030
64549
  var powerMeterCapability = {
64031
64550
  name: "power-meter",
64032
64551
  scope: "device",
64033
64552
  deviceNative: true,
64034
64553
  mode: "singleton",
64035
- deviceTypes: [DeviceType.Sensor],
64554
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64036
64555
  methods: {},
64037
64556
  status: {
64038
64557
  schema: PowerMeterStatusSchema,
@@ -64089,7 +64608,8 @@ var powerMeterCapability = {
64089
64608
  } },
64090
64609
  /** Clock fields: written, but excluded from the compare that decides
64091
64610
  * whether persisting is worth a SQLite commit. */
64092
- volatileStateFields: ["lastFetchedAt"]
64611
+ volatileStateFields: ["lastFetchedAt"],
64612
+ customize: powerMeterCustomize
64093
64613
  };
64094
64614
  /**
64095
64615
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64770,6 +65290,8 @@ var runningCustomize = {
64770
65290
  stateField: "running"
64771
65291
  },
64772
65292
  deviceTypes: [
65293
+ DeviceType.Washer,
65294
+ DeviceType.Dryer,
64773
65295
  DeviceType.Dishwasher,
64774
65296
  DeviceType.Vacuum,
64775
65297
  DeviceType.LawnMower,
@@ -67259,7 +67781,8 @@ var switchCapability = {
67259
67781
  deviceTypes: [
67260
67782
  DeviceType.Switch,
67261
67783
  DeviceType.Siren,
67262
- DeviceType.Light
67784
+ DeviceType.Light,
67785
+ DeviceType.Fan
67263
67786
  ],
67264
67787
  methods: { setState: method(object({
67265
67788
  deviceId: number(),
@@ -69472,6 +69995,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
69472
69995
  kind: "mutation",
69473
69996
  auth: "admin"
69474
69997
  });
69998
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69475
69999
  /**
69476
70000
  * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
69477
70001
  * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
@@ -69856,7 +70380,7 @@ function tryConvertUnit(value, from, to) {
69856
70380
  return fromCanonical(toCanonical(value, fromSpec), toSpec);
69857
70381
  }
69858
70382
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
69859
- 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;
70383
+ 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;
69860
70384
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
69861
70385
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
69862
70386
  new Set(CAP_NAMES);
@@ -70185,6 +70709,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70185
70709
  featureProbe: featureProbeCapability,
70186
70710
  flood: floodCapability,
70187
70711
  gas: gasCapability,
70712
+ groupActive: groupActiveCapability,
70188
70713
  groupCommands: groupCommandsCapability,
70189
70714
  groupStatus: groupStatusCapability,
70190
70715
  heatingValve: heatingValveCapability,
@@ -70196,6 +70721,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70196
70721
  lawnMowerControl: lawnMowerControlCapability,
70197
70722
  lockControl: lockControlCapability,
70198
70723
  mediaPlayer: mediaPlayerCapability,
70724
+ meter: meterCapability,
70199
70725
  motion: motionCapability,
70200
70726
  motionTrigger: motionTriggerCapability,
70201
70727
  motionZones: motionZonesCapability,
@@ -71455,7 +71981,7 @@ var BaseDeviceProvider = class extends BaseAddon {
71455
71981
  return toDeviceSummary(device, this.addonId);
71456
71982
  }
71457
71983
  };
71458
- 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;
71984
+ 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;
71459
71985
  new Set(Object.values(DeviceType));
71460
71986
  Object.freeze({
71461
71987
  "accessories.getStatus": {
@@ -74678,6 +75204,13 @@ Object.freeze({
74678
75204
  access: "view",
74679
75205
  role: "viewer"
74680
75206
  },
75207
+ "groupActive.getStatus": {
75208
+ capName: "group-active",
75209
+ capScope: "device",
75210
+ addonId: null,
75211
+ access: "view",
75212
+ role: "viewer"
75213
+ },
74681
75214
  "groupCommands.getStatus": {
74682
75215
  capName: "group-commands",
74683
75216
  capScope: "device",
@@ -75644,6 +76177,13 @@ Object.freeze({
75644
76177
  access: "create",
75645
76178
  role: "admin"
75646
76179
  },
76180
+ "meter.getStatus": {
76181
+ capName: "meter",
76182
+ capScope: "device",
76183
+ addonId: null,
76184
+ access: "view",
76185
+ role: "viewer"
76186
+ },
75647
76187
  "metricsProvider.collectSnapshot": {
75648
76188
  capName: "metrics-provider",
75649
76189
  capScope: "system",
@@ -83742,7 +84282,39 @@ var APPLIANCE_CAP_VOCABULARY = {
83742
84282
  phrase: t("When {device} finishes", "Quando {device} finisce"),
83743
84283
  icon: "square"
83744
84284
  }
83745
- }
84285
+ },
84286
+ overrides: { byType: {
84287
+ [DeviceType.Washer]: {
84288
+ state: { running: {
84289
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
84290
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
84291
+ } },
84292
+ events: {
84293
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
84294
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
84295
+ }
84296
+ },
84297
+ [DeviceType.Dryer]: {
84298
+ state: { running: {
84299
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
84300
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
84301
+ } },
84302
+ events: {
84303
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
84304
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
84305
+ }
84306
+ },
84307
+ [DeviceType.Dishwasher]: {
84308
+ state: { running: {
84309
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
84310
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
84311
+ } },
84312
+ events: {
84313
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
84314
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
84315
+ }
84316
+ }
84317
+ } }
83746
84318
  },
83747
84319
  update: {
83748
84320
  scope: "device",
@@ -84514,6 +85086,10 @@ var SENSOR_CAP_VOCABULARY = {
84514
85086
  icon: "flame"
84515
85087
  }]
84516
85088
  },
85089
+ "group-active": {
85090
+ scope: "device",
85091
+ noun: t("Group state", "Stato del gruppo")
85092
+ },
84517
85093
  "group-commands": {
84518
85094
  scope: "device",
84519
85095
  noun: t("Group command", "Comando di gruppo")
@@ -84570,6 +85146,17 @@ var SENSOR_CAP_VOCABULARY = {
84570
85146
  }],
84571
85147
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
84572
85148
  },
85149
+ meter: {
85150
+ scope: "device",
85151
+ noun: t("Meter", "Contatore"),
85152
+ state: [{
85153
+ kind: "numeric",
85154
+ field: "value",
85155
+ quantity: t("the total", "il totale"),
85156
+ label: t("Total", "Totale"),
85157
+ icon: "gauge"
85158
+ }]
85159
+ },
84573
85160
  "numeric-sensor": {
84574
85161
  scope: "device",
84575
85162
  noun: t("Sensor", "Sensore"),
@@ -85042,8 +85629,47 @@ function projectAction(cap, action) {
85042
85629
  };
85043
85630
  }
85044
85631
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
85045
- 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;
85632
+ 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;
85046
85633
  DeviceFeature.BatteryOperated;
85634
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
85635
+ 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.";
85636
+ 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.";
85637
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
85638
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
85639
+ 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.";
85640
+ function withheld(reason) {
85641
+ return {
85642
+ [DeviceType.Washer]: {
85643
+ exported: false,
85644
+ reason
85645
+ },
85646
+ [DeviceType.Dryer]: {
85647
+ exported: false,
85648
+ reason
85649
+ },
85650
+ [DeviceType.Dishwasher]: {
85651
+ exported: false,
85652
+ reason
85653
+ }
85654
+ };
85655
+ }
85656
+ function offered(received) {
85657
+ return {
85658
+ [DeviceType.Washer]: {
85659
+ exported: true,
85660
+ as: received
85661
+ },
85662
+ [DeviceType.Dryer]: {
85663
+ exported: true,
85664
+ as: received
85665
+ },
85666
+ [DeviceType.Dishwasher]: {
85667
+ exported: true,
85668
+ as: received
85669
+ }
85670
+ };
85671
+ }
85672
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
85047
85673
  Object.freeze({
85048
85674
  "accessories.getStatus": [{
85049
85675
  name: "deviceId",
@@ -86010,6 +86636,11 @@ Object.freeze({
86010
86636
  form: "single",
86011
86637
  optional: false
86012
86638
  }],
86639
+ "groupActive.getStatus": [{
86640
+ name: "deviceId",
86641
+ form: "single",
86642
+ optional: false
86643
+ }],
86013
86644
  "groupCommands.getStatus": [{
86014
86645
  name: "deviceId",
86015
86646
  form: "single",
@@ -86220,6 +86851,11 @@ Object.freeze({
86220
86851
  form: "single",
86221
86852
  optional: false
86222
86853
  }],
86854
+ "meter.getStatus": [{
86855
+ name: "deviceId",
86856
+ form: "single",
86857
+ optional: false
86858
+ }],
86223
86859
  "motion.getStatus": [{
86224
86860
  name: "deviceId",
86225
86861
  form: "single",
@@ -87827,7 +88463,6 @@ Object.freeze({
87827
88463
  "network-access": "ingress",
87828
88464
  "smtp-provider": "email"
87829
88465
  });
87830
- DeviceType.Camera;
87831
88466
  /**
87832
88467
  * A saved Customize assignment (D936). The schema is the type: callers use
87833
88468
  * `z.infer`, they do not restate the shape.