@camstack/addon-provider-homematic 1.2.159 → 1.2.160

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
@@ -5585,7 +5585,7 @@ var ZodIssueCode = {
5585
5585
  var ZodFirstPartyTypeKind;
5586
5586
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5587
5587
  //#endregion
5588
- //#region ../types/dist/sleep-bykKrTgu.mjs
5588
+ //#region ../types/dist/sleep--jXS9hWo.mjs
5589
5589
  /**
5590
5590
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5591
5591
  * window to float samples (D455).
@@ -8966,6 +8966,7 @@ var CAP_NAMES = Object.freeze([
8966
8966
  "filesystem-browse",
8967
8967
  "flood",
8968
8968
  "gas",
8969
+ "group-active",
8969
8970
  "group-commands",
8970
8971
  "group-status",
8971
8972
  "heating-valve",
@@ -8988,6 +8989,7 @@ var CAP_NAMES = Object.freeze([
8988
8989
  "login-method",
8989
8990
  "media-player",
8990
8991
  "mesh-network",
8992
+ "meter",
8991
8993
  "metrics-provider",
8992
8994
  "model-convert",
8993
8995
  "model-distributor",
@@ -9786,6 +9788,10 @@ Object.freeze({
9786
9788
  "path": "detected",
9787
9789
  "valueType": "boolean"
9788
9790
  }],
9791
+ "group-active": [{
9792
+ "path": "active",
9793
+ "valueType": "boolean"
9794
+ }],
9789
9795
  "group-status": [
9790
9796
  {
9791
9797
  "path": "included",
@@ -10045,6 +10051,10 @@ Object.freeze({
10045
10051
  ]
10046
10052
  }
10047
10053
  ],
10054
+ "meter": [{
10055
+ "path": "value",
10056
+ "valueType": "number"
10057
+ }],
10048
10058
  "motion": [
10049
10059
  {
10050
10060
  "path": "detected",
@@ -10788,7 +10798,7 @@ object({
10788
10798
  params: record(string(), union([string(), number()])).optional()
10789
10799
  });
10790
10800
  //#endregion
10791
- //#region ../types/dist/err-msg-BXKzRBwg.mjs
10801
+ //#region ../types/dist/err-msg-DIorGYeC.mjs
10792
10802
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
10793
10803
  DeviceType["Camera"] = "camera";
10794
10804
  DeviceType["Hub"] = "hub";
@@ -10882,8 +10892,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
10882
10892
  DeviceType["PetFeeder"] = "pet-feeder";
10883
10893
  /** Built-in dishwasher — program lifecycle, door / remote-start gates,
10884
10894
  * salt and rinse-aid levels. Installed with the `dishwasher` cap.
10885
- * Sources: native Bosch Home Connect, reusable by similar integrations. */
10895
+ * Sources: native Bosch Home Connect, reusable by similar integrations.
10896
+ * A plug-built dishwasher carries running-state and power instead. */
10886
10897
  DeviceType["Dishwasher"] = "dishwasher";
10898
+ /** Washing machine. A plug-built one is running while its power stays
10899
+ * above a threshold. No program cap — that surface is the dishwasher's. */
10900
+ DeviceType["Washer"] = "washer";
10901
+ /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
10902
+ DeviceType["Dryer"] = "dryer";
10887
10903
  return DeviceType;
10888
10904
  }({});
10889
10905
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -11141,7 +11157,7 @@ function errMsg(err) {
11141
11157
  return String(err);
11142
11158
  }
11143
11159
  //#endregion
