@camstack/addon-provider-hikvision 1.2.176 → 1.2.177

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
@@ -5477,7 +5477,7 @@ var ZodIssueCode = {
5477
5477
  var ZodFirstPartyTypeKind;
5478
5478
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5479
5479
  //#endregion
5480
- //#region ../types/dist/sleep-bykKrTgu.mjs
5480
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5481
5481
  /**
5482
5482
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5483
5483
  * window to float samples (D455).
@@ -8682,6 +8682,7 @@ var CAP_NAMES = Object.freeze([
8682
8682
  "filesystem-browse",
8683
8683
  "flood",
8684
8684
  "gas",
8685
+ "group-active",
8685
8686
  "group-commands",
8686
8687
  "group-status",
8687
8688
  "heating-valve",
@@ -8704,6 +8705,7 @@ var CAP_NAMES = Object.freeze([
8704
8705
  "login-method",
8705
8706
  "media-player",
8706
8707
  "mesh-network",
8708
+ "meter",
8707
8709
  "metrics-provider",
8708
8710
  "model-convert",
8709
8711
  "model-distributor",
@@ -9502,6 +9504,10 @@ Object.freeze({
9502
9504
  "path": "detected",
9503
9505
  "valueType": "boolean"
9504
9506
  }],
9507
+ "group-active": [{
9508
+ "path": "active",
9509
+ "valueType": "boolean"
9510
+ }],
9505
9511
  "group-status": [
9506
9512
  {
9507
9513
  "path": "included",
@@ -9761,6 +9767,10 @@ Object.freeze({
9761
9767
  ]
9762
9768
  }
9763
9769
  ],
9770
+ "meter": [{
9771
+ "path": "value",
9772
+ "valueType": "number"
9773
+ }],
9764
9774
  "motion": [
9765
9775
  {
9766
9776
  "path": "detected",
@@ -10518,7 +10528,7 @@ function userError(code, params, englishFallback) {
10518
10528
  return new CamstackError(code, params, englishFallback);
10519
10529
  }
10520
10530
  //#endregion
10521
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10531
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10522
10532
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10523
10533
  DeviceType["Camera"] = "camera";
10524
10534
  DeviceType["Hub"] = "hub";
@@ -10612,8 +10622,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10612
10622
  DeviceType["PetFeeder"] = "pet-feeder";
10613
10623
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10614
10624
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10615
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10625
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10626
+ * A plug-built dishwasher carries running-state and power instead. */
10616
10627
  DeviceType["Dishwasher"] = "dishwasher";
10628
+ /** Washing machine. A plug-built one is running while its power stays
10629
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10630
+ DeviceType["Washer"] = "washer";
10631
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10632
+ DeviceType["Dryer"] = "dryer";
10617
10633
  return DeviceType;
10618
10634
  }({});
10619
10635
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10861,7 +10877,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
10861
10877
  return DeviceRole;
10862
10878
  }({});
10863
10879
  //#endregion
10864
- //#region ../types/dist/composition-OhpuespA.mjs
10880
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10865
10881
  /**
10866
10882
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10867
10883
  *
@@ -11176,6 +11192,13 @@ var table = {
11176
11192
  apply: () => {
11177
11193
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11178
11194
  }
11195
+ },
11196
+ schmitt: {
11197
+ minArgs: 3,
11198
+ maxArgs: 5,
11199
+ apply: () => {
11200
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11201
+ }
11179
11202
  }
11180
11203
  };
11181
11204
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11617,6 +11640,99 @@ function validateExpressionSource(src) {
11617
11640
  return null;
11618
11641
  }
11619
11642
  /**
11643
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11644
+ *
11645
+ * Standby of the control board is under 5 W; a motor or a heater is far
11646
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11647
+ * a cycle, so running starts only after 30 s above the line.
11648
+ *
11649
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11650
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11651
+ * report "finished" in the middle of the program, so the stop dwell is
11652
+ * 10 minutes on every type. The number is stored per type so one machine
11653
+ * can move later without moving the others.
11654
+ */
11655
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11656
+ var APPLIANCE_KINDS = [
11657
+ "washer",
11658
+ "dryer",
11659
+ "dishwasher"
11660
+ ];
11661
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11662
+ /**
11663
+ * Statistics and integrals over a history read (D944).
11664
+ *
11665
+ * Pure: the same points always give the same answer, so a restart recomputes
11666
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11667
+ * never the mean of the samples. A hole with no held value is not integrated
11668
+ * as zero. A truncated read is not published.
11669
+ */
11670
+ var STATISTIC_STATS = [
11671
+ "min",
11672
+ "max",
11673
+ "mean",
11674
+ "sum",
11675
+ "count",
11676
+ "change"
11677
+ ];
11678
+ /**
11679
+ * The range a statistics or integral helper asks history for (D944).
11680
+ *
11681
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11682
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11683
+ * is strictly longer than the longest that range can be. Forever qualifies.
11684
+ * Equal to a tier's retention is a refusal, not a short answer.
11685
+ */
11686
+ var MINUTE_MS = 6e4;
11687
+ var HOUR_MS = 60 * MINUTE_MS;
11688
+ var DAY_MS = 24 * HOUR_MS;
11689
+ var ROLLING_SPANS = [
11690
+ "1h",
11691
+ "24h",
11692
+ "2d",
11693
+ "7d",
11694
+ "30d",
11695
+ "custom"
11696
+ ];
11697
+ var CALENDAR_PERIODS = [
11698
+ "today",
11699
+ "yesterday",
11700
+ "this-week",
11701
+ "this-month"
11702
+ ];
11703
+ var RESET_PERIODS = [
11704
+ "never",
11705
+ "daily",
11706
+ "weekly",
11707
+ "monthly"
11708
+ ];
11709
+ 5 * MINUTE_MS;
11710
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11711
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11712
+ var rollingWindowObject = object({
11713
+ kind: literal("rolling"),
11714
+ span: _enum(ROLLING_SPANS),
11715
+ customMinutes: number().int().min(5).optional()
11716
+ }).check((payload) => {
11717
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11718
+ code: "custom",
11719
+ message: "a custom range needs a duration in minutes",
11720
+ path: ["customMinutes"],
11721
+ input: payload.value
11722
+ });
11723
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11724
+ code: "custom",
11725
+ message: "only a custom range carries a duration",
11726
+ path: ["customMinutes"],
11727
+ input: payload.value
11728
+ });
11729
+ });
11730
+ var RollingWindowSchema = rollingWindowObject;
11731
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11732
+ kind: literal("calendar"),
11733
+ period: _enum(CALENDAR_PERIODS)
11734
+ })]);
11735
+ /**
11620
11736
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11621
11737
  * id. Split out so helper schemas can name it without a cycle through
11622
11738
  * `composition.ts` (D659).
@@ -11642,7 +11758,13 @@ var GROUP_TEMPLATE_IDS = [
11642
11758
  "occupancy",
11643
11759
  "binary",
11644
11760
  "switch",
11645
- "light"
11761
+ "light",
11762
+ "fan",
11763
+ "cover",
11764
+ "valve",
11765
+ "lock",
11766
+ "media-player",
11767
+ "climate"
11646
11768
  ];
11647
11769
  var NUMERIC_AGGREGATES = [
11648
11770
  "mean",
@@ -11672,14 +11794,73 @@ var HelperMemberSchema = object({
11672
11794
  cap: string().min(1),
11673
11795
  fieldPath: string().min(1)
11674
11796
  });
11675
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11676
- kind: literal("group"),
11677
- templateId: GroupTemplateIdSchema,
11678
- aggregate: AggregateReducerSchema,
11679
- members: array(HelperMemberSchema).min(1).max(64),
11680
- /** Actuator groups only. Readings leave this unset. */
11681
- active: ActiveCriterionSchema.optional()
11682
- })]);
11797
+ var HelperSpecSchema = discriminatedUnion("kind", [
11798
+ object({
11799
+ kind: literal("group"),
11800
+ templateId: GroupTemplateIdSchema,
11801
+ aggregate: AggregateReducerSchema,
11802
+ members: array(HelperMemberSchema).min(1).max(64),
11803
+ /** Actuator groups only. Readings leave this unset. */
11804
+ active: ActiveCriterionSchema.optional()
11805
+ }),
11806
+ object({
11807
+ kind: literal("appliance"),
11808
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11809
+ appliance: _enum(APPLIANCE_KINDS),
11810
+ thresholdWatts: number().positive(),
11811
+ startDwellMs: number().int().nonnegative(),
11812
+ stopDwellMs: number().int().nonnegative(),
11813
+ member: HelperMemberSchema
11814
+ }),
11815
+ object({
11816
+ kind: literal("statistic"),
11817
+ stat: _enum(STATISTIC_STATS),
11818
+ window: StatisticWindowSchema,
11819
+ source: HelperMemberSchema
11820
+ }),
11821
+ object({
11822
+ kind: literal("integral"),
11823
+ reset: _enum(RESET_PERIODS),
11824
+ output: _enum(["energy", "meter"]),
11825
+ source: HelperMemberSchema
11826
+ }),
11827
+ object({
11828
+ kind: literal("threshold"),
11829
+ source: HelperMemberSchema,
11830
+ high: number(),
11831
+ low: number(),
11832
+ onForMs: number().int().nonnegative(),
11833
+ offForMs: number().int().nonnegative()
11834
+ }),
11835
+ object({
11836
+ kind: literal("arithmetic"),
11837
+ op: _enum([
11838
+ "sum",
11839
+ "difference",
11840
+ "ratio"
11841
+ ]),
11842
+ inputs: array(HelperMemberSchema).min(2).max(64)
11843
+ }),
11844
+ object({
11845
+ kind: literal("expression"),
11846
+ expr: string().min(1),
11847
+ inputs: array(object({
11848
+ name: string().min(1),
11849
+ member: HelperMemberSchema
11850
+ })).min(1).max(64),
11851
+ output: _enum(["number", "boolean"])
11852
+ }),
11853
+ object({
11854
+ kind: literal("derivative"),
11855
+ window: RollingWindowSchema,
11856
+ per: _enum([
11857
+ "second",
11858
+ "minute",
11859
+ "hour"
11860
+ ]),
11861
+ source: HelperMemberSchema
11862
+ })
11863
+ ]);
11683
11864
  /** A composed device's stableId is this prefix plus the block id. */
