@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.mjs CHANGED
@@ -5456,7 +5456,7 @@ var ZodIssueCode = {
5456
5456
  var ZodFirstPartyTypeKind;
5457
5457
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5458
5458
  //#endregion
5459
- //#region ../types/dist/sleep-bykKrTgu.mjs
5459
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5460
5460
  /**
5461
5461
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5462
5462
  * window to float samples (D455).
@@ -8661,6 +8661,7 @@ var CAP_NAMES = Object.freeze([
8661
8661
  "filesystem-browse",
8662
8662
  "flood",
8663
8663
  "gas",
8664
+ "group-active",
8664
8665
  "group-commands",
8665
8666
  "group-status",
8666
8667
  "heating-valve",
@@ -8683,6 +8684,7 @@ var CAP_NAMES = Object.freeze([
8683
8684
  "login-method",
8684
8685
  "media-player",
8685
8686
  "mesh-network",
8687
+ "meter",
8686
8688
  "metrics-provider",
8687
8689
  "model-convert",
8688
8690
  "model-distributor",
@@ -9481,6 +9483,10 @@ Object.freeze({
9481
9483
  "path": "detected",
9482
9484
  "valueType": "boolean"
9483
9485
  }],
9486
+ "group-active": [{
9487
+ "path": "active",
9488
+ "valueType": "boolean"
9489
+ }],
9484
9490
  "group-status": [
9485
9491
  {
9486
9492
  "path": "included",
@@ -9740,6 +9746,10 @@ Object.freeze({
9740
9746
  ]
9741
9747
  }
9742
9748
  ],
9749
+ "meter": [{
9750
+ "path": "value",
9751
+ "valueType": "number"
9752
+ }],
9743
9753
  "motion": [
9744
9754
  {
9745
9755
  "path": "detected",
@@ -10497,7 +10507,7 @@ function userError(code, params, englishFallback) {
10497
10507
  return new CamstackError(code, params, englishFallback);
10498
10508
  }
10499
10509
  //#endregion
10500
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10510
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10501
10511
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10502
10512
  DeviceType["Camera"] = "camera";
10503
10513
  DeviceType["Hub"] = "hub";
@@ -10591,8 +10601,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10591
10601
  DeviceType["PetFeeder"] = "pet-feeder";
10592
10602
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10593
10603
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10594
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10604
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10605
+ * A plug-built dishwasher carries running-state and power instead. */
10595
10606
  DeviceType["Dishwasher"] = "dishwasher";
10607
+ /** Washing machine. A plug-built one is running while its power stays
10608
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10609
+ DeviceType["Washer"] = "washer";
10610
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10611
+ DeviceType["Dryer"] = "dryer";
10596
10612
  return DeviceType;
10597
10613
  }({});
10598
10614
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10840,7 +10856,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
10840
10856
  return DeviceRole;
10841
10857
  }({});
10842
10858
  //#endregion
10843
- //#region ../types/dist/composition-OhpuespA.mjs
10859
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10844
10860
  /**
10845
10861
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10846
10862
  *
@@ -11155,6 +11171,13 @@ var table = {
11155
11171
  apply: () => {
11156
11172
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11157
11173
  }
11174
+ },
11175
+ schmitt: {
11176
+ minArgs: 3,
11177
+ maxArgs: 5,
11178
+ apply: () => {
11179
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11180
+ }
11158
11181
  }
11159
11182
  };
11160
11183
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11596,6 +11619,99 @@ function validateExpressionSource(src) {
11596
11619
  return null;
11597
11620
  }
11598
11621
  /**
11622
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11623
+ *
11624
+ * Standby of the control board is under 5 W; a motor or a heater is far
11625
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11626
+ * a cycle, so running starts only after 30 s above the line.
11627
+ *
11628
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11629
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11630
+ * report "finished" in the middle of the program, so the stop dwell is
11631
+ * 10 minutes on every type. The number is stored per type so one machine
11632
+ * can move later without moving the others.
11633
+ */
11634
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11635
+ var APPLIANCE_KINDS = [
11636
+ "washer",
11637
+ "dryer",
11638
+ "dishwasher"
11639
+ ];
11640
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11641
+ /**
11642
+ * Statistics and integrals over a history read (D944).
11643
+ *
11644
+ * Pure: the same points always give the same answer, so a restart recomputes
11645
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11646
+ * never the mean of the samples. A hole with no held value is not integrated
11647
+ * as zero. A truncated read is not published.
11648
+ */
11649
+ var STATISTIC_STATS = [
11650
+ "min",
11651
+ "max",
11652
+ "mean",
11653
+ "sum",
11654
+ "count",
11655
+ "change"
11656
+ ];
11657
+ /**
11658
+ * The range a statistics or integral helper asks history for (D944).
11659
+ *
11660
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11661
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11662
+ * is strictly longer than the longest that range can be. Forever qualifies.
11663
+ * Equal to a tier's retention is a refusal, not a short answer.
11664
+ */
11665
+ var MINUTE_MS = 6e4;
11666
+ var HOUR_MS = 60 * MINUTE_MS;
11667
+ var DAY_MS = 24 * HOUR_MS;
11668
+ var ROLLING_SPANS = [
11669
+ "1h",
11670
+ "24h",
11671
+ "2d",
11672
+ "7d",
11673
+ "30d",
11674
+ "custom"
11675
+ ];
11676
+ var CALENDAR_PERIODS = [
11677
+ "today",
11678
+ "yesterday",
11679
+ "this-week",
11680
+ "this-month"
11681
+ ];
11682
+ var RESET_PERIODS = [
11683
+ "never",
11684
+ "daily",
11685
+ "weekly",
11686
+ "monthly"
11687
+ ];
11688
+ 5 * MINUTE_MS;
11689
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11690
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11691
+ var rollingWindowObject = object({
11692
+ kind: literal("rolling"),
11693
+ span: _enum(ROLLING_SPANS),
11694
+ customMinutes: number().int().min(5).optional()
11695
+ }).check((payload) => {
11696
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11697
+ code: "custom",
11698
+ message: "a custom range needs a duration in minutes",
11699
+ path: ["customMinutes"],
11700
+ input: payload.value
11701
+ });
11702
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11703
+ code: "custom",
11704
+ message: "only a custom range carries a duration",
11705
+ path: ["customMinutes"],
11706
+ input: payload.value
11707
+ });
11708
+ });
11709
+ var RollingWindowSchema = rollingWindowObject;
11710
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11711
+ kind: literal("calendar"),
11712
+ period: _enum(CALENDAR_PERIODS)
11713
+ })]);
11714
+ /**
11599
11715
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11600
11716
  * id. Split out so helper schemas can name it without a cycle through
11601
11717
  * `composition.ts` (D659).
@@ -11621,7 +11737,13 @@ var GROUP_TEMPLATE_IDS = [
11621
11737
  "occupancy",
11622
11738
  "binary",
11623
11739
  "switch",
11624
- "light"
11740
+ "light",
11741
+ "fan",
11742
+ "cover",
11743
+ "valve",
11744
+ "lock",
11745
+ "media-player",
11746
+ "climate"
11625
11747
  ];
11626
11748
  var NUMERIC_AGGREGATES = [
11627
11749
  "mean",
@@ -11651,14 +11773,73 @@ var HelperMemberSchema = object({
11651
11773
  cap: string().min(1),
11652
11774
  fieldPath: string().min(1)
11653
11775
  });
11654
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11655
- kind: literal("group"),
11656
- templateId: GroupTemplateIdSchema,
11657
- aggregate: AggregateReducerSchema,
11658
- members: array(HelperMemberSchema).min(1).max(64),
11659
- /** Actuator groups only. Readings leave this unset. */
11660
- active: ActiveCriterionSchema.optional()
11661
- })]);
11776
+ var HelperSpecSchema = discriminatedUnion("kind", [
11777
+ object({
11778
+ kind: literal("group"),
11779
+ templateId: GroupTemplateIdSchema,
11780
+ aggregate: AggregateReducerSchema,
11781
+ members: array(HelperMemberSchema).min(1).max(64),
11782
+ /** Actuator groups only. Readings leave this unset. */
11783
+ active: ActiveCriterionSchema.optional()
11784
+ }),
11785
+ object({
11786
+ kind: literal("appliance"),
11787
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11788
+ appliance: _enum(APPLIANCE_KINDS),
11789
+ thresholdWatts: number().positive(),
11790
+ startDwellMs: number().int().nonnegative(),
11791
+ stopDwellMs: number().int().nonnegative(),
11792
+ member: HelperMemberSchema
11793
+ }),
11794
+ object({
11795
+ kind: literal("statistic"),
11796
+ stat: _enum(STATISTIC_STATS),
11797
+ window: StatisticWindowSchema,
11798
+ source: HelperMemberSchema
11799
+ }),
11800
+ object({
11801
+ kind: literal("integral"),
11802
+ reset: _enum(RESET_PERIODS),
11803
+ output: _enum(["energy", "meter"]),
11804
+ source: HelperMemberSchema
11805
+ }),
11806
+ object({
11807
+ kind: literal("threshold"),
11808
+ source: HelperMemberSchema,
11809
+ high: number(),
11810
+ low: number(),
11811
+ onForMs: number().int().nonnegative(),
11812
+ offForMs: number().int().nonnegative()
11813
+ }),
11814
+ object({
11815
+ kind: literal("arithmetic"),
11816
+ op: _enum([
11817
+ "sum",
11818
+ "difference",
11819
+ "ratio"
11820
+ ]),
11821
+ inputs: array(HelperMemberSchema).min(2).max(64)
11822
+ }),
11823
+ object({
11824
+ kind: literal("expression"),
11825
+ expr: string().min(1),
11826
+ inputs: array(object({
11827
+ name: string().min(1),
11828
+ member: HelperMemberSchema
11829
+ })).min(1).max(64),
11830
+ output: _enum(["number", "boolean"])
11831
+ }),
11832
+ object({
11833
+ kind: literal("derivative"),
11834
+ window: RollingWindowSchema,
11835
+ per: _enum([
11836
+ "second",
11837
+ "minute",
11838
+ "hour"
11839
+ ]),
11840
+ source: HelperMemberSchema
11841
+ })
11842
+ ]);
11662
11843
  /** A composed device's stableId is this prefix plus the block id. */
