@camstack/addon-matter-broker 0.2.150 → 0.2.151

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
@@ -5589,7 +5589,7 @@ var ZodIssueCode = {
5589
5589
  var ZodFirstPartyTypeKind;
5590
5590
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5591
5591
  //#endregion
5592
- //#region ../types/dist/sleep-bykKrTgu.mjs
5592
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5593
5593
  /**
5594
5594
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5595
5595
  * window to float samples (D455).
@@ -8970,6 +8970,7 @@ var CAP_NAMES = Object.freeze([
8970
8970
  "filesystem-browse",
8971
8971
  "flood",
8972
8972
  "gas",
8973
+ "group-active",
8973
8974
  "group-commands",
8974
8975
  "group-status",
8975
8976
  "heating-valve",
@@ -8992,6 +8993,7 @@ var CAP_NAMES = Object.freeze([
8992
8993
  "login-method",
8993
8994
  "media-player",
8994
8995
  "mesh-network",
8996
+ "meter",
8995
8997
  "metrics-provider",
8996
8998
  "model-convert",
8997
8999
  "model-distributor",
@@ -9790,6 +9792,10 @@ Object.freeze({
9790
9792
  "path": "detected",
9791
9793
  "valueType": "boolean"
9792
9794
  }],
9795
+ "group-active": [{
9796
+ "path": "active",
9797
+ "valueType": "boolean"
9798
+ }],
9793
9799
  "group-status": [
9794
9800
  {
9795
9801
  "path": "included",
@@ -10049,6 +10055,10 @@ Object.freeze({
10049
10055
  ]
10050
10056
  }
10051
10057
  ],
10058
+ "meter": [{
10059
+ "path": "value",
10060
+ "valueType": "number"
10061
+ }],
10052
10062
  "motion": [
10053
10063
  {
10054
10064
  "path": "detected",
@@ -10792,7 +10802,7 @@ object({
10792
10802
  params: record(string$2(), union([string$2(), number()])).optional()
10793
10803
  });
10794
10804
  //#endregion
10795
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10805
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10796
10806
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10797
10807
  DeviceType["Camera"] = "camera";
10798
10808
  DeviceType["Hub"] = "hub";
@@ -10886,8 +10896,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10886
10896
  DeviceType["PetFeeder"] = "pet-feeder";
10887
10897
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10888
10898
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10889
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10899
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10900
+ * A plug-built dishwasher carries running-state and power instead. */
10890
10901
  DeviceType["Dishwasher"] = "dishwasher";
10902
+ /** Washing machine. A plug-built one is running while its power stays
10903
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10904
+ DeviceType["Washer"] = "washer";
10905
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10906
+ DeviceType["Dryer"] = "dryer";
10891
10907
  return DeviceType;
10892
10908
  }({});
10893
10909
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -11145,7 +11161,7 @@ function errMsg(err) {
11145
11161
  return String(err);
11146
11162
  }
11147
11163
  //#endregion
11148
- //#region ../types/dist/composition-OhpuespA.mjs
11164
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
11149
11165
  /**
11150
11166
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11151
11167
  *
@@ -11460,6 +11476,13 @@ var table = {
11460
11476
  apply: () => {
11461
11477
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11462
11478
  }
11479
+ },
11480
+ schmitt: {
11481
+ minArgs: 3,
11482
+ maxArgs: 5,
11483
+ apply: () => {
11484
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11485
+ }
11463
11486
  }
11464
11487
  };
11465
11488
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11901,6 +11924,99 @@ function validateExpressionSource(src) {
11901
11924
  return null;
11902
11925
  }
11903
11926
  /**
11927
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11928
+ *
11929
+ * Standby of the control board is under 5 W; a motor or a heater is far
11930
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11931
+ * a cycle, so running starts only after 30 s above the line.
11932
+ *
11933
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11934
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11935
+ * report "finished" in the middle of the program, so the stop dwell is
11936
+ * 10 minutes on every type. The number is stored per type so one machine
11937
+ * can move later without moving the others.
11938
+ */
11939
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11940
+ var APPLIANCE_KINDS = [
11941
+ "washer",
11942
+ "dryer",
11943
+ "dishwasher"
11944
+ ];
11945
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11946
+ /**
11947
+ * Statistics and integrals over a history read (D944).
11948
+ *
11949
+ * Pure: the same points always give the same answer, so a restart recomputes
11950
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11951
+ * never the mean of the samples. A hole with no held value is not integrated
11952
+ * as zero. A truncated read is not published.
11953
+ */
11954
+ var STATISTIC_STATS = [
11955
+ "min",
11956
+ "max",
11957
+ "mean",
11958
+ "sum",
11959
+ "count",
11960
+ "change"
11961
+ ];
11962
+ /**
11963
+ * The range a statistics or integral helper asks history for (D944).
11964
+ *
11965
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11966
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11967
+ * is strictly longer than the longest that range can be. Forever qualifies.
11968
+ * Equal to a tier's retention is a refusal, not a short answer.
11969
+ */
11970
+ var MINUTE_MS = 6e4;
11971
+ var HOUR_MS = 60 * MINUTE_MS;
11972
+ var DAY_MS = 24 * HOUR_MS;
11973
+ var ROLLING_SPANS = [
11974
+ "1h",
11975
+ "24h",
11976
+ "2d",
11977
+ "7d",
11978
+ "30d",
11979
+ "custom"
11980
+ ];
11981
+ var CALENDAR_PERIODS = [
11982
+ "today",
11983
+ "yesterday",
11984
+ "this-week",
11985
+ "this-month"
11986
+ ];
11987
+ var RESET_PERIODS = [
11988
+ "never",
11989
+ "daily",
11990
+ "weekly",
11991
+ "monthly"
11992
+ ];
11993
+ 5 * MINUTE_MS;
11994
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11995
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11996
+ var rollingWindowObject = object({
11997
+ kind: literal("rolling"),
11998
+ span: _enum(ROLLING_SPANS),
11999
+ customMinutes: number().int().min(5).optional()
12000
+ }).check((payload) => {
12001
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
12002
+ code: "custom",
12003
+ message: "a custom range needs a duration in minutes",
12004
+ path: ["customMinutes"],
12005
+ input: payload.value
12006
+ });
12007
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
12008
+ code: "custom",
12009
+ message: "only a custom range carries a duration",
12010
+ path: ["customMinutes"],
12011
+ input: payload.value
12012
+ });
12013
+ });
12014
+ var RollingWindowSchema = rollingWindowObject;
12015
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
12016
+ kind: literal("calendar"),
12017
+ period: _enum(CALENDAR_PERIODS)
12018
+ })]);
12019
+ /**
11904
12020
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11905
12021
  * id. Split out so helper schemas can name it without a cycle through
11906
12022
  * `composition.ts` (D659).
@@ -11926,7 +12042,13 @@ var GROUP_TEMPLATE_IDS = [
11926
12042
  "occupancy",
11927
12043
  "binary",
11928
12044
  "switch",
11929
- "light"
12045
+ "light",
12046
+ "fan",
12047
+ "cover",
12048
+ "valve",
12049
+ "lock",
12050
+ "media-player",
12051
+ "climate"
11930
12052
  ];
11931
12053
  var NUMERIC_AGGREGATES = [
11932
12054
  "mean",
@@ -11956,14 +12078,73 @@ var HelperMemberSchema = object({
11956
12078
  cap: string$2().min(1),
11957
12079
  fieldPath: string$2().min(1)
11958
12080
  });
11959
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11960
- kind: literal("group"),
11961
- templateId: GroupTemplateIdSchema,
11962
- aggregate: AggregateReducerSchema,
11963
- members: array(HelperMemberSchema).min(1).max(64),
11964
- /** Actuator groups only. Readings leave this unset. */
11965
- active: ActiveCriterionSchema.optional()
11966
- })]);
12081
+ var HelperSpecSchema = discriminatedUnion("kind", [
12082
+ object({
12083
+ kind: literal("group"),
12084
+ templateId: GroupTemplateIdSchema,
12085
+ aggregate: AggregateReducerSchema,
12086
+ members: array(HelperMemberSchema).min(1).max(64),
12087
+ /** Actuator groups only. Readings leave this unset. */
12088
+ active: ActiveCriterionSchema.optional()
12089
+ }),
12090
+ object({
12091
+ kind: literal("appliance"),
12092
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
12093
+ appliance: _enum(APPLIANCE_KINDS),
12094
+ thresholdWatts: number().positive(),
12095
+ startDwellMs: number().int().nonnegative(),
12096
+ stopDwellMs: number().int().nonnegative(),
12097
+ member: HelperMemberSchema
12098
+ }),
12099
+ object({
12100
+ kind: literal("statistic"),
12101
+ stat: _enum(STATISTIC_STATS),
12102
+ window: StatisticWindowSchema,
12103
+ source: HelperMemberSchema
12104
+ }),
12105
+ object({
12106
+ kind: literal("integral"),
12107
+ reset: _enum(RESET_PERIODS),
12108
+ output: _enum(["energy", "meter"]),
12109
+ source: HelperMemberSchema
12110
+ }),
12111
+ object({
12112
+ kind: literal("threshold"),
12113
+ source: HelperMemberSchema,
12114
+ high: number(),
12115
+ low: number(),
12116
+ onForMs: number().int().nonnegative(),
12117
+ offForMs: number().int().nonnegative()
12118
+ }),
12119
+ object({
12120
+ kind: literal("arithmetic"),
12121
+ op: _enum([
12122
+ "sum",
12123
+ "difference",
12124
+ "ratio"
12125
+ ]),
12126
+ inputs: array(HelperMemberSchema).min(2).max(64)
12127
+ }),
12128
+ object({
12129
+ kind: literal("expression"),
12130
+ expr: string$2().min(1),
12131
+ inputs: array(object({
12132
+ name: string$2().min(1),
12133
+ member: HelperMemberSchema
12134
+ })).min(1).max(64),
12135
+ output: _enum(["number", "boolean"])
12136
+ }),
12137
+ object({
12138
+ kind: literal("derivative"),
12139
+ window: RollingWindowSchema,
12140
+ per: _enum([
12141
+ "second",
12142
+ "minute",
12143
+ "hour"
12144
+ ]),
12145
+ source: HelperMemberSchema
12146
+ })
12147
+ ]);
11967
12148
  /** A composed device's stableId is this prefix plus the block id. */