11684
11865
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11685
11866
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11740,6 +11921,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11740
11921
  "all"
11741
11922
  ]),
11742
11923
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11924
+ /**
11925
+ * Set when the reads are an enum state, not a yes/no: the listed states
11926
+ * count as active (a cover is `open`). A state outside the list is inactive;
11927
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11928
+ */
11929
+ activeWhen: array(string().min(1)).min(1).optional(),
11743
11930
  /** `value` is the reading; the others are the member counts. */
11744
11931
  publish: _enum([
11745
11932
  "value",
@@ -11753,6 +11940,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11753
11940
  "omit",
11754
11941
  "offline"
11755
11942
  ])
11943
+ }),
11944
+ object({
11945
+ kind: literal("series"),
11946
+ read: CompositionFieldReadSchema,
11947
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11948
+ publish: _enum([
11949
+ "value",
11950
+ "included",
11951
+ "excluded",
11952
+ "total"
11953
+ ]),
11954
+ /**
11955
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11956
+ * device unseeded until history answers, so a restart cannot publish 0.
11957
+ */
11958
+ empty: _enum([
11959
+ "null",
11960
+ "omit",
11961
+ "offline"
11962
+ ])
11756
11963
  })
11757
11964
  ]);
11758
11965
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17231,7 +17438,22 @@ var BrokerProviderInfoSchema = object({
17231
17438
  */
17232
17439
  interactiveConnectPath: string().min(1).optional(),
17233
17440
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17234
- interactiveDisconnectPath: string().min(1).optional()
17441
+ interactiveDisconnectPath: string().min(1).optional(),
17442
+ /**
17443
+ * The kind signs in through a server-held interactive session instead of
17444
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17445
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17446
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17447
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17448
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17449
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17450
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17451
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17452
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17453
+ * offers it as the default path; the fields the session fills are
17454
+ * marked `filledBySignIn` in the kind's settings schema.
17455
+ */
17456
+ signIn: object({ basePath: string().min(1) }).optional()
17235
17457
  }))
