@camstack/addon-provider-rtsp 1.2.147 → 1.2.148

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
@@ -5466,7 +5466,7 @@ var ZodIssueCode = {
5466
5466
  var ZodFirstPartyTypeKind;
5467
5467
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5468
5468
  //#endregion
5469
- //#region ../types/dist/sleep-bykKrTgu.mjs
5469
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5470
5470
  /**
5471
5471
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5472
5472
  * window to float samples (D455).
@@ -8659,6 +8659,7 @@ var CAP_NAMES = Object.freeze([
8659
8659
  "filesystem-browse",
8660
8660
  "flood",
8661
8661
  "gas",
8662
+ "group-active",
8662
8663
  "group-commands",
8663
8664
  "group-status",
8664
8665
  "heating-valve",
@@ -8681,6 +8682,7 @@ var CAP_NAMES = Object.freeze([
8681
8682
  "login-method",
8682
8683
  "media-player",
8683
8684
  "mesh-network",
8685
+ "meter",
8684
8686
  "metrics-provider",
8685
8687
  "model-convert",
8686
8688
  "model-distributor",
@@ -9479,6 +9481,10 @@ Object.freeze({
9479
9481
  "path": "detected",
9480
9482
  "valueType": "boolean"
9481
9483
  }],
9484
+ "group-active": [{
9485
+ "path": "active",
9486
+ "valueType": "boolean"
9487
+ }],
9482
9488
  "group-status": [
9483
9489
  {
9484
9490
  "path": "included",
@@ -9738,6 +9744,10 @@ Object.freeze({
9738
9744
  ]
9739
9745
  }
9740
9746
  ],
9747
+ "meter": [{
9748
+ "path": "value",
9749
+ "valueType": "number"
9750
+ }],
9741
9751
  "motion": [
9742
9752
  {
9743
9753
  "path": "detected",
@@ -10570,7 +10580,7 @@ function maskUrlCredentials(rawUrl) {
10570
10580
  }
10571
10581
  }
10572
10582
  //#endregion
10573
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10583
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10574
10584
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10575
10585
  DeviceType["Camera"] = "camera";
10576
10586
  DeviceType["Hub"] = "hub";
@@ -10664,8 +10674,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10664
10674
  DeviceType["PetFeeder"] = "pet-feeder";
10665
10675
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10666
10676
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10667
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10677
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10678
+ * A plug-built dishwasher carries running-state and power instead. */
10668
10679
  DeviceType["Dishwasher"] = "dishwasher";
10680
+ /** Washing machine. A plug-built one is running while its power stays
10681
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10682
+ DeviceType["Washer"] = "washer";
10683
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10684
+ DeviceType["Dryer"] = "dryer";
10669
10685
  return DeviceType;
10670
10686
  }({});
10671
10687
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -10923,7 +10939,7 @@ function errMsg(err) {
10923
10939
  return String(err);
10924
10940
  }
10925
10941
  //#endregion
10926
- //#region ../types/dist/composition-OhpuespA.mjs
10942
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
10927
10943
  /**
10928
10944
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10929
10945
  *
@@ -11238,6 +11254,13 @@ var table = {
11238
11254
  apply: () => {
11239
11255
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11240
11256
  }
11257
+ },
11258
+ schmitt: {
11259
+ minArgs: 3,
11260
+ maxArgs: 5,
11261
+ apply: () => {
11262
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11263
+ }
11241
11264
  }
11242
11265
  };
11243
11266
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11679,6 +11702,99 @@ function validateExpressionSource(src) {
11679
11702
  return null;
11680
11703
  }
11681
11704
  /**
11705
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11706
+ *
11707
+ * Standby of the control board is under 5 W; a motor or a heater is far
11708
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11709
+ * a cycle, so running starts only after 30 s above the line.
11710
+ *
11711
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11712
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11713
+ * report "finished" in the middle of the program, so the stop dwell is
11714
+ * 10 minutes on every type. The number is stored per type so one machine
11715
+ * can move later without moving the others.
11716
+ */
11717
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11718
+ var APPLIANCE_KINDS = [
11719
+ "washer",
11720
+ "dryer",
11721
+ "dishwasher"
11722
+ ];
11723
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11724
+ /**
11725
+ * Statistics and integrals over a history read (D944).
11726
+ *
11727
+ * Pure: the same points always give the same answer, so a restart recomputes
11728
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11729
+ * never the mean of the samples. A hole with no held value is not integrated
11730
+ * as zero. A truncated read is not published.
11731
+ */
11732
+ var STATISTIC_STATS = [
11733
+ "min",
11734
+ "max",
11735
+ "mean",
11736
+ "sum",
11737
+ "count",
11738
+ "change"
11739
+ ];
11740
+ /**
11741
+ * The range a statistics or integral helper asks history for (D944).
11742
+ *
11743
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11744
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11745
+ * is strictly longer than the longest that range can be. Forever qualifies.
11746
+ * Equal to a tier's retention is a refusal, not a short answer.
11747
+ */
11748
+ var MINUTE_MS = 6e4;
11749
+ var HOUR_MS = 60 * MINUTE_MS;
11750
+ var DAY_MS = 24 * HOUR_MS;
11751
+ var ROLLING_SPANS = [
11752
+ "1h",
11753
+ "24h",
11754
+ "2d",
11755
+ "7d",
11756
+ "30d",
11757
+ "custom"
11758
+ ];
11759
+ var CALENDAR_PERIODS = [
11760
+ "today",
11761
+ "yesterday",
11762
+ "this-week",
11763
+ "this-month"
11764
+ ];
11765
+ var RESET_PERIODS = [
11766
+ "never",
11767
+ "daily",
11768
+ "weekly",
11769
+ "monthly"
11770
+ ];
11771
+ 5 * MINUTE_MS;
11772
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11773
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11774
+ var rollingWindowObject = object({
11775
+ kind: literal("rolling"),
11776
+ span: _enum(ROLLING_SPANS),
11777
+ customMinutes: number().int().min(5).optional()
11778
+ }).check((payload) => {
11779
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11780
+ code: "custom",
11781
+ message: "a custom range needs a duration in minutes",
11782
+ path: ["customMinutes"],
11783
+ input: payload.value
11784
+ });
11785
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11786
+ code: "custom",
11787
+ message: "only a custom range carries a duration",
11788
+ path: ["customMinutes"],
11789
+ input: payload.value
11790
+ });
11791
+ });
11792
+ var RollingWindowSchema = rollingWindowObject;
11793
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11794
+ kind: literal("calendar"),
11795
+ period: _enum(CALENDAR_PERIODS)
11796
+ })]);
11797
+ /**
11682
11798
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11683
11799
  * id. Split out so helper schemas can name it without a cycle through
11684
11800
  * `composition.ts` (D659).
@@ -11704,7 +11820,13 @@ var GROUP_TEMPLATE_IDS = [
11704
11820
  "occupancy",
11705
11821
  "binary",
11706
11822
  "switch",
11707
- "light"
11823
+ "light",
11824
+ "fan",
11825
+ "cover",
11826
+ "valve",
11827
+ "lock",
11828
+ "media-player",
11829
+ "climate"
11708
11830
  ];
11709
11831
  var NUMERIC_AGGREGATES = [
11710
11832
  "mean",
@@ -11734,14 +11856,73 @@ var HelperMemberSchema = object({
11734
11856
  cap: string().min(1),
11735
11857
  fieldPath: string().min(1)
11736
11858
  });
11737
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11738
- kind: literal("group"),
11739
- templateId: GroupTemplateIdSchema,
11740
- aggregate: AggregateReducerSchema,
11741
- members: array(HelperMemberSchema).min(1).max(64),
11742
- /** Actuator groups only. Readings leave this unset. */
11743
- active: ActiveCriterionSchema.optional()
11744
- })]);
11859
+ var HelperSpecSchema = discriminatedUnion("kind", [
11860
+ object({
11861
+ kind: literal("group"),
11862
+ templateId: GroupTemplateIdSchema,
11863
+ aggregate: AggregateReducerSchema,
11864
+ members: array(HelperMemberSchema).min(1).max(64),
11865
+ /** Actuator groups only. Readings leave this unset. */
11866
+ active: ActiveCriterionSchema.optional()
11867
+ }),
11868
+ object({
11869
+ kind: literal("appliance"),
11870
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11871
+ appliance: _enum(APPLIANCE_KINDS),
11872
+ thresholdWatts: number().positive(),
11873
+ startDwellMs: number().int().nonnegative(),
11874
+ stopDwellMs: number().int().nonnegative(),
11875
+ member: HelperMemberSchema
11876
+ }),
11877
+ object({
11878
+ kind: literal("statistic"),
11879
+ stat: _enum(STATISTIC_STATS),
11880
+ window: StatisticWindowSchema,
11881
+ source: HelperMemberSchema
11882
+ }),
11883
+ object({
11884
+ kind: literal("integral"),
11885
+ reset: _enum(RESET_PERIODS),
11886
+ output: _enum(["energy", "meter"]),
11887
+ source: HelperMemberSchema
11888
+ }),
11889
+ object({
11890
+ kind: literal("threshold"),
11891
+ source: HelperMemberSchema,
11892
+ high: number(),
11893
+ low: number(),
11894
+ onForMs: number().int().nonnegative(),
11895
+ offForMs: number().int().nonnegative()
11896
+ }),
11897
+ object({
11898
+ kind: literal("arithmetic"),
11899
+ op: _enum([
11900
+ "sum",
11901
+ "difference",
11902
+ "ratio"
11903
+ ]),
11904
+ inputs: array(HelperMemberSchema).min(2).max(64)
11905
+ }),
11906
+ object({
11907
+ kind: literal("expression"),
11908
+ expr: string().min(1),
11909
+ inputs: array(object({
11910
+ name: string().min(1),
11911
+ member: HelperMemberSchema
11912
+ })).min(1).max(64),
11913
+ output: _enum(["number", "boolean"])
11914
+ }),
11915
+ object({
11916
+ kind: literal("derivative"),
11917
+ window: RollingWindowSchema,
11918
+ per: _enum([
11919
+ "second",
11920
+ "minute",
11921
+ "hour"
11922
+ ]),
11923
+ source: HelperMemberSchema
11924
+ })
11925
+ ]);
11745
11926
  /** A composed device's stableId is this prefix plus the block id. */