11663
11844
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11664
11845
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11719,6 +11900,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11719
11900
  "all"
11720
11901
  ]),
11721
11902
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11903
+ /**
11904
+ * Set when the reads are an enum state, not a yes/no: the listed states
11905
+ * count as active (a cover is `open`). A state outside the list is inactive;
11906
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11907
+ */
11908
+ activeWhen: array(string().min(1)).min(1).optional(),
11722
11909
  /** `value` is the reading; the others are the member counts. */
11723
11910
  publish: _enum([
11724
11911
  "value",
@@ -11732,6 +11919,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11732
11919
  "omit",
11733
11920
  "offline"
11734
11921
  ])
11922
+ }),
11923
+ object({
11924
+ kind: literal("series"),
11925
+ read: CompositionFieldReadSchema,
11926
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11927
+ publish: _enum([
11928
+ "value",
11929
+ "included",
11930
+ "excluded",
11931
+ "total"
11932
+ ]),
11933
+ /**
11934
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11935
+ * device unseeded until history answers, so a restart cannot publish 0.
11936
+ */
11937
+ empty: _enum([
11938
+ "null",
11939
+ "omit",
11940
+ "offline"
11941
+ ])
11735
11942
  })
11736
11943
  ]);
11737
11944
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17210,7 +17417,22 @@ var BrokerProviderInfoSchema = object({
17210
17417
  */
17211
17418
  interactiveConnectPath: string().min(1).optional(),
17212
17419
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17213
- interactiveDisconnectPath: string().min(1).optional()
17420
+ interactiveDisconnectPath: string().min(1).optional(),
17421
+ /**
17422
+ * The kind signs in through a server-held interactive session instead of
17423
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17424
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17425
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17426
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17427
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17428
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17429
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17430
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17431
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17432
+ * offers it as the default path; the fields the session fills are
17433
+ * marked `filledBySignIn` in the kind's settings schema.
17434
+ */
17435
+ signIn: object({ basePath: string().min(1) }).optional()
17214
17436
  }))