11968
12149
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11969
12150
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -12024,6 +12205,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12024
12205
  "all"
12025
12206
  ]),
12026
12207
  reads: array(CompositionFieldReadSchema).min(1).max(64),
12208
+ /**
12209
+ * Set when the reads are an enum state, not a yes/no: the listed states
12210
+ * count as active (a cover is `open`). A state outside the list is inactive;
12211
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
12212
+ */
12213
+ activeWhen: array(string$2().min(1)).min(1).optional(),
12027
12214
  /** `value` is the reading; the others are the member counts. */
12028
12215
  publish: _enum([
12029
12216
  "value",
@@ -12037,6 +12224,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12037
12224
  "omit",
12038
12225
  "offline"
12039
12226
  ])
12227
+ }),
12228
+ object({
12229
+ kind: literal("series"),
12230
+ read: CompositionFieldReadSchema,
12231
+ /** `value` is the statistic or the integral. The others are the gap counts. */
12232
+ publish: _enum([
12233
+ "value",
12234
+ "included",
12235
+ "excluded",
12236
+ "total"
12237
+ ]),
12238
+ /**
12239
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
12240
+ * device unseeded until history answers, so a restart cannot publish 0.
12241
+ */
12242
+ empty: _enum([
12243
+ "null",
12244
+ "omit",
12245
+ "offline"
12246
+ ])
12040
12247
  })