11144
- //#region ../types/dist/composition-OhpuespA.mjs
11160
+ //#region ../types/dist/composition-Bb8iwHEJ.mjs
11145
11161
  /**
11146
11162
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11147
11163
  *
@@ -11456,6 +11472,13 @@ var table = {
11456
11472
  apply: () => {
11457
11473
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11458
11474
  }
11475
+ },
11476
+ schmitt: {
11477
+ minArgs: 3,
11478
+ maxArgs: 5,
11479
+ apply: () => {
11480
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11481
+ }
11459
11482
  }
11460
11483
  };
11461
11484
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11897,6 +11920,99 @@ function validateExpressionSource(src) {
11897
11920
  return null;
11898
11921
  }
11899
11922
  /**
11923
+ * One power reading becomes a washer, dryer or dishwasher (D944 helper).
11924
+ *
11925
+ * Standby of the control board is under 5 W; a motor or a heater is far
11926
+ * above that, so 5 W is the line. A door lock or a short pump spike is not
11927
+ * a cycle, so running starts only after 30 s above the line.
11928
+ *
11929
+ * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
11930
+ * bursts) lasts several minutes. Ending the cycle on the first dip would
11931
+ * report "finished" in the middle of the program, so the stop dwell is
11932
+ * 10 minutes on every type. The number is stored per type so one machine
11933
+ * can move later without moving the others.
11934
+ */
11935
+ var APPLIANCE_TEMPLATE_ID = "appliance";
11936
+ var APPLIANCE_KINDS = [
11937
+ "washer",
11938
+ "dryer",
11939
+ "dishwasher"
11940
+ ];
11941
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11942
+ /**
11943
+ * Statistics and integrals over a history read (D944).
11944
+ *
11945
+ * Pure: the same points always give the same answer, so a restart recomputes
11946
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11947
+ * never the mean of the samples. A hole with no held value is not integrated
11948
+ * as zero. A truncated read is not published.
11949
+ */
11950
+ var STATISTIC_STATS = [
11951
+ "min",
11952
+ "max",
11953
+ "mean",
11954
+ "sum",
11955
+ "count",
11956
+ "change"
11957
+ ];
11958
+ /**
11959
+ * The range a statistics or integral helper asks history for (D944).
11960
+ *
11961
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11962
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11963
+ * is strictly longer than the longest that range can be. Forever qualifies.
11964
+ * Equal to a tier's retention is a refusal, not a short answer.
11965
+ */
11966
+ var MINUTE_MS = 6e4;
11967
+ var HOUR_MS = 60 * MINUTE_MS;
11968
+ var DAY_MS = 24 * HOUR_MS;
11969
+ var ROLLING_SPANS = [
11970
+ "1h",
11971
+ "24h",
11972
+ "2d",
11973
+ "7d",
11974
+ "30d",
11975
+ "custom"
11976
+ ];
11977
+ var CALENDAR_PERIODS = [
11978
+ "today",
11979
+ "yesterday",
11980
+ "this-week",
11981
+ "this-month"
11982
+ ];
11983
+ var RESET_PERIODS = [
11984
+ "never",
11985
+ "daily",
11986
+ "weekly",
11987
+ "monthly"
11988
+ ];
11989
+ 5 * MINUTE_MS;
11990
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11991
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11992
+ var rollingWindowObject = object({
11993
+ kind: literal("rolling"),
11994
+ span: _enum(ROLLING_SPANS),
11995
+ customMinutes: number().int().min(5).optional()
11996
+ }).check((payload) => {
11997
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11998
+ code: "custom",
11999
+ message: "a custom range needs a duration in minutes",
12000
+ path: ["customMinutes"],
12001
+ input: payload.value
12002
+ });
12003
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
12004
+ code: "custom",
12005
+ message: "only a custom range carries a duration",
12006
+ path: ["customMinutes"],
12007
+ input: payload.value
12008
+ });
12009
+ });
12010
+ var RollingWindowSchema = rollingWindowObject;
12011
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
12012
+ kind: literal("calendar"),
12013
+ period: _enum(CALENDAR_PERIODS)
12014
+ })]);
12015
+ /**
11900
12016
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11901
12017
  * id. Split out so helper schemas can name it without a cycle through
11902
12018
  * `composition.ts` (D659).
@@ -11922,7 +12038,13 @@ var GROUP_TEMPLATE_IDS = [
11922
12038
  "occupancy",
11923
12039
  "binary",
11924
12040
  "switch",
11925
- "light"
12041
+ "light",
12042
+ "fan",
12043
+ "cover",
12044
+ "valve",
12045
+ "lock",
12046
+ "media-player",
12047
+ "climate"
11926
12048
  ];
11927
12049
  var NUMERIC_AGGREGATES = [
11928
12050
  "mean",
@@ -11952,14 +12074,73 @@ var HelperMemberSchema = object({
11952
12074
  cap: string().min(1),
11953
12075
  fieldPath: string().min(1)
11954
12076
  });
11955
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11956
- kind: literal("group"),
11957
- templateId: GroupTemplateIdSchema,
11958
- aggregate: AggregateReducerSchema,
11959
- members: array(HelperMemberSchema).min(1).max(64),
11960
- /** Actuator groups only. Readings leave this unset. */
11961
- active: ActiveCriterionSchema.optional()
11962
- })]);
12077
+ var HelperSpecSchema = discriminatedUnion("kind", [
12078
+ object({
12079
+ kind: literal("group"),
12080
+ templateId: GroupTemplateIdSchema,
12081
+ aggregate: AggregateReducerSchema,
12082
+ members: array(HelperMemberSchema).min(1).max(64),
12083
+ /** Actuator groups only. Readings leave this unset. */
12084
+ active: ActiveCriterionSchema.optional()
12085
+ }),
12086
+ object({
12087
+ kind: literal("appliance"),
12088
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
12089
+ appliance: _enum(APPLIANCE_KINDS),
12090
+ thresholdWatts: number().positive(),
12091
+ startDwellMs: number().int().nonnegative(),
12092
+ stopDwellMs: number().int().nonnegative(),
12093
+ member: HelperMemberSchema
12094
+ }),
12095
+ object({
12096
+ kind: literal("statistic"),
12097
+ stat: _enum(STATISTIC_STATS),
12098
+ window: StatisticWindowSchema,
12099
+ source: HelperMemberSchema
12100
+ }),
12101
+ object({
12102
+ kind: literal("integral"),
12103
+ reset: _enum(RESET_PERIODS),
12104
+ output: _enum(["energy", "meter"]),
12105
+ source: HelperMemberSchema
12106
+ }),
12107
+ object({
12108
+ kind: literal("threshold"),
12109
+ source: HelperMemberSchema,
12110
+ high: number(),
12111
+ low: number(),
12112
+ onForMs: number().int().nonnegative(),
12113
+ offForMs: number().int().nonnegative()
12114
+ }),
12115
+ object({
12116
+ kind: literal("arithmetic"),
12117
+ op: _enum([
12118
+ "sum",
12119
+ "difference",
12120
+ "ratio"
12121
+ ]),
12122
+ inputs: array(HelperMemberSchema).min(2).max(64)
12123
+ }),
12124
+ object({
12125
+ kind: literal("expression"),
12126
+ expr: string().min(1),
12127
+ inputs: array(object({
12128
+ name: string().min(1),
12129
+ member: HelperMemberSchema
12130
+ })).min(1).max(64),
12131
+ output: _enum(["number", "boolean"])
12132
+ }),
12133
+ object({
12134
+ kind: literal("derivative"),
12135
+ window: RollingWindowSchema,
12136
+ per: _enum([
12137
+ "second",
12138
+ "minute",
12139
+ "hour"
12140
+ ]),
12141
+ source: HelperMemberSchema
12142
+ })
12143
+ ]);
11963
12144
  /** A composed device's stableId is this prefix plus the block id. */