11746
11927
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11747
11928
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11802,6 +11983,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11802
11983
  "all"
11803
11984
  ]),
11804
11985
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11986
+ /**
11987
+ * Set when the reads are an enum state, not a yes/no: the listed states
11988
+ * count as active (a cover is `open`). A state outside the list is inactive;
11989
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11990
+ */
11991
+ activeWhen: array(string().min(1)).min(1).optional(),
11805
11992
  /** `value` is the reading; the others are the member counts. */
11806
11993
  publish: _enum([
11807
11994
  "value",
@@ -11815,6 +12002,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11815
12002
  "omit",
11816
12003
  "offline"
11817
12004
  ])
12005
+ }),
12006
+ object({
12007
+ kind: literal("series"),
12008
+ read: CompositionFieldReadSchema,
12009
+ /** `value` is the statistic or the integral. The others are the gap counts. */
12010
+ publish: _enum([
12011
+ "value",
12012
+ "included",
12013
+ "excluded",
12014
+ "total"
12015
+ ]),
12016
+ /**
12017
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
12018
+ * device unseeded until history answers, so a restart cannot publish 0.
12019
+ */
12020
+ empty: _enum([
12021
+ "null",
12022
+ "omit",
12023
+ "offline"
12024
+ ])
11818
12025
  })