12041
12248
  ]);
12042
12249
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17196,7 +17403,22 @@ var BrokerProviderInfoSchema = object({
17196
17403
  */
17197
17404
  interactiveConnectPath: string$2().min(1).optional(),
17198
17405
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17199
- interactiveDisconnectPath: string$2().min(1).optional()
17406
+ interactiveDisconnectPath: string$2().min(1).optional(),
17407
+ /**
17408
+ * The kind signs in through a server-held interactive session instead of
17409
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17410
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17411
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17412
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17413
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17414
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17415
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17416
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17417
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17418
+ * offers it as the default path; the fields the session fills are
17419
+ * marked `filledBySignIn` in the kind's settings schema.
17420
+ */
17421
+ signIn: object({ basePath: string$2().min(1) }).optional()
17200
17422
  }))
17201
17423
  });
17202
17424
  var ListInputSchema = object({
@@ -18350,7 +18572,8 @@ var CompositionProblemSchema = object({
18350
18572
  "native-capability-replace",
18351
18573
  "mixed-quantity",
18352
18574
  "helper-mismatch",
18353
- "member-constraint"
18575
+ "member-constraint",
18576
+ "retention"
18354
18577
  ]),
18355
18578
  path: string$2(),
18356
18579
  message: string$2()
@@ -18584,13 +18807,17 @@ Object.freeze({
18584
18807
  latchedAt: {
18585
18808
  kind: "fixed",
18586
18809
  result: ["number", "null"]
18810
+ },
18811
+ schmitt: {
18812
+ kind: "fixed",
18813
+ result: ["boolean", "null"]
18587
18814
  }
18588
18815
  });
18589
18816
  /**
18590
18817
  * One catalog row per base reading a group helper can build (D944 §3).
18591
18818
  * Data, not a form default written into the block.
18592
18819
  */
18593
- var NOW = {
18820
+ var NOW$2 = {
18594
18821
  fieldPath: "lastFetchedAt",
18595
18822
  expr: "now"
18596
18823
  };
@@ -18604,6 +18831,8 @@ function numeric(input) {
18604
18831
  family: "numeric",
18605
18832
  deviceType: DeviceType.Sensor,
18606
18833
  memberDeviceType: DeviceType.Sensor,
18834
+ memberDeviceTypes: [DeviceType.Sensor],
18835
+ activeWhen: void 0,
18607
18836
  commandCaps: [],
18608
18837
  baseUnit: baseUnitOf(input.quantity),
18609
18838
  aggregates: NUMERIC_AGGREGATES,
@@ -18619,6 +18848,8 @@ function binary(input) {
18619
18848
  family: "binary",
18620
18849
  deviceType: DeviceType.Sensor,
18621
18850
  memberDeviceType: DeviceType.Sensor,
18851
+ memberDeviceTypes: [DeviceType.Sensor],
18852
+ activeWhen: void 0,
18622
18853
  commandCaps: [],
18623
18854
  quantity: "none",
18624
18855
  baseUnit: void 0,
@@ -18636,7 +18867,7 @@ var GROUP_TEMPLATES = [
18636
18867
  quantity: "temperature",
18637
18868
  defaultAggregate: "mean",
18638
18869
  empty: "null",
18639
- companions: [NOW]
18870
+ companions: [NOW$2]
18640
18871
  }),
18641
18872
  numeric({
18642
18873
  id: "humidity",
@@ -18647,7 +18878,7 @@ var GROUP_TEMPLATES = [
18647
18878
  quantity: "humidity",
18648
18879
  defaultAggregate: "mean",
18649
18880
  empty: "null",
18650
- companions: [NOW]
18881
+ companions: [NOW$2]
18651
18882
  }),
18652
18883
  numeric({
18653
18884
  id: "pressure",
@@ -18658,7 +18889,7 @@ var GROUP_TEMPLATES = [
18658
18889
  quantity: "pressure",
18659
18890
  defaultAggregate: "mean",
18660
18891
  empty: "null",
18661
- companions: [NOW]
18892
+ companions: [NOW$2]
18662
18893
  }),
18663
18894
  numeric({
18664
18895
  id: "illuminance",
@@ -18669,7 +18900,7 @@ var GROUP_TEMPLATES = [
18669
18900
  quantity: "illuminance",
18670
18901
  defaultAggregate: "mean",
18671
18902
  empty: "null",
18672
- companions: [NOW]
18903
+ companions: [NOW$2]
18673
18904
  }),
18674
18905
  numeric({
18675
18906
  id: "power",
@@ -18680,7 +18911,7 @@ var GROUP_TEMPLATES = [
18680
18911
  quantity: "power",
18681
18912
  defaultAggregate: "sum",
18682
18913
  empty: "omit",
18683
- companions: [NOW]
18914
+ companions: [NOW$2]
18684
18915
  }),
18685
18916
  numeric({
18686
18917
  id: "energy",
@@ -18691,7 +18922,7 @@ var GROUP_TEMPLATES = [
18691
18922
  quantity: "energy",
18692
18923
  defaultAggregate: "sum",
18693
18924
  empty: "omit",
18694
- companions: [NOW]
18925
+ companions: [NOW$2]
18695
18926
  }),
18696
18927
  numeric({
18697
18928
  id: "battery",
@@ -18726,7 +18957,7 @@ var GROUP_TEMPLATES = [
18726
18957
  quantity: "device",
18727
18958
  defaultAggregate: "mean",
18728
18959
  empty: "null",
18729
- companions: [NOW]
18960
+ companions: [NOW$2]
18730
18961
  }),
18731
18962
  binary({
18732
18963
  id: "motion",
@@ -18820,6 +19051,11 @@ var GROUP_TEMPLATES = [
18820
19051
  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.",
18821
19052
  deviceType: DeviceType.Switch,
18822
19053
  outputCap: "switch",
19054
+ outputField: "on",
19055
+ member: {
19056
+ cap: "switch",
19057
+ fieldPath: "on"
19058
+ },
18823
19059
  commandCaps: ["switch"]
18824
19060
  }),
18825
19061
  actuator({
@@ -18827,34 +19063,136 @@ var GROUP_TEMPLATES = [
18827
19063
  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.",
18828
19064
  deviceType: DeviceType.Light,
18829
19065
  outputCap: "switch",
19066
+ outputField: "on",
19067
+ member: {
19068
+ cap: "switch",
19069
+ fieldPath: "on"
19070
+ },
18830
19071
  commandCaps: [
18831
19072
  "switch",
18832
19073
  "brightness",
18833
19074
  "color"
18834
19075
  ]
19076
+ }),
19077
+ actuator({
19078
+ id: "fan",
19079
+ 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.",
19080
+ deviceType: DeviceType.Fan,
19081
+ outputCap: "switch",
19082
+ outputField: "on",
19083
+ member: {
19084
+ cap: "switch",
19085
+ fieldPath: "on"
19086
+ },
19087
+ commandCaps: ["switch", "fan-control"]
19088
+ }),
19089
+ actuator({
19090
+ id: "cover",
19091
+ 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.",
19092
+ deviceType: DeviceType.Cover,
19093
+ outputCap: "group-active",
19094
+ outputField: "active",
19095
+ member: {
19096
+ cap: "cover",
19097
+ fieldPath: "state"
19098
+ },
19099
+ activeWhen: [
19100
+ "open",
19101
+ "opening",
19102
+ "stopped"
19103
+ ],
19104
+ commandCaps: ["cover"]
19105
+ }),
19106
+ actuator({
19107
+ id: "valve",
19108
+ 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.",
19109
+ deviceType: DeviceType.Valve,
19110
+ outputCap: "group-active",
19111
+ outputField: "active",
19112
+ member: {
19113
+ cap: "valve",
19114
+ fieldPath: "state"
19115
+ },
19116
+ activeWhen: [
19117
+ "open",
19118
+ "opening",
19119
+ "stopped"
19120
+ ],
19121
+ commandCaps: ["valve"]
19122
+ }),
19123
+ actuator({
19124
+ id: "lock",
19125
+ 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.",
19126
+ deviceType: DeviceType.Lock,
19127
+ outputCap: "group-active",
19128
+ outputField: "active",
19129
+ member: {
19130
+ cap: "lock-control",
19131
+ fieldPath: "state"
19132
+ },
19133
+ activeWhen: ["locked"],
19134
+ commandCaps: ["lock-control"]
19135
+ }),
19136
+ actuator({
19137
+ id: "media-player",
19138
+ 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.",
19139
+ deviceType: DeviceType.MediaPlayer,
19140
+ outputCap: "group-active",
19141
+ outputField: "active",
19142
+ member: {
19143
+ cap: "media-player",
19144
+ fieldPath: "state"
19145
+ },
19146
+ activeWhen: ["playing", "buffering"],
19147
+ commandCaps: ["media-player"]
19148
+ }),
19149
+ actuator({
19150
+ id: "climate",
19151
+ 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.",
19152
+ deviceType: DeviceType.Thermostat,
19153
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19154
+ outputCap: "group-active",
19155
+ outputField: "active",
19156
+ member: {
19157
+ cap: "climate-control",
19158
+ fieldPath: "mode"
19159
+ },
19160
+ activeWhen: [
19161
+ "heat",
19162
+ "cool",
19163
+ "auto",
19164
+ "heat_cool",
19165
+ "fan_only",
19166
+ "dry"
19167
+ ],
19168
+ commandCaps: ["climate-control"]
18835
19169
  })
18836
19170
  ];
18837
19171
  function actuator(input) {
18838
19172
  return {
18839
- ...input,
19173
+ id: input.id,
19174
+ summary: input.summary,
19175
+ deviceType: input.deviceType,
19176
+ outputCap: input.outputCap,
19177
+ outputField: input.outputField,
19178
+ commandCaps: input.commandCaps,
18840
19179
  family: "actuator",
18841
19180
  role: void 0,
18842
19181
  memberDeviceType: input.deviceType,
18843
- outputField: "on",
19182
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19183
+ activeWhen: input.activeWhen,
18844
19184
  quantity: "none",
18845
19185
  baseUnit: void 0,
18846
19186
  aggregates: BINARY_AGGREGATES,
18847
19187
  defaultAggregate: "any",
18848
19188
  empty: "offline",
18849
- accept: [{
18850
- cap: "switch",
18851
- fieldPath: "on"
18852
- }],
19189
+ accept: [input.member],
18853
19190
  companions: [CHANGED]
18854
19191
  };
18855
19192
  }
18856
19193
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18857
19194
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19195
+ DeviceType.Camera;
18858
19196
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18859
19197
  /**
18860
19198
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -44078,7 +44416,7 @@ var NetworkAccessStatusSchema = object({
44078
44416
  });
44079
44417
  /**
44080
44418
  * Optional, richer endpoint shape returned by providers that expose
44081
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44419
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44082
44420
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44083
44421
  * the originating provider config (mode + sourcePort) so the
44084
44422
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46765,7 +47103,20 @@ var NcRuleInputSchema = object({
46765
47103
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46766
47104
  * path does not run Zod defaults.
46767
47105
  */
46768
- groupingSec: number().int().min(5).max(60).optional()
47106
+ groupingSec: number().int().min(5).max(60).optional(),
47107
+ /**
47108
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
47109
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
47110
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
47111
+ * same mark the Library writes, and records whose notification it was and
47112
+ * when. A channel with no buttons gets the same two choices as links.
47113
+ *
47114
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
47115
+ * cap path): absent and `false` both mean off, which is what every rule
47116
+ * authored before this field meant. An editor turns it off by writing
47117
+ * `false`, so it needs no `clear` key.
47118
+ */
47119
+ askVerdict: boolean().optional()
46769
47120
  });
46770
47121
  /**
46771
47122
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57485,7 +57836,8 @@ var BATTERY_DEVICE_TYPES = [
57485
57836
  DeviceType.Switch,
57486
57837
  DeviceType.PetFeeder,
57487
57838
  DeviceType.Container,
57488
- DeviceType.Thermostat
57839
+ DeviceType.Thermostat,
57840
+ DeviceType.EventEmitter
57489
57841
  ];
57490
57842
  /** Generic Customize target for the percentage reading (D936). */
57491
57843
  var batteryCustomize = {
@@ -60362,7 +60714,17 @@ var groupCommandsCapability = {
60362
60714
  scope: "device",
60363
60715
  deviceNative: true,
60364
60716
  mode: "singleton",
60365
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60717
+ deviceTypes: [
60718
+ DeviceType.Switch,
60719
+ DeviceType.Light,
60720
+ DeviceType.Fan,
60721
+ DeviceType.Cover,
60722
+ DeviceType.Valve,
60723
+ DeviceType.Lock,
60724
+ DeviceType.MediaPlayer,
60725
+ DeviceType.Thermostat,
60726
+ DeviceType.Climate
60727
+ ],
60366
60728
  methods: {},
60367
60729
  status: {
60368
60730
  schema: GroupCommandsSchema,
@@ -60380,6 +60742,49 @@ var groupCommandsCapability = {
60380
60742
  history: "none"
60381
60743
  };
60382
60744
  /**
60745
+ * Whether a helper actuator group counts as active (D944): at least one
60746
+ * included member is, or every included member is. What "active" means is the
60747
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60748
+ * climate device is not off. A group of lights, switches and fans reports
60749
+ * `switch.on` instead; this cap is for the types whose own state is not a
60750
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60751
+ * empty included set takes the device offline, never `active: false`.
60752
+ */
60753
+ var GroupActiveSchema = object({
60754
+ active: boolean().meta({ label: "Active" }),
60755
+ /** Ms epoch when the slice was last updated. */
60756
+ lastChangedAt: number()
60757
+ });
60758
+ var groupActiveCapability = {
60759
+ name: "group-active",
60760
+ scope: "device",
60761
+ deviceNative: true,
60762
+ mode: "singleton",
60763
+ deviceTypes: [
60764
+ DeviceType.Cover,
60765
+ DeviceType.Valve,
60766
+ DeviceType.Lock,
60767
+ DeviceType.MediaPlayer,
60768
+ DeviceType.Climate,
60769
+ DeviceType.Thermostat
60770
+ ],
60771
+ methods: {},
60772
+ status: {
60773
+ schema: GroupActiveSchema,
60774
+ kind: "push"
60775
+ },
60776
+ runtimeState: GroupActiveSchema,
60777
+ /**
60778
+ * Runtime-state durability: **session** — recomputed from the members on the
60779
+ * next source event; a restored value would outlive the members it named.
60780
+ *
60781
+ * See `RuntimeStateDurability`. Enforced by
60782
+ * `scripts/check-runtime-state-durability.ts`.
60783
+ */
60784
+ durability: "session",
60785
+ history: "none"
60786
+ };
60787
+ /**
60383
60788
  * How many members of a helper group answered (D944). Counts are integers,
60384
60789
  * not measurements: zero included is a real count, never a stand-in reading.
60385
60790
  * The reading itself stays on the output capability. History is none — the
@@ -60410,7 +60815,14 @@ var groupStatusCapability = {
60410
60815
  deviceTypes: [
60411
60816
  DeviceType.Sensor,
60412
60817
  DeviceType.Switch,
60413
- DeviceType.Light
60818
+ DeviceType.Light,
60819
+ DeviceType.Fan,
60820
+ DeviceType.Cover,
60821
+ DeviceType.Valve,
60822
+ DeviceType.Lock,
60823
+ DeviceType.MediaPlayer,
60824
+ DeviceType.Thermostat,
60825
+ DeviceType.Climate
60414
60826
  ],
60415
60827
  methods: {},
60416
60828
  status: {
@@ -61683,7 +62095,14 @@ var lockControlCapability = {
61683
62095
  }),
61684
62096
  unlock: method(object({
61685
62097
  deviceId: number().int().nonnegative(),
61686
- code: string$2().min(1).optional()
62098
+ code: string$2().min(1).optional(),
62099
+ /**
62100
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
62101
+ * with one call is refused unless the caller says it was confirmed. A
62102
+ * single lock ignores it. The refusal lives in the callee, so no
62103
+ * automation or API caller reaches the doors by skipping a dialog.
62104
+ */
62105
+ confirm: boolean().optional()
61687
62106
  }), _void(), {
61688
62107
  kind: "mutation",
61689
62108
  auth: "protected"
@@ -61720,6 +62139,44 @@ var lockControlCapability = {
61720
62139
  volatileStateFields: ["lastChangedAt"]
61721
62140
  };
61722
62141
  /**
62142
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
62143
+ * so dashboards keep one series; every other instantaneous reading lands here.
62144
+ * `value` is the time integral in the source quantity's accumulated base
62145
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
62146
+ */
62147
+ var MeterStatusSchema = object({
62148
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
62149
+ lastFetchedAt: number()
62150
+ });
62151
+ var meterCapability = {
62152
+ name: "meter",
62153
+ scope: "device",
62154
+ deviceNative: true,
62155
+ mode: "singleton",
62156
+ deviceTypes: [DeviceType.Sensor],
62157
+ methods: {},
62158
+ status: {
62159
+ schema: MeterStatusSchema,
62160
+ kind: "push"
62161
+ },
62162
+ runtimeState: MeterStatusSchema,
62163
+ /**
62164
+ * Runtime-state durability: **restored** — the total is a cache of the
62165
+ * history integral. A restart shows it only until the history pass
62166
+ * recomputes the open period; it is not an in-memory buffer.
62167
+ *
62168
+ * See `RuntimeStateDurability`. Enforced by
62169
+ * `scripts/check-runtime-state-durability.ts`.
62170
+ */
62171
+ durability: "restored",
62172
+ history: { fields: { value: {
62173
+ kind: "counter",
62174
+ deadband: .001,
62175
+ minIntervalMs: 6e4
62176
+ } } },
62177
+ volatileStateFields: ["lastFetchedAt"]
62178
+ };
62179
+ /**
61723
62180
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61724
62181
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61725
62182
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64231,9 +64688,9 @@ var PowerMeterStatusSchema = object({
64231
64688
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64232
64689
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64233
64690
  /** Voltage in volts. */
64234
- volts: number().optional().meta(readingMeta("voltage")),
64691
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64235
64692
  /** Current in amperes. */
64236
- amps: number().optional().meta(readingMeta("current")),
64693
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64237
64694
  /** Apparent power in volt-amperes. */
64238
64695
  va: number().optional().meta(readingMeta("apparent-power")),
64239
64696
  /** Power factor (0..1) if reported. */
@@ -64241,12 +64698,74 @@ var PowerMeterStatusSchema = object({
64241
64698
  /** Ms epoch when the slice was last updated. */
64242
64699
  lastFetchedAt: number()
64243
64700
  });
64701
+ /**
64702
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64703
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64704
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64705
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64706
+ * camera and the like are left out: their draw is not what anyone meters.
64707
+ */
64708
+ var POWER_METER_DEVICE_TYPES = [
64709
+ DeviceType.Sensor,
64710
+ DeviceType.Switch,
64711
+ DeviceType.Light,
64712
+ DeviceType.Fan,
64713
+ DeviceType.Climate,
64714
+ DeviceType.Thermostat,
64715
+ DeviceType.Humidifier,
64716
+ DeviceType.WaterHeater,
64717
+ DeviceType.MediaPlayer,
64718
+ DeviceType.Washer,
64719
+ DeviceType.Dryer,
64720
+ DeviceType.Dishwasher,
64721
+ DeviceType.Vacuum,
64722
+ DeviceType.LawnMower,
64723
+ DeviceType.PetFeeder
64724
+ ];
64725
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64726
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64727
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64728
+ function powerTarget(id, unit) {
64729
+ return {
64730
+ id,
64731
+ cardinality: "scalar",
64732
+ vocabulary: {
64733
+ cap: "power-meter",
64734
+ stateField: id
64735
+ },
64736
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64737
+ apply: "add",
64738
+ path: id,
64739
+ sources: [{
64740
+ kind: "numeric",
64741
+ requiredUnit: unit,
64742
+ transforms: [{ kind: "identity" }]
64743
+ }],
64744
+ companions: [{
64745
+ kind: "clock",
64746
+ path: "lastFetchedAt",
64747
+ when: "always"
64748
+ }],
64749
+ sourceReport: { status: "assignment-status" },
64750
+ advancedExpression: true
64751
+ };
64752
+ }
64753
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64754
+ var powerMeterCustomize = {
64755
+ version: 1,
64756
+ targets: [
64757
+ powerTarget("watts", "W"),
64758
+ powerTarget("kwhTotal", "kWh"),
64759
+ powerTarget("volts", "V"),
64760
+ powerTarget("amps", "A")
64761
+ ]
64762
+ };
64244
64763
  var powerMeterCapability = {
64245
64764
  name: "power-meter",
64246
64765
  scope: "device",
64247
64766
  deviceNative: true,
64248
64767
  mode: "singleton",
64249
- deviceTypes: [DeviceType.Sensor],
64768
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64250
64769
  methods: {},
64251
64770
  status: {
64252
64771
  schema: PowerMeterStatusSchema,
@@ -64303,7 +64822,8 @@ var powerMeterCapability = {
64303
64822
  } },
64304
64823
  /** Clock fields: written, but excluded from the compare that decides
64305
64824
  * whether persisting is worth a SQLite commit. */
64306
- volatileStateFields: ["lastFetchedAt"]
64825
+ volatileStateFields: ["lastFetchedAt"],
64826
+ customize: powerMeterCustomize
64307
64827
  };
64308
64828
  /**
64309
64829
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -64984,6 +65504,8 @@ var runningCustomize = {
64984
65504
  stateField: "running"
64985
65505
  },
64986
65506
  deviceTypes: [
65507
+ DeviceType.Washer,
65508
+ DeviceType.Dryer,
64987
65509
  DeviceType.Dishwasher,
64988
65510
  DeviceType.Vacuum,
64989
65511
  DeviceType.LawnMower,
@@ -67473,7 +67995,8 @@ var switchCapability = {
67473
67995
  deviceTypes: [
67474
67996
  DeviceType.Switch,
67475
67997
  DeviceType.Siren,
67476
- DeviceType.Light
67998
+ DeviceType.Light,
67999
+ DeviceType.Fan
67477
68000
  ],
67478
68001
  methods: { setState: method(object({
67479
68002
  deviceId: number(),
@@ -69686,8 +70209,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
69686
70209
  kind: "mutation",
69687
70210
  auth: "admin"
69688
70211
  });
70212
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69689
70213
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
69690
- 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;
70214
+ 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;
69691
70215
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
69692
70216
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
69693
70217
  new Set(CAP_NAMES);
@@ -70016,6 +70540,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70016
70540
  featureProbe: featureProbeCapability,
70017
70541
  flood: floodCapability,
70018
70542
  gas: gasCapability,
70543
+ groupActive: groupActiveCapability,
70019
70544
  groupCommands: groupCommandsCapability,
70020
70545
  groupStatus: groupStatusCapability,
70021
70546
  heatingValve: heatingValveCapability,
@@ -70027,6 +70552,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70027
70552
  lawnMowerControl: lawnMowerControlCapability,
70028
70553
  lockControl: lockControlCapability,
70029
70554
  mediaPlayer: mediaPlayerCapability,
70555
+ meter: meterCapability,
70030
70556
  motion: motionCapability,
70031
70557
  motionTrigger: motionTriggerCapability,
70032
70558
  motionZones: motionZonesCapability,
@@ -71286,7 +71812,7 @@ var BaseDeviceProvider = class extends BaseAddon {
71286
71812
  return toDeviceSummary(device, this.addonId);
71287
71813
  }
71288
71814
  };
71289
- 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;
71815
+ 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;
71290
71816
  new Set(Object.values(DeviceType));
71291
71817
  Object.freeze({
71292
71818
  "accessories.getStatus": {
@@ -74509,6 +75035,13 @@ Object.freeze({
74509
75035
  access: "view",
74510
75036
  role: "viewer"
74511
75037
  },
75038
+ "groupActive.getStatus": {
75039
+ capName: "group-active",
75040
+ capScope: "device",
75041
+ addonId: null,
75042
+ access: "view",
75043
+ role: "viewer"
75044
+ },
74512
75045
  "groupCommands.getStatus": {
74513
75046
  capName: "group-commands",
74514
75047
  capScope: "device",
@@ -75475,6 +76008,13 @@ Object.freeze({
75475
76008
  access: "create",
75476
76009
  role: "admin"
75477
76010
  },
76011
+ "meter.getStatus": {
76012
+ capName: "meter",
76013
+ capScope: "device",
76014
+ addonId: null,
76015
+ access: "view",
76016
+ role: "viewer"
76017
+ },
75478
76018
  "metricsProvider.collectSnapshot": {
75479
76019
  capName: "metrics-provider",
75480
76020
  capScope: "system",
@@ -83573,7 +84113,39 @@ var APPLIANCE_CAP_VOCABULARY = {
83573
84113
  phrase: t("When {device} finishes", "Quando {device} finisce"),
83574
84114
  icon: "square"
83575
84115
  }
83576
- }
84116
+ },
84117
+ overrides: { byType: {
84118
+ [DeviceType.Washer]: {
84119
+ state: { running: {
84120
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
84121
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
84122
+ } },
84123
+ events: {
84124
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
84125
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
84126
+ }
84127
+ },
84128
+ [DeviceType.Dryer]: {
84129
+ state: { running: {
84130
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
84131
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
84132
+ } },
84133
+ events: {
84134
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
84135
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
84136
+ }
84137
+ },
84138
+ [DeviceType.Dishwasher]: {
84139
+ state: { running: {
84140
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
84141
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
84142
+ } },
84143
+ events: {
84144
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
84145
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
84146
+ }
84147
+ }
84148
+ } }
83577
84149
  },
83578
84150
  update: {
83579
84151
  scope: "device",
@@ -84345,6 +84917,10 @@ var SENSOR_CAP_VOCABULARY = {
84345
84917
  icon: "flame"
84346
84918
  }]
84347
84919
  },
84920
+ "group-active": {
84921
+ scope: "device",
84922
+ noun: t("Group state", "Stato del gruppo")
84923
+ },
84348
84924
  "group-commands": {
84349
84925
  scope: "device",
84350
84926
  noun: t("Group command", "Comando di gruppo")
@@ -84401,6 +84977,17 @@ var SENSOR_CAP_VOCABULARY = {
84401
84977
  }],
84402
84978
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
84403
84979
  },
84980
+ meter: {
84981
+ scope: "device",
84982
+ noun: t("Meter", "Contatore"),
84983
+ state: [{
84984
+ kind: "numeric",
84985
+ field: "value",
84986
+ quantity: t("the total", "il totale"),
84987
+ label: t("Total", "Totale"),
84988
+ icon: "gauge"
84989
+ }]
84990
+ },
84404
84991
  "numeric-sensor": {
84405
84992
  scope: "device",
84406
84993
  noun: t("Sensor", "Sensore"),
@@ -84873,8 +85460,47 @@ function projectAction(cap, action) {
84873
85460
  };
84874
85461
  }
84875
85462
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
84876
- 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;
85463
+ 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;
84877
85464
  DeviceFeature.BatteryOperated;
85465
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
85466
+ 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.";
85467
+ 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.";
85468
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
85469
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
85470
+ 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.";
85471
+ function withheld(reason) {
85472
+ return {
85473
+ [DeviceType.Washer]: {
85474
+ exported: false,
85475
+ reason
85476
+ },
85477
+ [DeviceType.Dryer]: {
85478
+ exported: false,
85479
+ reason
85480
+ },
85481
+ [DeviceType.Dishwasher]: {
85482
+ exported: false,
85483
+ reason
85484
+ }
85485
+ };
85486
+ }
85487
+ function offered(received) {
85488
+ return {
85489
+ [DeviceType.Washer]: {
85490
+ exported: true,
85491
+ as: received
85492
+ },
85493
+ [DeviceType.Dryer]: {
85494
+ exported: true,
85495
+ as: received
85496
+ },
85497
+ [DeviceType.Dishwasher]: {
85498
+ exported: true,
85499
+ as: received
85500
+ }
85501
+ };
85502
+ }
85503
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
84878
85504
  Object.freeze({
84879
85505
  "accessories.getStatus": [{
84880
85506
  name: "deviceId",
@@ -85841,6 +86467,11 @@ Object.freeze({
85841
86467
  form: "single",
85842
86468
  optional: false
85843
86469
  }],
86470
+ "groupActive.getStatus": [{
86471
+ name: "deviceId",
86472
+ form: "single",
86473
+ optional: false
86474
+ }],
85844
86475
  "groupCommands.getStatus": [{
85845
86476
  name: "deviceId",
85846
86477
  form: "single",
@@ -86051,6 +86682,11 @@ Object.freeze({
86051
86682
  form: "single",
86052
86683
  optional: false
86053
86684
  }],
86685
+ "meter.getStatus": [{
86686
+ name: "deviceId",
86687
+ form: "single",
86688
+ optional: false
86689
+ }],
86054
86690
  "motion.getStatus": [{
86055
86691
  name: "deviceId",
86056
86692
  form: "single",
@@ -87658,7 +88294,6 @@ Object.freeze({
87658
88294
  "network-access": "ingress",
87659
88295
  "smtp-provider": "email"
87660
88296
  });
87661
- DeviceType.Camera;
87662
88297
  /**
87663
88298
  * A saved Customize assignment (D936). The schema is the type: callers use
87664
88299
  * `z.infer`, they do not restate the shape.