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