11819
12026
  ]);
11820
12027
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17006,7 +17213,22 @@ var BrokerProviderInfoSchema = object({
17006
17213
  */
17007
17214
  interactiveConnectPath: string().min(1).optional(),
17008
17215
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17009
- interactiveDisconnectPath: string().min(1).optional()
17216
+ interactiveDisconnectPath: string().min(1).optional(),
17217
+ /**
17218
+ * The kind signs in through a server-held interactive session instead of
17219
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17220
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17221
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17222
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17223
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17224
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17225
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17226
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17227
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17228
+ * offers it as the default path; the fields the session fills are
17229
+ * marked `filledBySignIn` in the kind's settings schema.
17230
+ */
17231
+ signIn: object({ basePath: string().min(1) }).optional()
17010
17232
  }))
17011
17233
  });
17012
17234
  var ListInputSchema = object({
@@ -18111,7 +18333,8 @@ var CompositionProblemSchema = object({
18111
18333
  "native-capability-replace",
18112
18334
  "mixed-quantity",
18113
18335
  "helper-mismatch",
18114
- "member-constraint"
18336
+ "member-constraint",
18337
+ "retention"
18115
18338
  ]),
18116
18339
  path: string(),
18117
18340
  message: string()
@@ -18345,13 +18568,17 @@ Object.freeze({
18345
18568
  latchedAt: {
18346
18569
  kind: "fixed",
18347
18570
  result: ["number", "null"]
18571
+ },
18572
+ schmitt: {
18573
+ kind: "fixed",
18574
+ result: ["boolean", "null"]
18348
18575
  }
18349
18576
  });
18350
18577
  /**
18351
18578
  * One catalog row per base reading a group helper can build (D944 §3).
18352
18579
  * Data, not a form default written into the block.
18353
18580
  */
18354
- var NOW = {
18581
+ var NOW$2 = {
18355
18582
  fieldPath: "lastFetchedAt",
18356
18583
  expr: "now"
18357
18584
  };
@@ -18365,6 +18592,8 @@ function numeric(input) {
18365
18592
  family: "numeric",
18366
18593
  deviceType: DeviceType.Sensor,
18367
18594
  memberDeviceType: DeviceType.Sensor,
18595
+ memberDeviceTypes: [DeviceType.Sensor],
18596
+ activeWhen: void 0,
18368
18597
  commandCaps: [],
18369
18598
  baseUnit: baseUnitOf(input.quantity),
18370
18599
  aggregates: NUMERIC_AGGREGATES,
@@ -18380,6 +18609,8 @@ function binary(input) {
18380
18609
  family: "binary",
18381
18610
  deviceType: DeviceType.Sensor,
18382
18611
  memberDeviceType: DeviceType.Sensor,
18612
+ memberDeviceTypes: [DeviceType.Sensor],
18613
+ activeWhen: void 0,
18383
18614
  commandCaps: [],
18384
18615
  quantity: "none",
18385
18616
  baseUnit: void 0,
@@ -18397,7 +18628,7 @@ var GROUP_TEMPLATES = [
18397
18628
  quantity: "temperature",
18398
18629
  defaultAggregate: "mean",
18399
18630
  empty: "null",
18400
- companions: [NOW]
18631
+ companions: [NOW$2]
18401
18632
  }),
18402
18633
  numeric({
18403
18634
  id: "humidity",
@@ -18408,7 +18639,7 @@ var GROUP_TEMPLATES = [
18408
18639
  quantity: "humidity",
18409
18640
  defaultAggregate: "mean",
18410
18641
  empty: "null",
18411
- companions: [NOW]
18642
+ companions: [NOW$2]
18412
18643
  }),
18413
18644
  numeric({
18414
18645
  id: "pressure",
@@ -18419,7 +18650,7 @@ var GROUP_TEMPLATES = [
18419
18650
  quantity: "pressure",
18420
18651
  defaultAggregate: "mean",
18421
18652
  empty: "null",
18422
- companions: [NOW]
18653
+ companions: [NOW$2]
18423
18654
  }),
18424
18655
  numeric({
18425
18656
  id: "illuminance",
@@ -18430,7 +18661,7 @@ var GROUP_TEMPLATES = [
18430
18661
  quantity: "illuminance",
18431
18662
  defaultAggregate: "mean",
18432
18663
  empty: "null",
18433
- companions: [NOW]
18664
+ companions: [NOW$2]
18434
18665
  }),
18435
18666
  numeric({
18436
18667
  id: "power",
@@ -18441,7 +18672,7 @@ var GROUP_TEMPLATES = [
18441
18672
  quantity: "power",
18442
18673
  defaultAggregate: "sum",
18443
18674
  empty: "omit",
18444
- companions: [NOW]
18675
+ companions: [NOW$2]
18445
18676
  }),
18446
18677
  numeric({
18447
18678
  id: "energy",
@@ -18452,7 +18683,7 @@ var GROUP_TEMPLATES = [
18452
18683
  quantity: "energy",
18453
18684
  defaultAggregate: "sum",
18454
18685
  empty: "omit",
18455
- companions: [NOW]
18686
+ companions: [NOW$2]
18456
18687
  }),
18457
18688
  numeric({
18458
18689
  id: "battery",
@@ -18487,7 +18718,7 @@ var GROUP_TEMPLATES = [
18487
18718
  quantity: "device",
18488
18719
  defaultAggregate: "mean",
18489
18720
  empty: "null",
18490
- companions: [NOW]
18721
+ companions: [NOW$2]
18491
18722
  }),
18492
18723
  binary({
18493
18724
  id: "motion",
@@ -18581,6 +18812,11 @@ var GROUP_TEMPLATES = [
18581
18812
  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.",
18582
18813
  deviceType: DeviceType.Switch,
18583
18814
  outputCap: "switch",
18815
+ outputField: "on",
18816
+ member: {
18817
+ cap: "switch",
18818
+ fieldPath: "on"
18819
+ },
18584
18820
  commandCaps: ["switch"]
18585
18821
  }),
18586
18822
  actuator({
@@ -18588,34 +18824,136 @@ var GROUP_TEMPLATES = [
18588
18824
  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.",
18589
18825
  deviceType: DeviceType.Light,
18590
18826
  outputCap: "switch",
18827
+ outputField: "on",
18828
+ member: {
18829
+ cap: "switch",
18830
+ fieldPath: "on"
18831
+ },
18591
18832
  commandCaps: [
18592
18833
  "switch",
18593
18834
  "brightness",
18594
18835
  "color"
18595
18836
  ]
18837
+ }),
18838
+ actuator({
18839
+ id: "fan",
18840
+ 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.",
18841
+ deviceType: DeviceType.Fan,
18842
+ outputCap: "switch",
18843
+ outputField: "on",
18844
+ member: {
18845
+ cap: "switch",
18846
+ fieldPath: "on"
18847
+ },
18848
+ commandCaps: ["switch", "fan-control"]
18849
+ }),
18850
+ actuator({
18851
+ id: "cover",
18852
+ 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.",
18853
+ deviceType: DeviceType.Cover,
18854
+ outputCap: "group-active",
18855
+ outputField: "active",
18856
+ member: {
18857
+ cap: "cover",
18858
+ fieldPath: "state"
18859
+ },
18860
+ activeWhen: [
18861
+ "open",
18862
+ "opening",
18863
+ "stopped"
18864
+ ],
18865
+ commandCaps: ["cover"]
18866
+ }),
18867
+ actuator({
18868
+ id: "valve",
18869
+ 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.",
18870
+ deviceType: DeviceType.Valve,
18871
+ outputCap: "group-active",
18872
+ outputField: "active",
18873
+ member: {
18874
+ cap: "valve",
18875
+ fieldPath: "state"
18876
+ },
18877
+ activeWhen: [
18878
+ "open",
18879
+ "opening",
18880
+ "stopped"
18881
+ ],
18882
+ commandCaps: ["valve"]
18883
+ }),
18884
+ actuator({
18885
+ id: "lock",
18886
+ 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.",
18887
+ deviceType: DeviceType.Lock,
18888
+ outputCap: "group-active",
18889
+ outputField: "active",
18890
+ member: {
18891
+ cap: "lock-control",
18892
+ fieldPath: "state"
18893
+ },
18894
+ activeWhen: ["locked"],
18895
+ commandCaps: ["lock-control"]
18896
+ }),
18897
+ actuator({
18898
+ id: "media-player",
18899
+ 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.",
18900
+ deviceType: DeviceType.MediaPlayer,
18901
+ outputCap: "group-active",
18902
+ outputField: "active",
18903
+ member: {
18904
+ cap: "media-player",
18905
+ fieldPath: "state"
18906
+ },
18907
+ activeWhen: ["playing", "buffering"],
18908
+ commandCaps: ["media-player"]
18909
+ }),
18910
+ actuator({
18911
+ id: "climate",
18912
+ 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.",
18913
+ deviceType: DeviceType.Thermostat,
18914
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
18915
+ outputCap: "group-active",
18916
+ outputField: "active",
18917
+ member: {
18918
+ cap: "climate-control",
18919
+ fieldPath: "mode"
18920
+ },
18921
+ activeWhen: [
18922
+ "heat",
18923
+ "cool",
18924
+ "auto",
18925
+ "heat_cool",
18926
+ "fan_only",
18927
+ "dry"
18928
+ ],
18929
+ commandCaps: ["climate-control"]
18596
18930
  })
18597
18931
  ];
18598
18932
  function actuator(input) {
18599
18933
  return {
18600
- ...input,
18934
+ id: input.id,
18935
+ summary: input.summary,
18936
+ deviceType: input.deviceType,
18937
+ outputCap: input.outputCap,
18938
+ outputField: input.outputField,
18939
+ commandCaps: input.commandCaps,
18601
18940
  family: "actuator",
18602
18941
  role: void 0,
18603
18942
  memberDeviceType: input.deviceType,
18604
- outputField: "on",
18943
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
18944
+ activeWhen: input.activeWhen,
18605
18945
  quantity: "none",
18606
18946
  baseUnit: void 0,
18607
18947
  aggregates: BINARY_AGGREGATES,
18608
18948
  defaultAggregate: "any",
18609
18949
  empty: "offline",
18610
- accept: [{
18611
- cap: "switch",
18612
- fieldPath: "on"
18613
- }],
18950
+ accept: [input.member],
18614
18951
  companions: [CHANGED]
18615
18952
  };
18616
18953
  }
18617
18954
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18618
18955
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18956
+ DeviceType.Camera;
18619
18957
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18620
18958
  /**
18621
18959
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -43822,7 +44160,7 @@ var NetworkAccessStatusSchema = object({
43822
44160
  });
43823
44161
  /**
43824
44162
  * Optional, richer endpoint shape returned by providers that expose
43825
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44163
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43826
44164
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43827
44165
  * the originating provider config (mode + sourcePort) so the
43828
44166
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46509,7 +46847,20 @@ var NcRuleInputSchema = object({
46509
46847
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46510
46848
  * path does not run Zod defaults.
46511
46849
  */
46512
- groupingSec: number().int().min(5).max(60).optional()
46850
+ groupingSec: number().int().min(5).max(60).optional(),
46851
+ /**
46852
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46853
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46854
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46855
+ * same mark the Library writes, and records whose notification it was and
46856
+ * when. A channel with no buttons gets the same two choices as links.
46857
+ *
46858
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46859
+ * cap path): absent and `false` both mean off, which is what every rule
46860
+ * authored before this field meant. An editor turns it off by writing
46861
+ * `false`, so it needs no `clear` key.
46862
+ */
46863
+ askVerdict: boolean().optional()
46513
46864
  });
46514
46865
  /**
46515
46866
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57333,7 +57684,8 @@ var BATTERY_DEVICE_TYPES = [
57333
57684
  DeviceType.Switch,
57334
57685
  DeviceType.PetFeeder,
57335
57686
  DeviceType.Container,
57336
- DeviceType.Thermostat
57687
+ DeviceType.Thermostat,
57688
+ DeviceType.EventEmitter
57337
57689
  ];
57338
57690
  /** Generic Customize target for the percentage reading (D936). */
57339
57691
  var batteryCustomize = {
@@ -60201,7 +60553,17 @@ var groupCommandsCapability = {
60201
60553
  scope: "device",
60202
60554
  deviceNative: true,
60203
60555
  mode: "singleton",
60204
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60556
+ deviceTypes: [
60557
+ DeviceType.Switch,
60558
+ DeviceType.Light,
60559
+ DeviceType.Fan,
60560
+ DeviceType.Cover,
60561
+ DeviceType.Valve,
60562
+ DeviceType.Lock,
60563
+ DeviceType.MediaPlayer,
60564
+ DeviceType.Thermostat,
60565
+ DeviceType.Climate
60566
+ ],
60205
60567
  methods: {},
60206
60568
  status: {
60207
60569
  schema: GroupCommandsSchema,
@@ -60219,6 +60581,49 @@ var groupCommandsCapability = {
60219
60581
  history: "none"
60220
60582
  };
60221
60583
  /**
60584
+ * Whether a helper actuator group counts as active (D944): at least one
60585
+ * included member is, or every included member is. What "active" means is the
60586
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60587
+ * climate device is not off. A group of lights, switches and fans reports
60588
+ * `switch.on` instead; this cap is for the types whose own state is not a
60589
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60590
+ * empty included set takes the device offline, never `active: false`.
60591
+ */
60592
+ var GroupActiveSchema = object({
60593
+ active: boolean().meta({ label: "Active" }),
60594
+ /** Ms epoch when the slice was last updated. */
60595
+ lastChangedAt: number()
60596
+ });
60597
+ var groupActiveCapability = {
60598
+ name: "group-active",
60599
+ scope: "device",
60600
+ deviceNative: true,
60601
+ mode: "singleton",
60602
+ deviceTypes: [
60603
+ DeviceType.Cover,
60604
+ DeviceType.Valve,
60605
+ DeviceType.Lock,
60606
+ DeviceType.MediaPlayer,
60607
+ DeviceType.Climate,
60608
+ DeviceType.Thermostat
60609
+ ],
60610
+ methods: {},
60611
+ status: {
60612
+ schema: GroupActiveSchema,
60613
+ kind: "push"
60614
+ },
60615
+ runtimeState: GroupActiveSchema,
60616
+ /**
60617
+ * Runtime-state durability: **session** — recomputed from the members on the
60618
+ * next source event; a restored value would outlive the members it named.
60619
+ *
60620
+ * See `RuntimeStateDurability`. Enforced by
60621
+ * `scripts/check-runtime-state-durability.ts`.
60622
+ */
60623
+ durability: "session",
60624
+ history: "none"
60625
+ };
60626
+ /**
60222
60627
  * How many members of a helper group answered (D944). Counts are integers,
60223
60628
  * not measurements: zero included is a real count, never a stand-in reading.
60224
60629
  * The reading itself stays on the output capability. History is none — the
@@ -60249,7 +60654,14 @@ var groupStatusCapability = {
60249
60654
  deviceTypes: [
60250
60655
  DeviceType.Sensor,
60251
60656
  DeviceType.Switch,
60252
- DeviceType.Light
60657
+ DeviceType.Light,
60658
+ DeviceType.Fan,
60659
+ DeviceType.Cover,
60660
+ DeviceType.Valve,
60661
+ DeviceType.Lock,
60662
+ DeviceType.MediaPlayer,
60663
+ DeviceType.Thermostat,
60664
+ DeviceType.Climate
60253
60665
  ],
60254
60666
  methods: {},
60255
60667
  status: {
@@ -61522,7 +61934,14 @@ var lockControlCapability = {
61522
61934
  }),
61523
61935
  unlock: method(object({
61524
61936
  deviceId: number().int().nonnegative(),
61525
- code: string().min(1).optional()
61937
+ code: string().min(1).optional(),
61938
+ /**
61939
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
61940
+ * with one call is refused unless the caller says it was confirmed. A
61941
+ * single lock ignores it. The refusal lives in the callee, so no
61942
+ * automation or API caller reaches the doors by skipping a dialog.
61943
+ */
61944
+ confirm: boolean().optional()
61526
61945
  }), _void(), {
61527
61946
  kind: "mutation",
61528
61947
  auth: "protected"
@@ -61559,6 +61978,44 @@ var lockControlCapability = {
61559
61978
  volatileStateFields: ["lastChangedAt"]
61560
61979
  };
61561
61980
  /**
61981
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
61982
+ * so dashboards keep one series; every other instantaneous reading lands here.
61983
+ * `value` is the time integral in the source quantity's accumulated base
61984
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
61985
+ */
61986
+ var MeterStatusSchema = object({
61987
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
61988
+ lastFetchedAt: number()
61989
+ });
61990
+ var meterCapability = {
61991
+ name: "meter",
61992
+ scope: "device",
61993
+ deviceNative: true,
61994
+ mode: "singleton",
61995
+ deviceTypes: [DeviceType.Sensor],
61996
+ methods: {},
61997
+ status: {
61998
+ schema: MeterStatusSchema,
61999
+ kind: "push"
62000
+ },
62001
+ runtimeState: MeterStatusSchema,
62002
+ /**
62003
+ * Runtime-state durability: **restored** — the total is a cache of the
62004
+ * history integral. A restart shows it only until the history pass
62005
+ * recomputes the open period; it is not an in-memory buffer.
62006
+ *
62007
+ * See `RuntimeStateDurability`. Enforced by
62008
+ * `scripts/check-runtime-state-durability.ts`.
62009
+ */
62010
+ durability: "restored",
62011
+ history: { fields: { value: {
62012
+ kind: "counter",
62013
+ deadband: .001,
62014
+ minIntervalMs: 6e4
62015
+ } } },
62016
+ volatileStateFields: ["lastFetchedAt"]
62017
+ };
62018
+ /**
61562
62019
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61563
62020
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61564
62021
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64070,9 +64527,9 @@ var PowerMeterStatusSchema = object({
64070
64527
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64071
64528
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64072
64529
  /** Voltage in volts. */
64073
- volts: number().optional().meta(readingMeta("voltage")),
64530
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64074
64531
  /** Current in amperes. */
64075
- amps: number().optional().meta(readingMeta("current")),
64532
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64076
64533
  /** Apparent power in volt-amperes. */
64077
64534
  va: number().optional().meta(readingMeta("apparent-power")),
64078
64535
  /** Power factor (0..1) if reported. */
@@ -64080,12 +64537,74 @@ var PowerMeterStatusSchema = object({
64080
64537
  /** Ms epoch when the slice was last updated. */
64081
64538
  lastFetchedAt: number()
64082
64539
  });
64540
+ /**
64541
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64542
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64543
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64544
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64545
+ * camera and the like are left out: their draw is not what anyone meters.
64546
+ */
64547
+ var POWER_METER_DEVICE_TYPES = [
64548
+ DeviceType.Sensor,
64549
+ DeviceType.Switch,
64550
+ DeviceType.Light,
64551
+ DeviceType.Fan,
64552
+ DeviceType.Climate,
64553
+ DeviceType.Thermostat,
64554
+ DeviceType.Humidifier,
64555
+ DeviceType.WaterHeater,
64556
+ DeviceType.MediaPlayer,
64557
+ DeviceType.Washer,
64558
+ DeviceType.Dryer,
64559
+ DeviceType.Dishwasher,
64560
+ DeviceType.Vacuum,
64561
+ DeviceType.LawnMower,
64562
+ DeviceType.PetFeeder
64563
+ ];
64564
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64565
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64566
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64567
+ function powerTarget(id, unit) {
64568
+ return {
64569
+ id,
64570
+ cardinality: "scalar",
64571
+ vocabulary: {
64572
+ cap: "power-meter",
64573
+ stateField: id
64574
+ },
64575
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64576
+ apply: "add",
64577
+ path: id,
64578
+ sources: [{
64579
+ kind: "numeric",
64580
+ requiredUnit: unit,
64581
+ transforms: [{ kind: "identity" }]
64582
+ }],
64583
+ companions: [{
64584
+ kind: "clock",
64585
+ path: "lastFetchedAt",
64586
+ when: "always"
64587
+ }],
64588
+ sourceReport: { status: "assignment-status" },
64589
+ advancedExpression: true
64590
+ };
64591
+ }
64592
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64593
+ var powerMeterCustomize = {
64594
+ version: 1,
64595
+ targets: [
64596
+ powerTarget("watts", "W"),
64597
+ powerTarget("kwhTotal", "kWh"),
64598
+ powerTarget("volts", "V"),
64599
+ powerTarget("amps", "A")
64600
+ ]
64601
+ };
64083
64602
  var powerMeterCapability = {
64084
64603
  name: "power-meter",
64085
64604
  scope: "device",
64086
64605
  deviceNative: true,
64087
64606
  mode: "singleton",
64088
- deviceTypes: [DeviceType.Sensor],
64607
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64089
64608
  methods: {},
64090
64609
  status: {
64091
64610
  schema: PowerMeterStatusSchema,
@@ -64142,7 +64661,8 @@ var powerMeterCapability = {
64142
64661
  } },
64143
64662
  /** Clock fields: written, but excluded from the compare that decides
64144
64663
  * whether persisting is worth a SQLite commit. */
64145
- volatileStateFields: ["lastFetchedAt"]
64664
+ volatileStateFields: ["lastFetchedAt"],
64665
+ customize: powerMeterCustomize
64146
64666
  };
64147
64667
  /**
64148
64668
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64823,6 +65343,8 @@ var runningCustomize = {
64823
65343
  stateField: "running"
64824
65344
  },
64825
65345
  deviceTypes: [
65346
+ DeviceType.Washer,
65347
+ DeviceType.Dryer,
64826
65348
  DeviceType.Dishwasher,
64827
65349
  DeviceType.Vacuum,
64828
65350
  DeviceType.LawnMower,
@@ -67312,7 +67834,8 @@ var switchCapability = {
67312
67834
  deviceTypes: [
67313
67835
  DeviceType.Switch,
67314
67836
  DeviceType.Siren,
67315
- DeviceType.Light
67837
+ DeviceType.Light,
67838
+ DeviceType.Fan
67316
67839
  ],
67317
67840
  methods: { setState: method(object({
67318
67841
  deviceId: number(),
@@ -69525,8 +70048,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
69525
70048
  kind: "mutation",
69526
70049
  auth: "admin"
69527
70050
  });
70051
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69528
70052
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
69529
- 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;
70053
+ 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;
69530
70054
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
69531
70055
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
69532
70056
  new Set(CAP_NAMES);
@@ -69855,6 +70379,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
69855
70379
  featureProbe: featureProbeCapability,
69856
70380
  flood: floodCapability,
69857
70381
  gas: gasCapability,
70382
+ groupActive: groupActiveCapability,
69858
70383
  groupCommands: groupCommandsCapability,
69859
70384
  groupStatus: groupStatusCapability,
69860
70385
  heatingValve: heatingValveCapability,
@@ -69866,6 +70391,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
69866
70391
  lawnMowerControl: lawnMowerControlCapability,
69867
70392
  lockControl: lockControlCapability,
69868
70393
  mediaPlayer: mediaPlayerCapability,
70394
+ meter: meterCapability,
69869
70395
  motion: motionCapability,
69870
70396
  motionTrigger: motionTriggerCapability,
69871
70397
  motionZones: motionZonesCapability,
@@ -71125,7 +71651,7 @@ var BaseDeviceProvider = class extends BaseAddon {
71125
71651
  return toDeviceSummary(device, this.addonId);
71126
71652
  }
71127
71653
  };
71128
- 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;
71654
+ 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;
71129
71655
  new Set(Object.values(DeviceType));
71130
71656
  Object.freeze({
71131
71657
  "accessories.getStatus": {
@@ -74348,6 +74874,13 @@ Object.freeze({
74348
74874
  access: "view",
74349
74875
  role: "viewer"
74350
74876
  },
74877
+ "groupActive.getStatus": {
74878
+ capName: "group-active",
74879
+ capScope: "device",
74880
+ addonId: null,
74881
+ access: "view",
74882
+ role: "viewer"
74883
+ },
74351
74884
  "groupCommands.getStatus": {
74352
74885
  capName: "group-commands",
74353
74886
  capScope: "device",
@@ -75314,6 +75847,13 @@ Object.freeze({
75314
75847
  access: "create",
75315
75848
  role: "admin"
75316
75849
  },
75850
+ "meter.getStatus": {
75851
+ capName: "meter",
75852
+ capScope: "device",
75853
+ addonId: null,
75854
+ access: "view",
75855
+ role: "viewer"
75856
+ },
75317
75857
  "metricsProvider.collectSnapshot": {
75318
75858
  capName: "metrics-provider",
75319
75859
  capScope: "system",
@@ -83412,7 +83952,39 @@ var APPLIANCE_CAP_VOCABULARY = {
83412
83952
  phrase: t("When {device} finishes", "Quando {device} finisce"),
83413
83953
  icon: "square"
83414
83954
  }
83415
- }
83955
+ },
83956
+ overrides: { byType: {
83957
+ [DeviceType.Washer]: {
83958
+ state: { running: {
83959
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
83960
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
83961
+ } },
83962
+ events: {
83963
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
83964
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
83965
+ }
83966
+ },
83967
+ [DeviceType.Dryer]: {
83968
+ state: { running: {
83969
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
83970
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
83971
+ } },
83972
+ events: {
83973
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
83974
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
83975
+ }
83976
+ },
83977
+ [DeviceType.Dishwasher]: {
83978
+ state: { running: {
83979
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
83980
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
83981
+ } },
83982
+ events: {
83983
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
83984
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
83985
+ }
83986
+ }
83987
+ } }
83416
83988
  },
83417
83989
  update: {
83418
83990
  scope: "device",
@@ -84184,6 +84756,10 @@ var SENSOR_CAP_VOCABULARY = {
84184
84756
  icon: "flame"
84185
84757
  }]
84186
84758
  },
84759
+ "group-active": {
84760
+ scope: "device",
84761
+ noun: t("Group state", "Stato del gruppo")
84762
+ },
84187
84763
  "group-commands": {
84188
84764
  scope: "device",
84189
84765
  noun: t("Group command", "Comando di gruppo")
@@ -84240,6 +84816,17 @@ var SENSOR_CAP_VOCABULARY = {
84240
84816
  }],
84241
84817
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
84242
84818
  },
84819
+ meter: {
84820
+ scope: "device",
84821
+ noun: t("Meter", "Contatore"),
84822
+ state: [{
84823
+ kind: "numeric",
84824
+ field: "value",
84825
+ quantity: t("the total", "il totale"),
84826
+ label: t("Total", "Totale"),
84827
+ icon: "gauge"
84828
+ }]
84829
+ },
84243
84830
  "numeric-sensor": {
84244
84831
  scope: "device",
84245
84832
  noun: t("Sensor", "Sensore"),
@@ -84712,8 +85299,47 @@ function projectAction(cap, action) {
84712
85299
  };
84713
85300
  }
84714
85301
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
84715
- 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;
85302
+ 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;
84716
85303
  DeviceFeature.BatteryOperated;
85304
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
85305
+ 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.";
85306
+ 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.";
85307
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
85308
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
85309
+ 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.";
85310
+ function withheld(reason) {
85311
+ return {
85312
+ [DeviceType.Washer]: {
85313
+ exported: false,
85314
+ reason
85315
+ },
85316
+ [DeviceType.Dryer]: {
85317
+ exported: false,
85318
+ reason
85319
+ },
85320
+ [DeviceType.Dishwasher]: {
85321
+ exported: false,
85322
+ reason
85323
+ }
85324
+ };
85325
+ }
85326
+ function offered(received) {
85327
+ return {
85328
+ [DeviceType.Washer]: {
85329
+ exported: true,
85330
+ as: received
85331
+ },
85332
+ [DeviceType.Dryer]: {
85333
+ exported: true,
85334
+ as: received
85335
+ },
85336
+ [DeviceType.Dishwasher]: {
85337
+ exported: true,
85338
+ as: received
85339
+ }
85340
+ };
85341
+ }
85342
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
84717
85343
  /** Reject after `ms`; always clears its own timer. */
84718
85344
  async function withTimeout$1(promise, ms, label) {
84719
85345
  let timer;
@@ -85746,6 +86372,11 @@ Object.freeze({
85746
86372
  form: "single",
85747
86373
  optional: false
85748
86374
  }],
86375
+ "groupActive.getStatus": [{
86376
+ name: "deviceId",
86377
+ form: "single",
86378
+ optional: false
86379
+ }],
85749
86380
  "groupCommands.getStatus": [{
85750
86381
  name: "deviceId",
85751
86382
  form: "single",
@@ -85956,6 +86587,11 @@ Object.freeze({
85956
86587
  form: "single",
85957
86588
  optional: false
85958
86589
  }],
86590
+ "meter.getStatus": [{
86591
+ name: "deviceId",
86592
+ form: "single",
86593
+ optional: false
86594
+ }],
85959
86595
  "motion.getStatus": [{
85960
86596
  name: "deviceId",
85961
86597
  form: "single",
@@ -87563,7 +88199,6 @@ Object.freeze({
87563
88199
  "network-access": "ingress",
87564
88200
  "smtp-provider": "email"
87565
88201
  });
87566
- DeviceType.Camera;
87567
88202
  /**
87568
88203
  * A saved Customize assignment (D936). The schema is the type: callers use
87569
88204
  * `z.infer`, they do not restate the shape.