11964
12145
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11965
12146
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -12020,6 +12201,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12020
12201
  "all"
12021
12202
  ]),
12022
12203
  reads: array(CompositionFieldReadSchema).min(1).max(64),
12204
+ /**
12205
+ * Set when the reads are an enum state, not a yes/no: the listed states
12206
+ * count as active (a cover is `open`). A state outside the list is inactive;
12207
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
12208
+ */
12209
+ activeWhen: array(string().min(1)).min(1).optional(),
12023
12210
  /** `value` is the reading; the others are the member counts. */
12024
12211
  publish: _enum([
12025
12212
  "value",
@@ -12033,6 +12220,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12033
12220
  "omit",
12034
12221
  "offline"
12035
12222
  ])
12223
+ }),
12224
+ object({
12225
+ kind: literal("series"),
12226
+ read: CompositionFieldReadSchema,
12227
+ /** `value` is the statistic or the integral. The others are the gap counts. */
12228
+ publish: _enum([
12229
+ "value",
12230
+ "included",
12231
+ "excluded",
12232
+ "total"
12233
+ ]),
12234
+ /**
12235
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
12236
+ * device unseeded until history answers, so a restart cannot publish 0.
12237
+ */
12238
+ empty: _enum([
12239
+ "null",
12240
+ "omit",
12241
+ "offline"
12242
+ ])
12036
12243
  })
12037
12244
  ]);
12038
12245
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -17192,7 +17399,22 @@ var BrokerProviderInfoSchema = object({
17192
17399
  */
17193
17400
  interactiveConnectPath: string().min(1).optional(),
17194
17401
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17195
- interactiveDisconnectPath: string().min(1).optional()
17402
+ interactiveDisconnectPath: string().min(1).optional(),
17403
+ /**
17404
+ * The kind signs in through a server-held interactive session instead of
17405
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17406
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17407
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17408
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17409
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17410
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17411
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17412
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17413
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17414
+ * offers it as the default path; the fields the session fills are
17415
+ * marked `filledBySignIn` in the kind's settings schema.
17416
+ */
17417
+ signIn: object({ basePath: string().min(1) }).optional()
17196
17418
  }))
17197
17419
  });