17215
17437
  });
17216
17438
  var ListInputSchema = object({
@@ -18315,7 +18537,8 @@ var CompositionProblemSchema = object({
18315
18537
  "native-capability-replace",
18316
18538
  "mixed-quantity",
18317
18539
  "helper-mismatch",
18318
- "member-constraint"
18540
+ "member-constraint",
18541
+ "retention"
18319
18542
  ]),
18320
18543
  path: string(),
18321
18544
  message: string()
@@ -18549,13 +18772,17 @@ Object.freeze({
18549
18772
  latchedAt: {
18550
18773
  kind: "fixed",
18551
18774
  result: ["number", "null"]
18775
+ },
18776
+ schmitt: {
18777
+ kind: "fixed",
18778
+ result: ["boolean", "null"]
18552
18779
  }
18553
18780
  });
18554
18781
  /**
18555
18782
  * One catalog row per base reading a group helper can build (D944 §3).
18556
18783
  * Data, not a form default written into the block.
18557
18784
  */
18558
- var NOW = {
18785
+ var NOW$2 = {
18559
18786
  fieldPath: "lastFetchedAt",
18560
18787
  expr: "now"
18561
18788
  };
@@ -18569,6 +18796,8 @@ function numeric(input) {
18569
18796
  family: "numeric",
18570
18797
  deviceType: DeviceType.Sensor,
18571
18798
  memberDeviceType: DeviceType.Sensor,
18799
+ memberDeviceTypes: [DeviceType.Sensor],
18800
+ activeWhen: void 0,
18572
18801
  commandCaps: [],
18573
18802
  baseUnit: baseUnitOf(input.quantity),
18574
18803
  aggregates: NUMERIC_AGGREGATES,
@@ -18584,6 +18813,8 @@ function binary(input) {
18584
18813
  family: "binary",
18585
18814
  deviceType: DeviceType.Sensor,
18586
18815
  memberDeviceType: DeviceType.Sensor,
18816
+ memberDeviceTypes: [DeviceType.Sensor],
18817
+ activeWhen: void 0,
18587
18818
  commandCaps: [],
18588
18819
  quantity: "none",
18589
18820
  baseUnit: void 0,
@@ -18601,7 +18832,7 @@ var GROUP_TEMPLATES = [
18601
18832
  quantity: "temperature",
18602
18833
  defaultAggregate: "mean",
18603
18834
  empty: "null",
18604
- companions: [NOW]
18835
+ companions: [NOW$2]
18605
18836
  }),
18606
18837
  numeric({
18607
18838
  id: "humidity",
@@ -18612,7 +18843,7 @@ var GROUP_TEMPLATES = [
18612
18843
  quantity: "humidity",
18613
18844
  defaultAggregate: "mean",
18614
18845
  empty: "null",
18615
- companions: [NOW]
18846
+ companions: [NOW$2]
18616
18847
  }),
18617
18848
  numeric({
18618
18849
  id: "pressure",
@@ -18623,7 +18854,7 @@ var GROUP_TEMPLATES = [
18623
18854
  quantity: "pressure",
18624
18855
  defaultAggregate: "mean",
18625
18856
  empty: "null",
18626
- companions: [NOW]
18857
+ companions: [NOW$2]
18627
18858
  }),
18628
18859
  numeric({
18629
18860
  id: "illuminance",
@@ -18634,7 +18865,7 @@ var GROUP_TEMPLATES = [
18634
18865
  quantity: "illuminance",
18635
18866
  defaultAggregate: "mean",
18636
18867
  empty: "null",
18637
- companions: [NOW]
18868
+ companions: [NOW$2]
18638
18869
  }),
18639
18870
  numeric({
18640
18871
  id: "power",
@@ -18645,7 +18876,7 @@ var GROUP_TEMPLATES = [
18645
18876
  quantity: "power",
18646
18877
  defaultAggregate: "sum",
18647
18878
  empty: "omit",
18648
- companions: [NOW]
18879
+ companions: [NOW$2]
18649
18880
  }),
18650
18881
  numeric({
18651
18882
  id: "energy",
@@ -18656,7 +18887,7 @@ var GROUP_TEMPLATES = [
18656
18887
  quantity: "energy",
18657
18888
  defaultAggregate: "sum",
18658
18889
  empty: "omit",
18659
- companions: [NOW]
18890
+ companions: [NOW$2]
18660
18891
  }),
18661
18892
  numeric({
18662
18893
  id: "battery",
@@ -18691,7 +18922,7 @@ var GROUP_TEMPLATES = [
18691
18922
  quantity: "device",
18692
18923
  defaultAggregate: "mean",
18693
18924
  empty: "null",
18694
- companions: [NOW]
18925
+ companions: [NOW$2]
18695
18926
  }),
18696
18927
  binary({
18697
18928
  id: "motion",
@@ -18785,6 +19016,11 @@ var GROUP_TEMPLATES = [
18785
19016
  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.",
18786
19017
  deviceType: DeviceType.Switch,
18787
19018
  outputCap: "switch",
19019
+ outputField: "on",
19020
+ member: {
19021
+ cap: "switch",
19022
+ fieldPath: "on"
19023
+ },
18788
19024
  commandCaps: ["switch"]
18789
19025
  }),
18790
19026
  actuator({
@@ -18792,34 +19028,136 @@ var GROUP_TEMPLATES = [
18792
19028
  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.",
18793
19029
  deviceType: DeviceType.Light,
18794
19030
  outputCap: "switch",
19031
+ outputField: "on",
19032
+ member: {
19033
+ cap: "switch",
19034
+ fieldPath: "on"
19035
+ },
18795
19036
  commandCaps: [
18796
19037
  "switch",
18797
19038
  "brightness",
18798
19039
  "color"
18799
19040
  ]
19041
+ }),
19042
+ actuator({
19043
+ id: "fan",
19044
+ 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.",
19045
+ deviceType: DeviceType.Fan,
19046
+ outputCap: "switch",
19047
+ outputField: "on",
19048
+ member: {
19049
+ cap: "switch",
19050
+ fieldPath: "on"
19051
+ },
19052
+ commandCaps: ["switch", "fan-control"]
19053
+ }),
19054
+ actuator({
19055
+ id: "cover",
19056
+ 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.",
19057
+ deviceType: DeviceType.Cover,
19058
+ outputCap: "group-active",
19059
+ outputField: "active",
19060
+ member: {
19061
+ cap: "cover",
19062
+ fieldPath: "state"
19063
+ },
19064
+ activeWhen: [
19065
+ "open",
19066
+ "opening",
19067
+ "stopped"
19068
+ ],
19069
+ commandCaps: ["cover"]
19070
+ }),
19071
+ actuator({
19072
+ id: "valve",
19073
+ 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.",
19074
+ deviceType: DeviceType.Valve,
19075
+ outputCap: "group-active",
19076
+ outputField: "active",
19077
+ member: {
19078
+ cap: "valve",
19079
+ fieldPath: "state"
19080
+ },
19081
+ activeWhen: [
19082
+ "open",
19083
+ "opening",
19084
+ "stopped"
19085
+ ],
19086
+ commandCaps: ["valve"]
19087
+ }),
19088
+ actuator({
19089
+ id: "lock",
19090
+ 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.",
19091
+ deviceType: DeviceType.Lock,
19092
+ outputCap: "group-active",
19093
+ outputField: "active",
19094
+ member: {
19095
+ cap: "lock-control",
19096
+ fieldPath: "state"
19097
+ },
19098
+ activeWhen: ["locked"],
19099
+ commandCaps: ["lock-control"]
19100
+ }),
19101
+ actuator({
19102
+ id: "media-player",
19103
+ 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.",
19104
+ deviceType: DeviceType.MediaPlayer,
19105
+ outputCap: "group-active",
19106
+ outputField: "active",
19107
+ member: {
19108
+ cap: "media-player",
19109
+ fieldPath: "state"
19110
+ },
19111
+ activeWhen: ["playing", "buffering"],
19112
+ commandCaps: ["media-player"]
19113
+ }),
19114
+ actuator({
19115
+ id: "climate",
19116
+ 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.",
19117
+ deviceType: DeviceType.Thermostat,
19118
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19119
+ outputCap: "group-active",
19120
+ outputField: "active",
19121
+ member: {
19122
+ cap: "climate-control",
19123
+ fieldPath: "mode"
19124
+ },
19125
+ activeWhen: [
19126
+ "heat",
19127
+ "cool",
19128
+ "auto",
19129
+ "heat_cool",
19130
+ "fan_only",
19131
+ "dry"
19132
+ ],
19133
+ commandCaps: ["climate-control"]
18800
19134
  })
18801
19135
  ];
18802
19136
  function actuator(input) {
18803
19137
  return {
18804
- ...input,
19138
+ id: input.id,
19139
+ summary: input.summary,
19140
+ deviceType: input.deviceType,
19141
+ outputCap: input.outputCap,
19142
+ outputField: input.outputField,
19143
+ commandCaps: input.commandCaps,
18805
19144
  family: "actuator",
18806
19145
  role: void 0,
18807
19146
  memberDeviceType: input.deviceType,
18808
- outputField: "on",
19147
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19148
+ activeWhen: input.activeWhen,
18809
19149
  quantity: "none",
18810
19150
  baseUnit: void 0,
18811
19151
  aggregates: BINARY_AGGREGATES,
18812
19152
  defaultAggregate: "any",
18813
19153
  empty: "offline",
18814
- accept: [{
18815
- cap: "switch",
18816
- fieldPath: "on"
18817
- }],
19154
+ accept: [input.member],
18818
19155
  companions: [CHANGED]
18819
19156
  };
18820
19157
  }
18821
19158
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18822
19159
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19160
+ DeviceType.Camera;
18823
19161
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18824
19162
  /**
18825
19163
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -44158,7 +44496,7 @@ var NetworkAccessStatusSchema = object({
44158
44496
  });
44159
44497
  /**
44160
44498
  * Optional, richer endpoint shape returned by providers that expose
44161
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44499
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44162
44500
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44163
44501
  * the originating provider config (mode + sourcePort) so the
44164
44502
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46845,7 +47183,20 @@ var NcRuleInputSchema = object({
46845
47183
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46846
47184
  * path does not run Zod defaults.
46847
47185
  */
46848
- groupingSec: number().int().min(5).max(60).optional()
47186
+ groupingSec: number().int().min(5).max(60).optional(),
47187
+ /**
47188
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
47189
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
47190
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
47191
+ * same mark the Library writes, and records whose notification it was and
47192
+ * when. A channel with no buttons gets the same two choices as links.
47193
+ *
47194
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
47195
+ * cap path): absent and `false` both mean off, which is what every rule
47196
+ * authored before this field meant. An editor turns it off by writing
47197
+ * `false`, so it needs no `clear` key.
47198
+ */
47199
+ askVerdict: boolean().optional()
46849
47200
  });
46850
47201
  /**
46851
47202
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -58087,7 +58438,8 @@ var BATTERY_DEVICE_TYPES = [
58087
58438
  DeviceType.Switch,
58088
58439
  DeviceType.PetFeeder,
58089
58440
  DeviceType.Container,
58090
- DeviceType.Thermostat
58441
+ DeviceType.Thermostat,
58442
+ DeviceType.EventEmitter
58091
58443
  ];
58092
58444
  /** Generic Customize target for the percentage reading (D936). */
58093
58445
  var batteryCustomize = {
@@ -60947,7 +61299,17 @@ var groupCommandsCapability = {
60947
61299
  scope: "device",
60948
61300
  deviceNative: true,
60949
61301
  mode: "singleton",
60950
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
61302
+ deviceTypes: [
61303
+ DeviceType.Switch,
61304
+ DeviceType.Light,
61305
+ DeviceType.Fan,
61306
+ DeviceType.Cover,
61307
+ DeviceType.Valve,
61308
+ DeviceType.Lock,
61309
+ DeviceType.MediaPlayer,
61310
+ DeviceType.Thermostat,
61311
+ DeviceType.Climate
61312
+ ],
60951
61313
  methods: {},
60952
61314
  status: {
60953
61315
  schema: GroupCommandsSchema,
@@ -60965,6 +61327,49 @@ var groupCommandsCapability = {
60965
61327
  history: "none"
60966
61328
  };
60967
61329
  /**
61330
+ * Whether a helper actuator group counts as active (D944): at least one
61331
+ * included member is, or every included member is. What "active" means is the
61332
+ * type's: a cover is open, a lock is locked, a media player is playing, a
61333
+ * climate device is not off. A group of lights, switches and fans reports
61334
+ * `switch.on` instead; this cap is for the types whose own state is not a
61335
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
61336
+ * empty included set takes the device offline, never `active: false`.
61337
+ */
61338
+ var GroupActiveSchema = object({
61339
+ active: boolean().meta({ label: "Active" }),
61340
+ /** Ms epoch when the slice was last updated. */
61341
+ lastChangedAt: number()
61342
+ });
61343
+ var groupActiveCapability = {
61344
+ name: "group-active",
61345
+ scope: "device",
61346
+ deviceNative: true,
61347
+ mode: "singleton",
61348
+ deviceTypes: [
61349
+ DeviceType.Cover,
61350
+ DeviceType.Valve,
61351
+ DeviceType.Lock,
61352
+ DeviceType.MediaPlayer,
61353
+ DeviceType.Climate,
61354
+ DeviceType.Thermostat
61355
+ ],
61356
+ methods: {},
61357
+ status: {
61358
+ schema: GroupActiveSchema,
61359
+ kind: "push"
61360
+ },
61361
+ runtimeState: GroupActiveSchema,
61362
+ /**
61363
+ * Runtime-state durability: **session** — recomputed from the members on the
61364
+ * next source event; a restored value would outlive the members it named.
61365
+ *
61366
+ * See `RuntimeStateDurability`. Enforced by
61367
+ * `scripts/check-runtime-state-durability.ts`.
61368
+ */
61369
+ durability: "session",
61370
+ history: "none"
61371
+ };
61372
+ /**
60968
61373
  * How many members of a helper group answered (D944). Counts are integers,
60969
61374
  * not measurements: zero included is a real count, never a stand-in reading.
60970
61375
  * The reading itself stays on the output capability. History is none — the
@@ -60995,7 +61400,14 @@ var groupStatusCapability = {
60995
61400
  deviceTypes: [
60996
61401
  DeviceType.Sensor,
60997
61402
  DeviceType.Switch,
60998
- DeviceType.Light
61403
+ DeviceType.Light,
61404
+ DeviceType.Fan,
61405
+ DeviceType.Cover,
61406
+ DeviceType.Valve,
61407
+ DeviceType.Lock,
61408
+ DeviceType.MediaPlayer,
61409
+ DeviceType.Thermostat,
61410
+ DeviceType.Climate
60999
61411
  ],
61000
61412
  methods: {},
61001
61413
  status: {
@@ -62268,7 +62680,14 @@ var lockControlCapability = {
62268
62680
  }),
62269
62681
  unlock: method(object({
62270
62682
  deviceId: number().int().nonnegative(),
62271
- code: string().min(1).optional()
62683
+ code: string().min(1).optional(),
62684
+ /**
62685
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
62686
+ * with one call is refused unless the caller says it was confirmed. A
62687
+ * single lock ignores it. The refusal lives in the callee, so no
62688
+ * automation or API caller reaches the doors by skipping a dialog.
62689
+ */
62690
+ confirm: boolean().optional()
62272
62691
  }), _void(), {
62273
62692
  kind: "mutation",
62274
62693
  auth: "protected"
@@ -62305,6 +62724,44 @@ var lockControlCapability = {
62305
62724
  volatileStateFields: ["lastChangedAt"]
62306
62725
  };
62307
62726
  /**
62727
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
62728
+ * so dashboards keep one series; every other instantaneous reading lands here.
62729
+ * `value` is the time integral in the source quantity's accumulated base
62730
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
62731
+ */
62732
+ var MeterStatusSchema = object({
62733
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
62734
+ lastFetchedAt: number()
62735
+ });
62736
+ var meterCapability = {
62737
+ name: "meter",
62738
+ scope: "device",
62739
+ deviceNative: true,
62740
+ mode: "singleton",
62741
+ deviceTypes: [DeviceType.Sensor],
62742
+ methods: {},
62743
+ status: {
62744
+ schema: MeterStatusSchema,
62745
+ kind: "push"
62746
+ },
62747
+ runtimeState: MeterStatusSchema,
62748
+ /**
62749
+ * Runtime-state durability: **restored** — the total is a cache of the
62750
+ * history integral. A restart shows it only until the history pass
62751
+ * recomputes the open period; it is not an in-memory buffer.
62752
+ *
62753
+ * See `RuntimeStateDurability`. Enforced by
62754
+ * `scripts/check-runtime-state-durability.ts`.
62755
+ */
62756
+ durability: "restored",
62757
+ history: { fields: { value: {
62758
+ kind: "counter",
62759
+ deadband: .001,
62760
+ minIntervalMs: 6e4
62761
+ } } },
62762
+ volatileStateFields: ["lastFetchedAt"]
62763
+ };
62764
+ /**
62308
62765
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
62309
62766
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
62310
62767
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64862,9 +65319,9 @@ var PowerMeterStatusSchema = object({
64862
65319
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64863
65320
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64864
65321
  /** Voltage in volts. */
64865
- volts: number().optional().meta(readingMeta("voltage")),
65322
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64866
65323
  /** Current in amperes. */
64867
- amps: number().optional().meta(readingMeta("current")),
65324
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64868
65325
  /** Apparent power in volt-amperes. */
64869
65326
  va: number().optional().meta(readingMeta("apparent-power")),
64870
65327
  /** Power factor (0..1) if reported. */
@@ -64872,12 +65329,74 @@ var PowerMeterStatusSchema = object({
64872
65329
  /** Ms epoch when the slice was last updated. */
64873
65330
  lastFetchedAt: number()
64874
65331
  });
65332
+ /**
65333
+ * Loads that draw metered mains power (D951). The reading is a feature of the
65334
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
65335
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
65336
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
65337
+ * camera and the like are left out: their draw is not what anyone meters.
65338
+ */
65339
+ var POWER_METER_DEVICE_TYPES = [
65340
+ DeviceType.Sensor,
65341
+ DeviceType.Switch,
65342
+ DeviceType.Light,
65343
+ DeviceType.Fan,
65344
+ DeviceType.Climate,
65345
+ DeviceType.Thermostat,
65346
+ DeviceType.Humidifier,
65347
+ DeviceType.WaterHeater,
65348
+ DeviceType.MediaPlayer,
65349
+ DeviceType.Washer,
65350
+ DeviceType.Dryer,
65351
+ DeviceType.Dishwasher,
65352
+ DeviceType.Vacuum,
65353
+ DeviceType.LawnMower,
65354
+ DeviceType.PetFeeder
65355
+ ];
65356
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
65357
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
65358
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
65359
+ function powerTarget(id, unit) {
65360
+ return {
65361
+ id,
65362
+ cardinality: "scalar",
65363
+ vocabulary: {
65364
+ cap: "power-meter",
65365
+ stateField: id
65366
+ },
65367
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
65368
+ apply: "add",
65369
+ path: id,
65370
+ sources: [{
65371
+ kind: "numeric",
65372
+ requiredUnit: unit,
65373
+ transforms: [{ kind: "identity" }]
65374
+ }],
65375
+ companions: [{
65376
+ kind: "clock",
65377
+ path: "lastFetchedAt",
65378
+ when: "always"
65379
+ }],
65380
+ sourceReport: { status: "assignment-status" },
65381
+ advancedExpression: true
65382
+ };
65383
+ }
65384
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
65385
+ var powerMeterCustomize = {
65386
+ version: 1,
65387
+ targets: [
65388
+ powerTarget("watts", "W"),
65389
+ powerTarget("kwhTotal", "kWh"),
65390
+ powerTarget("volts", "V"),
65391
+ powerTarget("amps", "A")
65392
+ ]
65393
+ };
64875
65394
  var powerMeterCapability = {
64876
65395
  name: "power-meter",
64877
65396
  scope: "device",
64878
65397
  deviceNative: true,
64879
65398
  mode: "singleton",
64880
- deviceTypes: [DeviceType.Sensor],
65399
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64881
65400
  methods: {},
64882
65401
  status: {
64883
65402
  schema: PowerMeterStatusSchema,
@@ -64934,7 +65453,8 @@ var powerMeterCapability = {
64934
65453
  } },
64935
65454
  /** Clock fields: written, but excluded from the compare that decides
64936
65455
  * whether persisting is worth a SQLite commit. */
64937
- volatileStateFields: ["lastFetchedAt"]
65456
+ volatileStateFields: ["lastFetchedAt"],
65457
+ customize: powerMeterCustomize
64938
65458
  };
64939
65459
  /**
64940
65460
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -65727,6 +66247,8 @@ var runningCustomize = {
65727
66247
  stateField: "running"
65728
66248
  },
65729
66249
  deviceTypes: [
66250
+ DeviceType.Washer,
66251
+ DeviceType.Dryer,
65730
66252
  DeviceType.Dishwasher,
65731
66253
  DeviceType.Vacuum,
65732
66254
  DeviceType.LawnMower,
@@ -68619,7 +69141,8 @@ var switchCapability = {
68619
69141
  deviceTypes: [
68620
69142
  DeviceType.Switch,
68621
69143
  DeviceType.Siren,
68622
- DeviceType.Light
69144
+ DeviceType.Light,
69145
+ DeviceType.Fan
68623
69146
  ],
68624
69147
  methods: { setState: method(object({
68625
69148
  deviceId: number(),
@@ -70965,8 +71488,9 @@ function withClipEventLabels(provider, deps) {
70965
71488
  listClips
70966
71489
  };
70967
71490
  }
71491
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
70968
71492
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
70969
- 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;
71493
+ 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;
70970
71494
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
70971
71495
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
70972
71496
  new Set(CAP_NAMES);
@@ -71310,6 +71834,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
71310
71834
  featureProbe: featureProbeCapability,
71311
71835
  flood: floodCapability,
71312
71836
  gas: gasCapability,
71837
+ groupActive: groupActiveCapability,
71313
71838
  groupCommands: groupCommandsCapability,
71314
71839
  groupStatus: groupStatusCapability,
71315
71840
  heatingValve: heatingValveCapability,
@@ -71321,6 +71846,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
71321
71846
  lawnMowerControl: lawnMowerControlCapability,
71322
71847
  lockControl: lockControlCapability,
71323
71848
  mediaPlayer: mediaPlayerCapability,
71849
+ meter: meterCapability,
71324
71850
  motion: motionCapability,
71325
71851
  motionTrigger: motionTriggerCapability,
71326
71852
  motionZones: motionZonesCapability,
@@ -72584,7 +73110,7 @@ var BaseDeviceProvider = class extends BaseAddon {
72584
73110
  function widenDeviceConstructor(ctor) {
72585
73111
  return ctor;
72586
73112
  }
72587
- 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;
73113
+ 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;
72588
73114
  new Set(Object.values(DeviceType));
72589
73115
  Object.freeze({
72590
73116
  "accessories.getStatus": {
@@ -75807,6 +76333,13 @@ Object.freeze({
75807
76333
  access: "view",
75808
76334
  role: "viewer"
75809
76335
  },
76336
+ "groupActive.getStatus": {
76337
+ capName: "group-active",
76338
+ capScope: "device",
76339
+ addonId: null,
76340
+ access: "view",
76341
+ role: "viewer"
76342
+ },
75810
76343
  "groupCommands.getStatus": {
75811
76344
  capName: "group-commands",
75812
76345
  capScope: "device",
@@ -76773,6 +77306,13 @@ Object.freeze({
76773
77306
  access: "create",
76774
77307
  role: "admin"
76775
77308
  },
77309
+ "meter.getStatus": {
77310
+ capName: "meter",
77311
+ capScope: "device",
77312
+ addonId: null,
77313
+ access: "view",
77314
+ role: "viewer"
77315
+ },
76776
77316
  "metricsProvider.collectSnapshot": {
76777
77317
  capName: "metrics-provider",
76778
77318
  capScope: "system",
@@ -84871,7 +85411,39 @@ var APPLIANCE_CAP_VOCABULARY = {
84871
85411
  phrase: t("When {device} finishes", "Quando {device} finisce"),
84872
85412
  icon: "square"
84873
85413
  }
84874
- }
85414
+ },
85415
+ overrides: { byType: {
85416
+ [DeviceType.Washer]: {
85417
+ state: { running: {
85418
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
85419
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
85420
+ } },
85421
+ events: {
85422
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
85423
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
85424
+ }
85425
+ },
85426
+ [DeviceType.Dryer]: {
85427
+ state: { running: {
85428
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
85429
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
85430
+ } },
85431
+ events: {
85432
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
85433
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
85434
+ }
85435
+ },
85436
+ [DeviceType.Dishwasher]: {
85437
+ state: { running: {
85438
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
85439
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
85440
+ } },
85441
+ events: {
85442
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
85443
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
85444
+ }
85445
+ }
85446
+ } }
84875
85447
  },
84876
85448
  update: {
84877
85449
  scope: "device",
@@ -85643,6 +86215,10 @@ var SENSOR_CAP_VOCABULARY = {
85643
86215
  icon: "flame"
85644
86216
  }]
85645
86217
  },
86218
+ "group-active": {
86219
+ scope: "device",
86220
+ noun: t("Group state", "Stato del gruppo")
86221
+ },
85646
86222
  "group-commands": {
85647
86223
  scope: "device",
85648
86224
  noun: t("Group command", "Comando di gruppo")
@@ -85699,6 +86275,17 @@ var SENSOR_CAP_VOCABULARY = {
85699
86275
  }],
85700
86276
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
85701
86277
  },
86278
+ meter: {
86279
+ scope: "device",
86280
+ noun: t("Meter", "Contatore"),
86281
+ state: [{
86282
+ kind: "numeric",
86283
+ field: "value",
86284
+ quantity: t("the total", "il totale"),
86285
+ label: t("Total", "Totale"),
86286
+ icon: "gauge"
86287
+ }]
86288
+ },
85702
86289
  "numeric-sensor": {
85703
86290
  scope: "device",
85704
86291
  noun: t("Sensor", "Sensore"),
@@ -86171,8 +86758,47 @@ function projectAction(cap, action) {
86171
86758
  };
86172
86759
  }
86173
86760
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
86174
- 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;
86761
+ 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;
86175
86762
  DeviceFeature.BatteryOperated;
86763
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
86764
+ 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.";
86765
+ 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.";
86766
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
86767
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
86768
+ 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.";
86769
+ function withheld(reason) {
86770
+ return {
86771
+ [DeviceType.Washer]: {
86772
+ exported: false,
86773
+ reason
86774
+ },
86775
+ [DeviceType.Dryer]: {
86776
+ exported: false,
86777
+ reason
86778
+ },
86779
+ [DeviceType.Dishwasher]: {
86780
+ exported: false,
86781
+ reason
86782
+ }
86783
+ };
86784
+ }
86785
+ function offered(received) {
86786
+ return {
86787
+ [DeviceType.Washer]: {
86788
+ exported: true,
86789
+ as: received
86790
+ },
86791
+ [DeviceType.Dryer]: {
86792
+ exported: true,
86793
+ as: received
86794
+ },
86795
+ [DeviceType.Dishwasher]: {
86796
+ exported: true,
86797
+ as: received
86798
+ }
86799
+ };
86800
+ }
86801
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
86176
86802
  /** Reject after `ms`; always clears its own timer. */
86177
86803
  async function withTimeout$1(promise, ms, label) {
86178
86804
  let timer;
@@ -87357,6 +87983,11 @@ Object.freeze({
87357
87983
  form: "single",
87358
87984
  optional: false
87359
87985
  }],
87986
+ "groupActive.getStatus": [{
87987
+ name: "deviceId",
87988
+ form: "single",
87989
+ optional: false
87990
+ }],
87360
87991
  "groupCommands.getStatus": [{
87361
87992
  name: "deviceId",
87362
87993
  form: "single",
@@ -87567,6 +88198,11 @@ Object.freeze({
87567
88198
  form: "single",
87568
88199
  optional: false
87569
88200
  }],
88201
+ "meter.getStatus": [{
88202
+ name: "deviceId",
88203
+ form: "single",
88204
+ optional: false
88205
+ }],
87570
88206
  "motion.getStatus": [{
87571
88207
  name: "deviceId",
87572
88208
  form: "single",
@@ -89174,7 +89810,6 @@ Object.freeze({
89174
89810
  "network-access": "ingress",
89175
89811
  "smtp-provider": "email"
89176
89812
  });
89177
- DeviceType.Camera;
89178
89813
  /**
89179
89814
  * A saved Customize assignment (D936). The schema is the type: callers use
89180
89815
  * `z.infer`, they do not restate the shape.