17236
17458
  });
17237
17459
  var ListInputSchema = object({
@@ -18336,7 +18558,8 @@ var CompositionProblemSchema = object({
18336
18558
  "native-capability-replace",
18337
18559
  "mixed-quantity",
18338
18560
  "helper-mismatch",
18339
- "member-constraint"
18561
+ "member-constraint",
18562
+ "retention"
18340
18563
  ]),
18341
18564
  path: string(),
18342
18565
  message: string()
@@ -18570,13 +18793,17 @@ Object.freeze({
18570
18793
  latchedAt: {
18571
18794
  kind: "fixed",
18572
18795
  result: ["number", "null"]
18796
+ },
18797
+ schmitt: {
18798
+ kind: "fixed",
18799
+ result: ["boolean", "null"]
18573
18800
  }
18574
18801
  });
18575
18802
  /**
18576
18803
  * One catalog row per base reading a group helper can build (D944 §3).
18577
18804
  * Data, not a form default written into the block.
18578
18805
  */
18579
- var NOW = {
18806
+ var NOW$2 = {
18580
18807
  fieldPath: "lastFetchedAt",
18581
18808
  expr: "now"
18582
18809
  };
@@ -18590,6 +18817,8 @@ function numeric(input) {
18590
18817
  family: "numeric",
18591
18818
  deviceType: DeviceType.Sensor,
18592
18819
  memberDeviceType: DeviceType.Sensor,
18820
+ memberDeviceTypes: [DeviceType.Sensor],
18821
+ activeWhen: void 0,
18593
18822
  commandCaps: [],
18594
18823
  baseUnit: baseUnitOf(input.quantity),
18595
18824
  aggregates: NUMERIC_AGGREGATES,
@@ -18605,6 +18834,8 @@ function binary(input) {
18605
18834
  family: "binary",
18606
18835
  deviceType: DeviceType.Sensor,
18607
18836
  memberDeviceType: DeviceType.Sensor,
18837
+ memberDeviceTypes: [DeviceType.Sensor],
18838
+ activeWhen: void 0,
18608
18839
  commandCaps: [],
18609
18840
  quantity: "none",
18610
18841
  baseUnit: void 0,
@@ -18622,7 +18853,7 @@ var GROUP_TEMPLATES = [
18622
18853
  quantity: "temperature",
18623
18854
  defaultAggregate: "mean",
18624
18855
  empty: "null",
18625
- companions: [NOW]
18856
+ companions: [NOW$2]
18626
18857
  }),
18627
18858
  numeric({
18628
18859
  id: "humidity",
@@ -18633,7 +18864,7 @@ var GROUP_TEMPLATES = [
18633
18864
  quantity: "humidity",
18634
18865
  defaultAggregate: "mean",
18635
18866
  empty: "null",
18636
- companions: [NOW]
18867
+ companions: [NOW$2]
18637
18868
  }),
18638
18869
  numeric({
18639
18870
  id: "pressure",
@@ -18644,7 +18875,7 @@ var GROUP_TEMPLATES = [
18644
18875
  quantity: "pressure",
18645
18876
  defaultAggregate: "mean",
18646
18877
  empty: "null",
18647
- companions: [NOW]
18878
+ companions: [NOW$2]
18648
18879
  }),
18649
18880
  numeric({
18650
18881
  id: "illuminance",
@@ -18655,7 +18886,7 @@ var GROUP_TEMPLATES = [
18655
18886
  quantity: "illuminance",
18656
18887
  defaultAggregate: "mean",
18657
18888
  empty: "null",
18658
- companions: [NOW]
18889
+ companions: [NOW$2]
18659
18890
  }),
18660
18891
  numeric({
18661
18892
  id: "power",
@@ -18666,7 +18897,7 @@ var GROUP_TEMPLATES = [
18666
18897
  quantity: "power",
18667
18898
  defaultAggregate: "sum",
18668
18899
  empty: "omit",
18669
- companions: [NOW]
18900
+ companions: [NOW$2]
18670
18901
  }),
18671
18902
  numeric({
18672
18903
  id: "energy",
@@ -18677,7 +18908,7 @@ var GROUP_TEMPLATES = [
18677
18908
  quantity: "energy",
18678
18909
  defaultAggregate: "sum",
18679
18910
  empty: "omit",
18680
- companions: [NOW]
18911
+ companions: [NOW$2]
18681
18912
  }),
18682
18913
  numeric({
18683
18914
  id: "battery",
@@ -18712,7 +18943,7 @@ var GROUP_TEMPLATES = [
18712
18943
  quantity: "device",
18713
18944
  defaultAggregate: "mean",
18714
18945
  empty: "null",
18715
- companions: [NOW]
18946
+ companions: [NOW$2]
18716
18947
  }),
18717
18948
  binary({
18718
18949
  id: "motion",
@@ -18806,6 +19037,11 @@ var GROUP_TEMPLATES = [
18806
19037
  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.",
18807
19038
  deviceType: DeviceType.Switch,
18808
19039
  outputCap: "switch",
19040
+ outputField: "on",
19041
+ member: {
19042
+ cap: "switch",
19043
+ fieldPath: "on"
19044
+ },
18809
19045
  commandCaps: ["switch"]
18810
19046
  }),
18811
19047
  actuator({
@@ -18813,34 +19049,136 @@ var GROUP_TEMPLATES = [
18813
19049
  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.",
18814
19050
  deviceType: DeviceType.Light,
18815
19051
  outputCap: "switch",
19052
+ outputField: "on",
19053
+ member: {
19054
+ cap: "switch",
19055
+ fieldPath: "on"
19056
+ },
18816
19057
  commandCaps: [
18817
19058
  "switch",
18818
19059
  "brightness",
18819
19060
  "color"
18820
19061
  ]
19062
+ }),
19063
+ actuator({
19064
+ id: "fan",
19065
+ 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.",
19066
+ deviceType: DeviceType.Fan,
19067
+ outputCap: "switch",
19068
+ outputField: "on",
19069
+ member: {
19070
+ cap: "switch",
19071
+ fieldPath: "on"
19072
+ },
19073
+ commandCaps: ["switch", "fan-control"]
19074
+ }),
19075
+ actuator({
19076
+ id: "cover",
19077
+ 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.",
19078
+ deviceType: DeviceType.Cover,
19079
+ outputCap: "group-active",
19080
+ outputField: "active",
19081
+ member: {
19082
+ cap: "cover",
19083
+ fieldPath: "state"
19084
+ },
19085
+ activeWhen: [
19086
+ "open",
19087
+ "opening",
19088
+ "stopped"
19089
+ ],
19090
+ commandCaps: ["cover"]
19091
+ }),
19092
+ actuator({
19093
+ id: "valve",
19094
+ 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.",
19095
+ deviceType: DeviceType.Valve,
19096
+ outputCap: "group-active",
19097
+ outputField: "active",
19098
+ member: {
19099
+ cap: "valve",
19100
+ fieldPath: "state"
19101
+ },
19102
+ activeWhen: [
19103
+ "open",
19104
+ "opening",
19105
+ "stopped"
19106
+ ],
19107
+ commandCaps: ["valve"]
19108
+ }),
19109
+ actuator({
19110
+ id: "lock",
19111
+ 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.",
19112
+ deviceType: DeviceType.Lock,
19113
+ outputCap: "group-active",
19114
+ outputField: "active",
19115
+ member: {
19116
+ cap: "lock-control",
19117
+ fieldPath: "state"
19118
+ },
19119
+ activeWhen: ["locked"],
19120
+ commandCaps: ["lock-control"]
19121
+ }),
19122
+ actuator({
19123
+ id: "media-player",
19124
+ 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.",
19125
+ deviceType: DeviceType.MediaPlayer,
19126
+ outputCap: "group-active",
19127
+ outputField: "active",
19128
+ member: {
19129
+ cap: "media-player",
19130
+ fieldPath: "state"
19131
+ },
19132
+ activeWhen: ["playing", "buffering"],
19133
+ commandCaps: ["media-player"]
19134
+ }),
19135
+ actuator({
19136
+ id: "climate",
19137
+ 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.",
19138
+ deviceType: DeviceType.Thermostat,
19139
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19140
+ outputCap: "group-active",
19141
+ outputField: "active",
19142
+ member: {
19143
+ cap: "climate-control",
19144
+ fieldPath: "mode"
19145
+ },
19146
+ activeWhen: [
19147
+ "heat",
19148
+ "cool",
19149
+ "auto",
19150
+ "heat_cool",
19151
+ "fan_only",
19152
+ "dry"
19153
+ ],
19154
+ commandCaps: ["climate-control"]
18821
19155
  })
18822
19156
  ];
18823
19157
  function actuator(input) {
18824
19158
  return {
18825
- ...input,
19159
+ id: input.id,
19160
+ summary: input.summary,
19161
+ deviceType: input.deviceType,
19162
+ outputCap: input.outputCap,
19163
+ outputField: input.outputField,
19164
+ commandCaps: input.commandCaps,
18826
19165
  family: "actuator",
18827
19166
  role: void 0,
18828
19167
  memberDeviceType: input.deviceType,
18829
- outputField: "on",
19168
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19169
+ activeWhen: input.activeWhen,
18830
19170
  quantity: "none",
18831
19171
  baseUnit: void 0,
18832
19172
  aggregates: BINARY_AGGREGATES,
18833
19173
  defaultAggregate: "any",
18834
19174
  empty: "offline",
18835
- accept: [{
18836
- cap: "switch",
18837
- fieldPath: "on"
18838
- }],
19175
+ accept: [input.member],
18839
19176
  companions: [CHANGED]
18840
19177
  };
18841
19178
  }
18842
19179
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18843
19180
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19181
+ DeviceType.Camera;
18844
19182
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18845
19183
  /**
18846
19184
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -44179,7 +44517,7 @@ var NetworkAccessStatusSchema = object({
44179
44517
  });
44180
44518
  /**
44181
44519
  * Optional, richer endpoint shape returned by providers that expose
44182
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44520
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44183
44521
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44184
44522
  * the originating provider config (mode + sourcePort) so the
44185
44523
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46866,7 +47204,20 @@ var NcRuleInputSchema = object({
46866
47204
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46867
47205
  * path does not run Zod defaults.
46868
47206
  */
46869
- groupingSec: number().int().min(5).max(60).optional()
47207
+ groupingSec: number().int().min(5).max(60).optional(),
47208
+ /**
47209
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
47210
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
47211
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
47212
+ * same mark the Library writes, and records whose notification it was and
47213
+ * when. A channel with no buttons gets the same two choices as links.
47214
+ *
47215
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
47216
+ * cap path): absent and `false` both mean off, which is what every rule
47217
+ * authored before this field meant. An editor turns it off by writing
47218
+ * `false`, so it needs no `clear` key.
47219
+ */
47220
+ askVerdict: boolean().optional()
46870
47221
  });
46871
47222
  /**
46872
47223
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -58108,7 +58459,8 @@ var BATTERY_DEVICE_TYPES = [
58108
58459
  DeviceType.Switch,
58109
58460
  DeviceType.PetFeeder,
58110
58461
  DeviceType.Container,
58111
- DeviceType.Thermostat
58462
+ DeviceType.Thermostat,
58463
+ DeviceType.EventEmitter
58112
58464
  ];
58113
58465
  /** Generic Customize target for the percentage reading (D936). */
58114
58466
  var batteryCustomize = {
@@ -60968,7 +61320,17 @@ var groupCommandsCapability = {
60968
61320
  scope: "device",
60969
61321
  deviceNative: true,
60970
61322
  mode: "singleton",
60971
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
61323
+ deviceTypes: [
61324
+ DeviceType.Switch,
61325
+ DeviceType.Light,
61326
+ DeviceType.Fan,
61327
+ DeviceType.Cover,
61328
+ DeviceType.Valve,
61329
+ DeviceType.Lock,
61330
+ DeviceType.MediaPlayer,
61331
+ DeviceType.Thermostat,
61332
+ DeviceType.Climate
61333
+ ],
60972
61334
  methods: {},
60973
61335
  status: {
60974
61336
  schema: GroupCommandsSchema,
@@ -60986,6 +61348,49 @@ var groupCommandsCapability = {
60986
61348
  history: "none"
60987
61349
  };
60988
61350
  /**
61351
+ * Whether a helper actuator group counts as active (D944): at least one
61352
+ * included member is, or every included member is. What "active" means is the
61353
+ * type's: a cover is open, a lock is locked, a media player is playing, a
61354
+ * climate device is not off. A group of lights, switches and fans reports
61355
+ * `switch.on` instead; this cap is for the types whose own state is not a
61356
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
61357
+ * empty included set takes the device offline, never `active: false`.
61358
+ */
61359
+ var GroupActiveSchema = object({
61360
+ active: boolean().meta({ label: "Active" }),
61361
+ /** Ms epoch when the slice was last updated. */
61362
+ lastChangedAt: number()
61363
+ });
61364
+ var groupActiveCapability = {
61365
+ name: "group-active",
61366
+ scope: "device",
61367
+ deviceNative: true,
61368
+ mode: "singleton",
61369
+ deviceTypes: [
61370
+ DeviceType.Cover,
61371
+ DeviceType.Valve,
61372
+ DeviceType.Lock,
61373
+ DeviceType.MediaPlayer,
61374
+ DeviceType.Climate,
61375
+ DeviceType.Thermostat
61376
+ ],
61377
+ methods: {},
61378
+ status: {
61379
+ schema: GroupActiveSchema,
61380
+ kind: "push"
61381
+ },
61382
+ runtimeState: GroupActiveSchema,
61383
+ /**
61384
+ * Runtime-state durability: **session** — recomputed from the members on the
61385
+ * next source event; a restored value would outlive the members it named.
61386
+ *
61387
+ * See `RuntimeStateDurability`. Enforced by
61388
+ * `scripts/check-runtime-state-durability.ts`.
61389
+ */
61390
+ durability: "session",
61391
+ history: "none"
61392
+ };
61393
+ /**
60989
61394
  * How many members of a helper group answered (D944). Counts are integers,
60990
61395
  * not measurements: zero included is a real count, never a stand-in reading.
60991
61396
  * The reading itself stays on the output capability. History is none — the
@@ -61016,7 +61421,14 @@ var groupStatusCapability = {
61016
61421
  deviceTypes: [
61017
61422
  DeviceType.Sensor,
61018
61423
  DeviceType.Switch,
61019
- DeviceType.Light
61424
+ DeviceType.Light,
61425
+ DeviceType.Fan,
61426
+ DeviceType.Cover,
61427
+ DeviceType.Valve,
61428
+ DeviceType.Lock,
61429
+ DeviceType.MediaPlayer,
61430
+ DeviceType.Thermostat,
61431
+ DeviceType.Climate
61020
61432
  ],
61021
61433
  methods: {},
61022
61434
  status: {
@@ -62289,7 +62701,14 @@ var lockControlCapability = {
62289
62701
  }),
62290
62702
  unlock: method(object({
62291
62703
  deviceId: number().int().nonnegative(),
62292
- code: string().min(1).optional()
62704
+ code: string().min(1).optional(),
62705
+ /**
62706
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
62707
+ * with one call is refused unless the caller says it was confirmed. A
62708
+ * single lock ignores it. The refusal lives in the callee, so no
62709
+ * automation or API caller reaches the doors by skipping a dialog.
62710
+ */
62711
+ confirm: boolean().optional()
62293
62712
  }), _void(), {
62294
62713
  kind: "mutation",
62295
62714
  auth: "protected"
@@ -62326,6 +62745,44 @@ var lockControlCapability = {
62326
62745
  volatileStateFields: ["lastChangedAt"]
62327
62746
  };
62328
62747
  /**
62748
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
62749
+ * so dashboards keep one series; every other instantaneous reading lands here.
62750
+ * `value` is the time integral in the source quantity's accumulated base
62751
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
62752
+ */
62753
+ var MeterStatusSchema = object({
62754
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
62755
+ lastFetchedAt: number()
62756
+ });
62757
+ var meterCapability = {
62758
+ name: "meter",
62759
+ scope: "device",
62760
+ deviceNative: true,
62761
+ mode: "singleton",
62762
+ deviceTypes: [DeviceType.Sensor],
62763
+ methods: {},
62764
+ status: {
62765
+ schema: MeterStatusSchema,
62766
+ kind: "push"
62767
+ },
62768
+ runtimeState: MeterStatusSchema,
62769
+ /**
62770
+ * Runtime-state durability: **restored** — the total is a cache of the
62771
+ * history integral. A restart shows it only until the history pass
62772
+ * recomputes the open period; it is not an in-memory buffer.
62773
+ *
62774
+ * See `RuntimeStateDurability`. Enforced by
62775
+ * `scripts/check-runtime-state-durability.ts`.
62776
+ */
62777
+ durability: "restored",
62778
+ history: { fields: { value: {
62779
+ kind: "counter",
62780
+ deadband: .001,
62781
+ minIntervalMs: 6e4
62782
+ } } },
62783
+ volatileStateFields: ["lastFetchedAt"]
62784
+ };
62785
+ /**
62329
62786
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
62330
62787
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
62331
62788
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64883,9 +65340,9 @@ var PowerMeterStatusSchema = object({
64883
65340
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64884
65341
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64885
65342
  /** Voltage in volts. */
64886
- volts: number().optional().meta(readingMeta("voltage")),
65343
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64887
65344
  /** Current in amperes. */
64888
- amps: number().optional().meta(readingMeta("current")),
65345
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64889
65346
  /** Apparent power in volt-amperes. */
64890
65347
  va: number().optional().meta(readingMeta("apparent-power")),
64891
65348
  /** Power factor (0..1) if reported. */
@@ -64893,12 +65350,74 @@ var PowerMeterStatusSchema = object({
64893
65350
  /** Ms epoch when the slice was last updated. */
64894
65351
  lastFetchedAt: number()
64895
65352
  });
65353
+ /**
65354
+ * Loads that draw metered mains power (D951). The reading is a feature of the
65355
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
65356
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
65357
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
65358
+ * camera and the like are left out: their draw is not what anyone meters.
65359
+ */
65360
+ var POWER_METER_DEVICE_TYPES = [
65361
+ DeviceType.Sensor,
65362
+ DeviceType.Switch,
65363
+ DeviceType.Light,
65364
+ DeviceType.Fan,
65365
+ DeviceType.Climate,
65366
+ DeviceType.Thermostat,
65367
+ DeviceType.Humidifier,
65368
+ DeviceType.WaterHeater,
65369
+ DeviceType.MediaPlayer,
65370
+ DeviceType.Washer,
65371
+ DeviceType.Dryer,
65372
+ DeviceType.Dishwasher,
65373
+ DeviceType.Vacuum,
65374
+ DeviceType.LawnMower,
65375
+ DeviceType.PetFeeder
65376
+ ];
65377
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
65378
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
65379
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
65380
+ function powerTarget(id, unit) {
65381
+ return {
65382
+ id,
65383
+ cardinality: "scalar",
65384
+ vocabulary: {
65385
+ cap: "power-meter",
65386
+ stateField: id
65387
+ },
65388
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
65389
+ apply: "add",
65390
+ path: id,
65391
+ sources: [{
65392
+ kind: "numeric",
65393
+ requiredUnit: unit,
65394
+ transforms: [{ kind: "identity" }]
65395
+ }],
65396
+ companions: [{
65397
+ kind: "clock",
65398
+ path: "lastFetchedAt",
65399
+ when: "always"
65400
+ }],
65401
+ sourceReport: { status: "assignment-status" },
65402
+ advancedExpression: true
65403
+ };
65404
+ }
65405
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
65406
+ var powerMeterCustomize = {
65407
+ version: 1,
65408
+ targets: [
65409
+ powerTarget("watts", "W"),
65410
+ powerTarget("kwhTotal", "kWh"),
65411
+ powerTarget("volts", "V"),
65412
+ powerTarget("amps", "A")
65413
+ ]
65414
+ };
64896
65415
  var powerMeterCapability = {
64897
65416
  name: "power-meter",
64898
65417
  scope: "device",
64899
65418
  deviceNative: true,
64900
65419
  mode: "singleton",
64901
- deviceTypes: [DeviceType.Sensor],
65420
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64902
65421
  methods: {},
64903
65422
  status: {
64904
65423
  schema: PowerMeterStatusSchema,
@@ -64955,7 +65474,8 @@ var powerMeterCapability = {
64955
65474
  } },
64956
65475
  /** Clock fields: written, but excluded from the compare that decides
64957
65476
  * whether persisting is worth a SQLite commit. */
64958
- volatileStateFields: ["lastFetchedAt"]
65477
+ volatileStateFields: ["lastFetchedAt"],
65478
+ customize: powerMeterCustomize
64959
65479
  };
64960
65480
  /**
64961
65481
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -65748,6 +66268,8 @@ var runningCustomize = {
65748
66268
  stateField: "running"
65749
66269
  },
65750
66270
  deviceTypes: [
66271
+ DeviceType.Washer,
66272
+ DeviceType.Dryer,
65751
66273
  DeviceType.Dishwasher,
65752
66274
  DeviceType.Vacuum,
65753
66275
  DeviceType.LawnMower,
@@ -68640,7 +69162,8 @@ var switchCapability = {
68640
69162
  deviceTypes: [
68641
69163
  DeviceType.Switch,
68642
69164
  DeviceType.Siren,
68643
- DeviceType.Light
69165
+ DeviceType.Light,
69166
+ DeviceType.Fan
68644
69167
  ],
68645
69168
  methods: { setState: method(object({
68646
69169
  deviceId: number(),
@@ -70986,8 +71509,9 @@ function withClipEventLabels(provider, deps) {
70986
71509
  listClips
70987
71510
  };
70988
71511
  }
71512
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
70989
71513
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
70990
- 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;
71514
+ 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;
70991
71515
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
70992
71516
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
70993
71517
  new Set(CAP_NAMES);
@@ -71331,6 +71855,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
71331
71855
  featureProbe: featureProbeCapability,
71332
71856
  flood: floodCapability,
71333
71857
  gas: gasCapability,
71858
+ groupActive: groupActiveCapability,
71334
71859
  groupCommands: groupCommandsCapability,
71335
71860
  groupStatus: groupStatusCapability,
71336
71861
  heatingValve: heatingValveCapability,
@@ -71342,6 +71867,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
71342
71867
  lawnMowerControl: lawnMowerControlCapability,
71343
71868
  lockControl: lockControlCapability,
71344
71869
  mediaPlayer: mediaPlayerCapability,
71870
+ meter: meterCapability,
71345
71871
  motion: motionCapability,
71346
71872
  motionTrigger: motionTriggerCapability,
71347
71873
  motionZones: motionZonesCapability,
@@ -72605,7 +73131,7 @@ var BaseDeviceProvider = class extends BaseAddon {
72605
73131
  function widenDeviceConstructor(ctor) {
72606
73132
  return ctor;
72607
73133
  }
72608
- 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;
73134
+ 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;
72609
73135
  new Set(Object.values(DeviceType));
72610
73136
  Object.freeze({
72611
73137
  "accessories.getStatus": {
@@ -75828,6 +76354,13 @@ Object.freeze({
75828
76354
  access: "view",
75829
76355
  role: "viewer"
75830
76356
  },
76357
+ "groupActive.getStatus": {
76358
+ capName: "group-active",
76359
+ capScope: "device",
76360
+ addonId: null,
76361
+ access: "view",
76362
+ role: "viewer"
76363
+ },
75831
76364
  "groupCommands.getStatus": {
75832
76365
  capName: "group-commands",
75833
76366
  capScope: "device",
@@ -76794,6 +77327,13 @@ Object.freeze({
76794
77327
  access: "create",
76795
77328
  role: "admin"
76796
77329
  },
77330
+ "meter.getStatus": {
77331
+ capName: "meter",
77332
+ capScope: "device",
77333
+ addonId: null,
77334
+ access: "view",
77335
+ role: "viewer"
77336
+ },
76797
77337
  "metricsProvider.collectSnapshot": {
76798
77338
  capName: "metrics-provider",
76799
77339
  capScope: "system",
@@ -84892,7 +85432,39 @@ var APPLIANCE_CAP_VOCABULARY = {
84892
85432
  phrase: t("When {device} finishes", "Quando {device} finisce"),
84893
85433
  icon: "square"
84894
85434
  }
84895
- }
85435
+ },
85436
+ overrides: { byType: {
85437
+ [DeviceType.Washer]: {
85438
+ state: { running: {
85439
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
85440
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
85441
+ } },
85442
+ events: {
85443
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
85444
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
85445
+ }
85446
+ },
85447
+ [DeviceType.Dryer]: {
85448
+ state: { running: {
85449
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
85450
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
85451
+ } },
85452
+ events: {
85453
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
85454
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
85455
+ }
85456
+ },
85457
+ [DeviceType.Dishwasher]: {
85458
+ state: { running: {
85459
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
85460
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
85461
+ } },
85462
+ events: {
85463
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
85464
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
85465
+ }
85466
+ }
85467
+ } }
84896
85468
  },
84897
85469
  update: {
84898
85470
  scope: "device",
@@ -85664,6 +86236,10 @@ var SENSOR_CAP_VOCABULARY = {
85664
86236
  icon: "flame"
85665
86237
  }]
85666
86238
  },
86239
+ "group-active": {
86240
+ scope: "device",
86241
+ noun: t("Group state", "Stato del gruppo")
86242
+ },
85667
86243
  "group-commands": {
85668
86244
  scope: "device",
85669
86245
  noun: t("Group command", "Comando di gruppo")
@@ -85720,6 +86296,17 @@ var SENSOR_CAP_VOCABULARY = {
85720
86296
  }],
85721
86297
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
85722
86298
  },
86299
+ meter: {
86300
+ scope: "device",
86301
+ noun: t("Meter", "Contatore"),
86302
+ state: [{
86303
+ kind: "numeric",
86304
+ field: "value",
86305
+ quantity: t("the total", "il totale"),
86306
+ label: t("Total", "Totale"),
86307
+ icon: "gauge"
86308
+ }]
86309
+ },
85723
86310
  "numeric-sensor": {
85724
86311
  scope: "device",
85725
86312
  noun: t("Sensor", "Sensore"),
@@ -86192,8 +86779,47 @@ function projectAction(cap, action) {
86192
86779
  };
86193
86780
  }
86194
86781
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
86195
- 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;
86782
+ 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;
86196
86783
  DeviceFeature.BatteryOperated;
86784
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
86785
+ 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.";
86786
+ 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.";
86787
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
86788
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
86789
+ 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.";
86790
+ function withheld(reason) {
86791
+ return {
86792
+ [DeviceType.Washer]: {
86793
+ exported: false,
86794
+ reason
86795
+ },
86796
+ [DeviceType.Dryer]: {
86797
+ exported: false,
86798
+ reason
86799
+ },
86800
+ [DeviceType.Dishwasher]: {
86801
+ exported: false,
86802
+ reason
86803
+ }
86804
+ };
86805
+ }
86806
+ function offered(received) {
86807
+ return {
86808
+ [DeviceType.Washer]: {
86809
+ exported: true,
86810
+ as: received
86811
+ },
86812
+ [DeviceType.Dryer]: {
86813
+ exported: true,
86814
+ as: received
86815
+ },
86816
+ [DeviceType.Dishwasher]: {
86817
+ exported: true,
86818
+ as: received
86819
+ }
86820
+ };
86821
+ }
86822
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
86197
86823
  /** Reject after `ms`; always clears its own timer. */
86198
86824
  async function withTimeout$1(promise, ms, label) {
86199
86825
  let timer;
@@ -87378,6 +88004,11 @@ Object.freeze({
87378
88004
  form: "single",
87379
88005
  optional: false
87380
88006
  }],
88007
+ "groupActive.getStatus": [{
88008
+ name: "deviceId",
88009
+ form: "single",
88010
+ optional: false
88011
+ }],
87381
88012
  "groupCommands.getStatus": [{
87382
88013
  name: "deviceId",
87383
88014
  form: "single",
@@ -87588,6 +88219,11 @@ Object.freeze({
87588
88219
  form: "single",
87589
88220
  optional: false
87590
88221
  }],
88222
+ "meter.getStatus": [{
88223
+ name: "deviceId",
88224
+ form: "single",
88225
+ optional: false
88226
+ }],
87591
88227
  "motion.getStatus": [{
87592
88228
  name: "deviceId",
87593
88229
  form: "single",
@@ -89195,7 +89831,6 @@ Object.freeze({
89195
89831
  "network-access": "ingress",
89196
89832
  "smtp-provider": "email"
89197
89833
  });
89198
- DeviceType.Camera;
89199
89834
  /**
89200
89835
  * A saved Customize assignment (D936). The schema is the type: callers use
89201
89836
  * `z.infer`, they do not restate the shape.