17198
17420
  var ListInputSchema = object({
@@ -18346,7 +18568,8 @@ var CompositionProblemSchema = object({
18346
18568
  "native-capability-replace",
18347
18569
  "mixed-quantity",
18348
18570
  "helper-mismatch",
18349
- "member-constraint"
18571
+ "member-constraint",
18572
+ "retention"
18350
18573
  ]),
18351
18574
  path: string(),
18352
18575
  message: string()
@@ -18580,13 +18803,17 @@ Object.freeze({
18580
18803
  latchedAt: {
18581
18804
  kind: "fixed",
18582
18805
  result: ["number", "null"]
18806
+ },
18807
+ schmitt: {
18808
+ kind: "fixed",
18809
+ result: ["boolean", "null"]
18583
18810
  }
18584
18811
  });
18585
18812
  /**
18586
18813
  * One catalog row per base reading a group helper can build (D944 §3).
18587
18814
  * Data, not a form default written into the block.
18588
18815
  */
18589
- var NOW = {
18816
+ var NOW$2 = {
18590
18817
  fieldPath: "lastFetchedAt",
18591
18818
  expr: "now"
18592
18819
  };
@@ -18600,6 +18827,8 @@ function numeric(input) {
18600
18827
  family: "numeric",
18601
18828
  deviceType: DeviceType.Sensor,
18602
18829
  memberDeviceType: DeviceType.Sensor,
18830
+ memberDeviceTypes: [DeviceType.Sensor],
18831
+ activeWhen: void 0,
18603
18832
  commandCaps: [],
18604
18833
  baseUnit: baseUnitOf(input.quantity),
18605
18834
  aggregates: NUMERIC_AGGREGATES,
@@ -18615,6 +18844,8 @@ function binary(input) {
18615
18844
  family: "binary",
18616
18845
  deviceType: DeviceType.Sensor,
18617
18846
  memberDeviceType: DeviceType.Sensor,
18847
+ memberDeviceTypes: [DeviceType.Sensor],
18848
+ activeWhen: void 0,
18618
18849
  commandCaps: [],
18619
18850
  quantity: "none",
18620
18851
  baseUnit: void 0,
@@ -18632,7 +18863,7 @@ var GROUP_TEMPLATES = [
18632
18863
  quantity: "temperature",
18633
18864
  defaultAggregate: "mean",
18634
18865
  empty: "null",
18635
- companions: [NOW]
18866
+ companions: [NOW$2]
18636
18867
  }),
18637
18868
  numeric({
18638
18869
  id: "humidity",
@@ -18643,7 +18874,7 @@ var GROUP_TEMPLATES = [
18643
18874
  quantity: "humidity",
18644
18875
  defaultAggregate: "mean",
18645
18876
  empty: "null",
18646
- companions: [NOW]
18877
+ companions: [NOW$2]
18647
18878
  }),
18648
18879
  numeric({
18649
18880
  id: "pressure",
@@ -18654,7 +18885,7 @@ var GROUP_TEMPLATES = [
18654
18885
  quantity: "pressure",
18655
18886
  defaultAggregate: "mean",
18656
18887
  empty: "null",
18657
- companions: [NOW]
18888
+ companions: [NOW$2]
18658
18889
  }),
18659
18890
  numeric({
18660
18891
  id: "illuminance",
@@ -18665,7 +18896,7 @@ var GROUP_TEMPLATES = [
18665
18896
  quantity: "illuminance",
18666
18897
  defaultAggregate: "mean",
18667
18898
  empty: "null",
18668
- companions: [NOW]
18899
+ companions: [NOW$2]
18669
18900
  }),
18670
18901
  numeric({
18671
18902
  id: "power",
@@ -18676,7 +18907,7 @@ var GROUP_TEMPLATES = [
18676
18907
  quantity: "power",
18677
18908
  defaultAggregate: "sum",
18678
18909
  empty: "omit",
18679
- companions: [NOW]
18910
+ companions: [NOW$2]
18680
18911
  }),
18681
18912
  numeric({
18682
18913
  id: "energy",
@@ -18687,7 +18918,7 @@ var GROUP_TEMPLATES = [
18687
18918
  quantity: "energy",
18688
18919
  defaultAggregate: "sum",
18689
18920
  empty: "omit",
18690
- companions: [NOW]
18921
+ companions: [NOW$2]
18691
18922
  }),
18692
18923
  numeric({
18693
18924
  id: "battery",
@@ -18722,7 +18953,7 @@ var GROUP_TEMPLATES = [
18722
18953
  quantity: "device",
18723
18954
  defaultAggregate: "mean",
18724
18955
  empty: "null",
18725
- companions: [NOW]
18956
+ companions: [NOW$2]
18726
18957
  }),
18727
18958
  binary({
18728
18959
  id: "motion",
@@ -18816,6 +19047,11 @@ var GROUP_TEMPLATES = [
18816
19047
  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.",
18817
19048
  deviceType: DeviceType.Switch,
18818
19049
  outputCap: "switch",
19050
+ outputField: "on",
19051
+ member: {
19052
+ cap: "switch",
19053
+ fieldPath: "on"
19054
+ },
18819
19055
  commandCaps: ["switch"]
18820
19056
  }),
18821
19057
  actuator({
@@ -18823,34 +19059,136 @@ var GROUP_TEMPLATES = [
18823
19059
  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.",
18824
19060
  deviceType: DeviceType.Light,
18825
19061
  outputCap: "switch",
19062
+ outputField: "on",
19063
+ member: {
19064
+ cap: "switch",
19065
+ fieldPath: "on"
19066
+ },
18826
19067
  commandCaps: [
18827
19068
  "switch",
18828
19069
  "brightness",
18829
19070
  "color"
18830
19071
  ]
19072
+ }),
19073
+ actuator({
19074
+ id: "fan",
19075
+ 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.",
19076
+ deviceType: DeviceType.Fan,
19077
+ outputCap: "switch",
19078
+ outputField: "on",
19079
+ member: {
19080
+ cap: "switch",
19081
+ fieldPath: "on"
19082
+ },
19083
+ commandCaps: ["switch", "fan-control"]
19084
+ }),
19085
+ actuator({
19086
+ id: "cover",
19087
+ 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.",
19088
+ deviceType: DeviceType.Cover,
19089
+ outputCap: "group-active",
19090
+ outputField: "active",
19091
+ member: {
19092
+ cap: "cover",
19093
+ fieldPath: "state"
19094
+ },
19095
+ activeWhen: [
19096
+ "open",
19097
+ "opening",
19098
+ "stopped"
19099
+ ],
19100
+ commandCaps: ["cover"]
19101
+ }),
19102
+ actuator({
19103
+ id: "valve",
19104
+ 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.",
19105
+ deviceType: DeviceType.Valve,
19106
+ outputCap: "group-active",
19107
+ outputField: "active",
19108
+ member: {
19109
+ cap: "valve",
19110
+ fieldPath: "state"
19111
+ },
19112
+ activeWhen: [
19113
+ "open",
19114
+ "opening",
19115
+ "stopped"
19116
+ ],
19117
+ commandCaps: ["valve"]
19118
+ }),
19119
+ actuator({
19120
+ id: "lock",
19121
+ 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.",
19122
+ deviceType: DeviceType.Lock,
19123
+ outputCap: "group-active",
19124
+ outputField: "active",
19125
+ member: {
19126
+ cap: "lock-control",
19127
+ fieldPath: "state"
19128
+ },
19129
+ activeWhen: ["locked"],
19130
+ commandCaps: ["lock-control"]
19131
+ }),
19132
+ actuator({
19133
+ id: "media-player",
19134
+ 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.",
19135
+ deviceType: DeviceType.MediaPlayer,
19136
+ outputCap: "group-active",
19137
+ outputField: "active",
19138
+ member: {
19139
+ cap: "media-player",
19140
+ fieldPath: "state"
19141
+ },
19142
+ activeWhen: ["playing", "buffering"],
19143
+ commandCaps: ["media-player"]
19144
+ }),
19145
+ actuator({
19146
+ id: "climate",
19147
+ 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.",
19148
+ deviceType: DeviceType.Thermostat,
19149
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19150
+ outputCap: "group-active",
19151
+ outputField: "active",
19152
+ member: {
19153
+ cap: "climate-control",
19154
+ fieldPath: "mode"
19155
+ },
19156
+ activeWhen: [
19157
+ "heat",
19158
+ "cool",
19159
+ "auto",
19160
+ "heat_cool",
19161
+ "fan_only",
19162
+ "dry"
19163
+ ],
19164
+ commandCaps: ["climate-control"]
18831
19165
  })
18832
19166
  ];
18833
19167
  function actuator(input) {
18834
19168
  return {
18835
- ...input,
19169
+ id: input.id,
19170
+ summary: input.summary,
19171
+ deviceType: input.deviceType,
19172
+ outputCap: input.outputCap,
19173
+ outputField: input.outputField,
19174
+ commandCaps: input.commandCaps,
18836
19175
  family: "actuator",
18837
19176
  role: void 0,
18838
19177
  memberDeviceType: input.deviceType,
18839
- outputField: "on",
19178
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19179
+ activeWhen: input.activeWhen,
18840
19180
  quantity: "none",
18841
19181
  baseUnit: void 0,
18842
19182
  aggregates: BINARY_AGGREGATES,
18843
19183
  defaultAggregate: "any",
18844
19184
  empty: "offline",
18845
- accept: [{
18846
- cap: "switch",
18847
- fieldPath: "on"
18848
- }],
19185
+ accept: [input.member],
18849
19186
  companions: [CHANGED]
18850
19187
  };
18851
19188
  }
18852
19189
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18853
19190
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19191
+ DeviceType.Camera;
18854
19192
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18855
19193
  /**
18856
19194
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -44261,7 +44599,7 @@ var NetworkAccessStatusSchema = object({
44261
44599
  });
44262
44600
  /**
44263
44601
  * Optional, richer endpoint shape returned by providers that expose
44264
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44602
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
44265
44603
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
44266
44604
  * the originating provider config (mode + sourcePort) so the
44267
44605
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -46948,7 +47286,20 @@ var NcRuleInputSchema = object({
46948
47286
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46949
47287
  * path does not run Zod defaults.
46950
47288
  */
46951
- groupingSec: number().int().min(5).max(60).optional()
47289
+ groupingSec: number().int().min(5).max(60).optional(),
47290
+ /**
47291
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
47292
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
47293
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
47294
+ * same mark the Library writes, and records whose notification it was and
47295
+ * when. A channel with no buttons gets the same two choices as links.
47296
+ *
47297
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
47298
+ * cap path): absent and `false` both mean off, which is what every rule
47299
+ * authored before this field meant. An editor turns it off by writing
47300
+ * `false`, so it needs no `clear` key.
47301
+ */
47302
+ askVerdict: boolean().optional()
46952
47303
  });
46953
47304
  /**
46954
47305
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -57668,7 +58019,8 @@ var BATTERY_DEVICE_TYPES = [
57668
58019
  DeviceType.Switch,
57669
58020
  DeviceType.PetFeeder,
57670
58021
  DeviceType.Container,
57671
- DeviceType.Thermostat
58022
+ DeviceType.Thermostat,
58023
+ DeviceType.EventEmitter
57672
58024
  ];
57673
58025
  /** Generic Customize target for the percentage reading (D936). */
57674
58026
  var batteryCustomize = {
@@ -60528,7 +60880,17 @@ var groupCommandsCapability = {
60528
60880
  scope: "device",
60529
60881
  deviceNative: true,
60530
60882
  mode: "singleton",
60531
- deviceTypes: [DeviceType.Switch, DeviceType.Light],
60883
+ deviceTypes: [
60884
+ DeviceType.Switch,
60885
+ DeviceType.Light,
60886
+ DeviceType.Fan,
60887
+ DeviceType.Cover,
60888
+ DeviceType.Valve,
60889
+ DeviceType.Lock,
60890
+ DeviceType.MediaPlayer,
60891
+ DeviceType.Thermostat,
60892
+ DeviceType.Climate
60893
+ ],
60532
60894
  methods: {},
60533
60895
  status: {
60534
60896
  schema: GroupCommandsSchema,
@@ -60546,6 +60908,49 @@ var groupCommandsCapability = {
60546
60908
  history: "none"
60547
60909
  };
60548
60910
  /**
60911
+ * Whether a helper actuator group counts as active (D944): at least one
60912
+ * included member is, or every included member is. What "active" means is the
60913
+ * type's: a cover is open, a lock is locked, a media player is playing, a
60914
+ * climate device is not off. A group of lights, switches and fans reports
60915
+ * `switch.on` instead; this cap is for the types whose own state is not a
60916
+ * yes/no. Unknown members are left out (`group-status` counts them) and an
60917
+ * empty included set takes the device offline, never `active: false`.
60918
+ */
60919
+ var GroupActiveSchema = object({
60920
+ active: boolean().meta({ label: "Active" }),
60921
+ /** Ms epoch when the slice was last updated. */
60922
+ lastChangedAt: number()
60923
+ });
60924
+ var groupActiveCapability = {
60925
+ name: "group-active",
60926
+ scope: "device",
60927
+ deviceNative: true,
60928
+ mode: "singleton",
60929
+ deviceTypes: [
60930
+ DeviceType.Cover,
60931
+ DeviceType.Valve,
60932
+ DeviceType.Lock,
60933
+ DeviceType.MediaPlayer,
60934
+ DeviceType.Climate,
60935
+ DeviceType.Thermostat
60936
+ ],
60937
+ methods: {},
60938
+ status: {
60939
+ schema: GroupActiveSchema,
60940
+ kind: "push"
60941
+ },
60942
+ runtimeState: GroupActiveSchema,
60943
+ /**
60944
+ * Runtime-state durability: **session** — recomputed from the members on the
60945
+ * next source event; a restored value would outlive the members it named.
60946
+ *
60947
+ * See `RuntimeStateDurability`. Enforced by
60948
+ * `scripts/check-runtime-state-durability.ts`.
60949
+ */
60950
+ durability: "session",
60951
+ history: "none"
60952
+ };
60953
+ /**
60549
60954
  * How many members of a helper group answered (D944). Counts are integers,
60550
60955
  * not measurements: zero included is a real count, never a stand-in reading.
60551
60956
  * The reading itself stays on the output capability. History is none — the
@@ -60576,7 +60981,14 @@ var groupStatusCapability = {
60576
60981
  deviceTypes: [
60577
60982
  DeviceType.Sensor,
60578
60983
  DeviceType.Switch,
60579
- DeviceType.Light
60984
+ DeviceType.Light,
60985
+ DeviceType.Fan,
60986
+ DeviceType.Cover,
60987
+ DeviceType.Valve,
60988
+ DeviceType.Lock,
60989
+ DeviceType.MediaPlayer,
60990
+ DeviceType.Thermostat,
60991
+ DeviceType.Climate
60580
60992
  ],
60581
60993
  methods: {},
60582
60994
  status: {
@@ -61849,7 +62261,14 @@ var lockControlCapability = {
61849
62261
  }),
61850
62262
  unlock: method(object({
61851
62263
  deviceId: number().int().nonnegative(),
61852
- code: string().min(1).optional()
62264
+ code: string().min(1).optional(),
62265
+ /**
62266
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
62267
+ * with one call is refused unless the caller says it was confirmed. A
62268
+ * single lock ignores it. The refusal lives in the callee, so no
62269
+ * automation or API caller reaches the doors by skipping a dialog.
62270
+ */
62271
+ confirm: boolean().optional()
61853
62272
  }), _void(), {
61854
62273
  kind: "mutation",
61855
62274
  auth: "protected"
@@ -61886,6 +62305,44 @@ var lockControlCapability = {
61886
62305
  volatileStateFields: ["lastChangedAt"]
61887
62306
  };
61888
62307
  /**
62308
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
62309
+ * so dashboards keep one series; every other instantaneous reading lands here.
62310
+ * `value` is the time integral in the source quantity's accumulated base
62311
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
62312
+ */
62313
+ var MeterStatusSchema = object({
62314
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
62315
+ lastFetchedAt: number()
62316
+ });
62317
+ var meterCapability = {
62318
+ name: "meter",
62319
+ scope: "device",
62320
+ deviceNative: true,
62321
+ mode: "singleton",
62322
+ deviceTypes: [DeviceType.Sensor],
62323
+ methods: {},
62324
+ status: {
62325
+ schema: MeterStatusSchema,
62326
+ kind: "push"
62327
+ },
62328
+ runtimeState: MeterStatusSchema,
62329
+ /**
62330
+ * Runtime-state durability: **restored** — the total is a cache of the
62331
+ * history integral. A restart shows it only until the history pass
62332
+ * recomputes the open period; it is not an in-memory buffer.
62333
+ *
62334
+ * See `RuntimeStateDurability`. Enforced by
62335
+ * `scripts/check-runtime-state-durability.ts`.
62336
+ */
62337
+ durability: "restored",
62338
+ history: { fields: { value: {
62339
+ kind: "counter",
62340
+ deadband: .001,
62341
+ minIntervalMs: 6e4
62342
+ } } },
62343
+ volatileStateFields: ["lastFetchedAt"]
62344
+ };
62345
+ /**
61889
62346
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
61890
62347
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
61891
62348
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -64397,9 +64854,9 @@ var PowerMeterStatusSchema = object({
64397
64854
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
64398
64855
  kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
64399
64856
  /** Voltage in volts. */
64400
- volts: number().optional().meta(readingMeta("voltage")),
64857
+ volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
64401
64858
  /** Current in amperes. */
64402
- amps: number().optional().meta(readingMeta("current")),
64859
+ amps: number().optional().meta(readingMeta("current", { label: "Current" })),
64403
64860
  /** Apparent power in volt-amperes. */
64404
64861
  va: number().optional().meta(readingMeta("apparent-power")),
64405
64862
  /** Power factor (0..1) if reported. */
@@ -64407,12 +64864,74 @@ var PowerMeterStatusSchema = object({
64407
64864
  /** Ms epoch when the slice was last updated. */
64408
64865
  lastFetchedAt: number()
64409
64866
  });
64867
+ /**
64868
+ * Loads that draw metered mains power (D951). The reading is a feature of the
64869
+ * device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
64870
+ * vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
64871
+ * meter or a standalone energy monitor IS the device. Cover, lock, valve,
64872
+ * camera and the like are left out: their draw is not what anyone meters.
64873
+ */
64874
+ var POWER_METER_DEVICE_TYPES = [
64875
+ DeviceType.Sensor,
64876
+ DeviceType.Switch,
64877
+ DeviceType.Light,
64878
+ DeviceType.Fan,
64879
+ DeviceType.Climate,
64880
+ DeviceType.Thermostat,
64881
+ DeviceType.Humidifier,
64882
+ DeviceType.WaterHeater,
64883
+ DeviceType.MediaPlayer,
64884
+ DeviceType.Washer,
64885
+ DeviceType.Dryer,
64886
+ DeviceType.Dishwasher,
64887
+ DeviceType.Vacuum,
64888
+ DeviceType.LawnMower,
64889
+ DeviceType.PetFeeder
64890
+ ];
64891
+ /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
64892
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
64893
+ /** One scalar target per reading; each is sourced from a device of its own (D951). */
64894
+ function powerTarget(id, unit) {
64895
+ return {
64896
+ id,
64897
+ cardinality: "scalar",
64898
+ vocabulary: {
64899
+ cap: "power-meter",
64900
+ stateField: id
64901
+ },
64902
+ deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
64903
+ apply: "add",
64904
+ path: id,
64905
+ sources: [{
64906
+ kind: "numeric",
64907
+ requiredUnit: unit,
64908
+ transforms: [{ kind: "identity" }]
64909
+ }],
64910
+ companions: [{
64911
+ kind: "clock",
64912
+ path: "lastFetchedAt",
64913
+ when: "always"
64914
+ }],
64915
+ sourceReport: { status: "assignment-status" },
64916
+ advancedExpression: true
64917
+ };
64918
+ }
64919
+ /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
64920
+ var powerMeterCustomize = {
64921
+ version: 1,
64922
+ targets: [
64923
+ powerTarget("watts", "W"),
64924
+ powerTarget("kwhTotal", "kWh"),
64925
+ powerTarget("volts", "V"),
64926
+ powerTarget("amps", "A")
64927
+ ]
64928
+ };
64410
64929
  var powerMeterCapability = {
64411
64930
  name: "power-meter",
64412
64931
  scope: "device",
64413
64932
  deviceNative: true,
64414
64933
  mode: "singleton",
64415
- deviceTypes: [DeviceType.Sensor],
64934
+ deviceTypes: POWER_METER_DEVICE_TYPES,
64416
64935
  methods: {},
64417
64936
  status: {
64418
64937
  schema: PowerMeterStatusSchema,
@@ -64469,7 +64988,8 @@ var powerMeterCapability = {
64469
64988
  } },
64470
64989
  /** Clock fields: written, but excluded from the compare that decides
64471
64990
  * whether persisting is worth a SQLite commit. */
64472
- volatileStateFields: ["lastFetchedAt"]
64991
+ volatileStateFields: ["lastFetchedAt"],
64992
+ customize: powerMeterCustomize
64473
64993
  };
64474
64994
  /**
64475
64995
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -65150,6 +65670,8 @@ var runningCustomize = {
65150
65670
  stateField: "running"
65151
65671
  },
65152
65672
  deviceTypes: [
65673
+ DeviceType.Washer,
65674
+ DeviceType.Dryer,
65153
65675
  DeviceType.Dishwasher,
65154
65676
  DeviceType.Vacuum,
65155
65677
  DeviceType.LawnMower,
@@ -67639,7 +68161,8 @@ var switchCapability = {
67639
68161
  deviceTypes: [
67640
68162
  DeviceType.Switch,
67641
68163
  DeviceType.Siren,
67642
- DeviceType.Light
68164
+ DeviceType.Light,
68165
+ DeviceType.Fan
67643
68166
  ],
67644
68167
  methods: { setState: method(object({
67645
68168
  deviceId: number(),
@@ -69852,6 +70375,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
69852
70375
  kind: "mutation",
69853
70376
  auth: "admin"
69854
70377
  });
70378
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
69855
70379
  /**
69856
70380
  * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
69857
70381
  * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
@@ -70236,7 +70760,7 @@ function tryConvertUnit(value, from, to) {
70236
70760
  return fromCanonical(toCanonical(value, fromSpec), toSpec);
70237
70761
  }
70238
70762
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
70239
- 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;
70763
+ 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;
70240
70764
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
70241
70765
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
70242
70766
  new Set(CAP_NAMES);
@@ -70565,6 +71089,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70565
71089
  featureProbe: featureProbeCapability,
70566
71090
  flood: floodCapability,
70567
71091
  gas: gasCapability,
71092
+ groupActive: groupActiveCapability,
70568
71093
  groupCommands: groupCommandsCapability,
70569
71094
  groupStatus: groupStatusCapability,
70570
71095
  heatingValve: heatingValveCapability,
@@ -70576,6 +71101,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
70576
71101
  lawnMowerControl: lawnMowerControlCapability,
70577
71102
  lockControl: lockControlCapability,
70578
71103
  mediaPlayer: mediaPlayerCapability,
71104
+ meter: meterCapability,
70579
71105
  motion: motionCapability,
70580
71106
  motionTrigger: motionTriggerCapability,
70581
71107
  motionZones: motionZonesCapability,
@@ -71835,7 +72361,7 @@ var BaseDeviceProvider = class extends BaseAddon {
71835
72361
  return toDeviceSummary(device, this.addonId);
71836
72362
  }
71837
72363
  };
71838
- 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;
72364
+ 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;
71839
72365
  new Set(Object.values(DeviceType));
71840
72366
  Object.freeze({
71841
72367
  "accessories.getStatus": {
@@ -75058,6 +75584,13 @@ Object.freeze({
75058
75584
  access: "view",
75059
75585
  role: "viewer"
75060
75586
  },
75587
+ "groupActive.getStatus": {
75588
+ capName: "group-active",
75589
+ capScope: "device",
75590
+ addonId: null,
75591
+ access: "view",
75592
+ role: "viewer"
75593
+ },
75061
75594
  "groupCommands.getStatus": {
75062
75595
  capName: "group-commands",
75063
75596
  capScope: "device",
@@ -76024,6 +76557,13 @@ Object.freeze({
76024
76557
  access: "create",
76025
76558
  role: "admin"
76026
76559
  },
76560
+ "meter.getStatus": {
76561
+ capName: "meter",
76562
+ capScope: "device",
76563
+ addonId: null,
76564
+ access: "view",
76565
+ role: "viewer"
76566
+ },
76027
76567
  "metricsProvider.collectSnapshot": {
76028
76568
  capName: "metrics-provider",
76029
76569
  capScope: "system",
@@ -84122,7 +84662,39 @@ var APPLIANCE_CAP_VOCABULARY = {
84122
84662
  phrase: t("When {device} finishes", "Quando {device} finisce"),
84123
84663
  icon: "square"
84124
84664
  }
84125
- }
84665
+ },
84666
+ overrides: { byType: {
84667
+ [DeviceType.Washer]: {
84668
+ state: { running: {
84669
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
84670
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
84671
+ } },
84672
+ events: {
84673
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
84674
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
84675
+ }
84676
+ },
84677
+ [DeviceType.Dryer]: {
84678
+ state: { running: {
84679
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
84680
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
84681
+ } },
84682
+ events: {
84683
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
84684
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
84685
+ }
84686
+ },
84687
+ [DeviceType.Dishwasher]: {
84688
+ state: { running: {
84689
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
84690
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
84691
+ } },
84692
+ events: {
84693
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
84694
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
84695
+ }
84696
+ }
84697
+ } }
84126
84698
  },
84127
84699
  update: {
84128
84700
  scope: "device",
@@ -84894,6 +85466,10 @@ var SENSOR_CAP_VOCABULARY = {
84894
85466
  icon: "flame"
84895
85467
  }]
84896
85468
  },
85469
+ "group-active": {
85470
+ scope: "device",
85471
+ noun: t("Group state", "Stato del gruppo")
85472
+ },
84897
85473
  "group-commands": {
84898
85474
  scope: "device",
84899
85475
  noun: t("Group command", "Comando di gruppo")
@@ -84950,6 +85526,17 @@ var SENSOR_CAP_VOCABULARY = {
84950
85526
  }],
84951
85527
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
84952
85528
  },
85529
+ meter: {
85530
+ scope: "device",
85531
+ noun: t("Meter", "Contatore"),
85532
+ state: [{
85533
+ kind: "numeric",
85534
+ field: "value",
85535
+ quantity: t("the total", "il totale"),
85536
+ label: t("Total", "Totale"),
85537
+ icon: "gauge"
85538
+ }]
85539
+ },
84953
85540
  "numeric-sensor": {
84954
85541
  scope: "device",
84955
85542
  noun: t("Sensor", "Sensore"),
@@ -85422,8 +86009,47 @@ function projectAction(cap, action) {
85422
86009
  };
85423
86010
  }
85424
86011
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
85425
- 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;
86012
+ 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;
85426
86013
  DeviceFeature.BatteryOperated;
86014
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
86015
+ 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.";
86016
+ 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.";
86017
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
86018
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
86019
+ 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.";
86020
+ function withheld(reason) {
86021
+ return {
86022
+ [DeviceType.Washer]: {
86023
+ exported: false,
86024
+ reason
86025
+ },
86026
+ [DeviceType.Dryer]: {
86027
+ exported: false,
86028
+ reason
86029
+ },
86030
+ [DeviceType.Dishwasher]: {
86031
+ exported: false,
86032
+ reason
86033
+ }
86034
+ };
86035
+ }
86036
+ function offered(received) {
86037
+ return {
86038
+ [DeviceType.Washer]: {
86039
+ exported: true,
86040
+ as: received
86041
+ },
86042
+ [DeviceType.Dryer]: {
86043
+ exported: true,
86044
+ as: received
86045
+ },
86046
+ [DeviceType.Dishwasher]: {
86047
+ exported: true,
86048
+ as: received
86049
+ }
86050
+ };
86051
+ }
86052
+ offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
85427
86053
  Object.freeze({
85428
86054
  "accessories.getStatus": [{
85429
86055
  name: "deviceId",
@@ -86390,6 +87016,11 @@ Object.freeze({
86390
87016
  form: "single",
86391
87017
  optional: false
86392
87018
  }],
87019
+ "groupActive.getStatus": [{
87020
+ name: "deviceId",
87021
+ form: "single",
87022
+ optional: false
87023
+ }],
86393
87024
  "groupCommands.getStatus": [{
86394
87025
  name: "deviceId",
86395
87026
  form: "single",
@@ -86600,6 +87231,11 @@ Object.freeze({
86600
87231
  form: "single",
86601
87232
  optional: false
86602
87233
  }],
87234
+ "meter.getStatus": [{
87235
+ name: "deviceId",
87236
+ form: "single",
87237
+ optional: false
87238
+ }],
86603
87239
  "motion.getStatus": [{
86604
87240
  name: "deviceId",
86605
87241
  form: "single",
@@ -88207,7 +88843,6 @@ Object.freeze({
88207
88843
  "network-access": "ingress",
88208
88844
  "smtp-provider": "email"
88209
88845
  });
88210
- DeviceType.Camera;
88211
88846
  /**
88212
88847
  * A saved Customize assignment (D936). The schema is the type: callers use
88213
88848
  * `z.infer`, they do not restate the shape.