@camstack/addon-matter-broker 0.2.127 → 0.2.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -5552,7 +5552,7 @@ var ZodIssueCode = {
5552
5552
  var ZodFirstPartyTypeKind;
5553
5553
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5554
5554
  //#endregion
5555
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5555
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5556
5556
  /**
5557
5557
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5558
5558
  * window to float samples (D455).
@@ -8771,7 +8771,7 @@ object({
8771
8771
  params: record(string$2(), union([string$2(), number()])).optional()
8772
8772
  });
8773
8773
  //#endregion
8774
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8774
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8775
8775
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8776
8776
  DeviceType["Camera"] = "camera";
8777
8777
  DeviceType["Hub"] = "hub";
@@ -8863,6 +8863,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8863
8863
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8864
8864
  * integrations sharing the same food/desiccant/hopper surface. */
8865
8865
  DeviceType["PetFeeder"] = "pet-feeder";
8866
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8867
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8868
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8869
+ DeviceType["Dishwasher"] = "dishwasher";
8866
8870
  return DeviceType;
8867
8871
  }({});
8868
8872
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -9120,7 +9124,7 @@ function errMsg(err) {
9120
9124
  return String(err);
9121
9125
  }
9122
9126
  //#endregion
9123
- //#region ../types/dist/composition-DOwQB_Ua.mjs
9127
+ //#region ../types/dist/composition-CB6PMT9p.mjs
9124
9128
  /**
9125
9129
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9126
9130
  *
@@ -13506,8 +13510,13 @@ var AlertSeveritySchema = _enum([
13506
13510
  "info",
13507
13511
  "success",
13508
13512
  "warning",
13509
- "error"
13513
+ "error",
13514
+ "critical"
13510
13515
  ]);
13516
+ var AlertActionSchema = object({
13517
+ label: string$2(),
13518
+ href: string$2().optional()
13519
+ });
13511
13520
  var AlertStatusSchema = _enum([
13512
13521
  "active",
13513
13522
  "in-progress",
@@ -13525,6 +13534,7 @@ var AlertSchema = object({
13525
13534
  severity: AlertSeveritySchema,
13526
13535
  title: string$2(),
13527
13536
  message: string$2(),
13537
+ action: AlertActionSchema.optional(),
13528
13538
  status: AlertStatusSchema,
13529
13539
  progress: number().optional(),
13530
13540
  read: boolean(),
@@ -54132,7 +54142,8 @@ var batteryCapability = {
54132
54142
  DeviceType.Button,
54133
54143
  DeviceType.Switch,
54134
54144
  DeviceType.PetFeeder,
54135
- DeviceType.Container
54145
+ DeviceType.Container,
54146
+ DeviceType.Thermostat
54136
54147
  ],
54137
54148
  methods: {
54138
54149
  /**
@@ -55622,6 +55633,125 @@ onStatusChanged: { data: object({
55622
55633
  * whether persisting is worth a SQLite commit. */
55623
55634
  volatileStateFields: ["lastChangedAt"]
55624
55635
  };
55636
+ /**
55637
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55638
+ * consumable levels (salt, rinse aid) and common program options.
55639
+ *
55640
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55641
+ * by any integration that exposes the same program / option surface.
55642
+ *
55643
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55644
+ * provider refreshes the slice on an interval and eagerly after commands.
55645
+ */
55646
+ var DishwasherStateSchema = _enum([
55647
+ "idle",
55648
+ "running",
55649
+ "paused",
55650
+ "finished",
55651
+ "error",
55652
+ "unavailable"
55653
+ ]);
55654
+ var DishwasherConsumableLevelSchema = _enum([
55655
+ "ok",
55656
+ "low",
55657
+ "empty"
55658
+ ]);
55659
+ var DishwasherStatusSchema = object({
55660
+ state: DishwasherStateSchema,
55661
+ /** Active program id/name, or null when none selected / unknown. */
55662
+ program: string$2().nullable(),
55663
+ /** Program tokens the hardware accepts — drives the UI selector. */
55664
+ availablePrograms: array(string$2()),
55665
+ /** Minutes remaining on the active cycle, or null when not running. */
55666
+ remainingMinutes: number().int().nonnegative().nullable(),
55667
+ /** Cycle completion 0..100, or null when not applicable. */
55668
+ progressPercent: number().min(0).max(100).nullable(),
55669
+ /** True when the door is reported open. */
55670
+ doorOpen: boolean(),
55671
+ /** True when remote start is allowed (door closed, power on, etc.). */
55672
+ remoteStartAllowed: boolean(),
55673
+ /** Main power / switched-on state. */
55674
+ powerOn: boolean(),
55675
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55676
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55677
+ halfLoad: boolean(),
55678
+ hygienePlus: boolean(),
55679
+ errorCode: number().nullable(),
55680
+ errorLabel: string$2().nullable(),
55681
+ lastFetchedAt: number()
55682
+ });
55683
+ var dishwasherCapability = {
55684
+ name: "dishwasher",
55685
+ scope: "device",
55686
+ deviceNative: true,
55687
+ mode: "singleton",
55688
+ deviceTypes: [DeviceType.Dishwasher],
55689
+ methods: {
55690
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55691
+ kind: "mutation",
55692
+ auth: "protected"
55693
+ }),
55694
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55695
+ kind: "mutation",
55696
+ auth: "protected"
55697
+ }),
55698
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55699
+ kind: "mutation",
55700
+ auth: "protected"
55701
+ }),
55702
+ setProgram: method(object({
55703
+ deviceId: number().int().nonnegative(),
55704
+ program: string$2().min(1)
55705
+ }), _void(), {
55706
+ kind: "mutation",
55707
+ auth: "protected"
55708
+ }),
55709
+ setPower: method(object({
55710
+ deviceId: number().int().nonnegative(),
55711
+ on: boolean()
55712
+ }), _void(), {
55713
+ kind: "mutation",
55714
+ auth: "protected"
55715
+ }),
55716
+ setHalfLoad: method(object({
55717
+ deviceId: number().int().nonnegative(),
55718
+ on: boolean()
55719
+ }), _void(), {
55720
+ kind: "mutation",
55721
+ auth: "protected"
55722
+ }),
55723
+ setHygienePlus: method(object({
55724
+ deviceId: number().int().nonnegative(),
55725
+ on: boolean()
55726
+ }), _void(), {
55727
+ kind: "mutation",
55728
+ auth: "protected"
55729
+ }),
55730
+ setOption: method(object({
55731
+ deviceId: number().int().nonnegative(),
55732
+ key: string$2().min(1),
55733
+ value: union([
55734
+ boolean(),
55735
+ string$2(),
55736
+ number()
55737
+ ])
55738
+ }), _void(), {
55739
+ kind: "mutation",
55740
+ auth: "protected"
55741
+ })
55742
+ },
55743
+ status: {
55744
+ schema: DishwasherStatusSchema,
55745
+ kind: "poll"
55746
+ },
55747
+ runtimeState: DishwasherStatusSchema,
55748
+ durability: "session",
55749
+ history: { fields: { progressPercent: {
55750
+ kind: "gauge",
55751
+ unit: "%",
55752
+ deadband: 2
55753
+ } } }
55754
+ };
55625
55755
  var DoorbellStatusSchema = object({
55626
55756
  /** Ms epoch of the last press. null = never observed since this provider started. */
55627
55757
  lastPressedAt: number().nullable(),
@@ -56424,6 +56554,32 @@ var gasCapability = {
56424
56554
  * whether persisting is worth a SQLite commit. */
56425
56555
  volatileStateFields: ["lastChangedAt"]
56426
56556
  };
56557
+ var HeatingValveStatusSchema = object({
56558
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56559
+ position: number().min(0).max(100).nullable(),
56560
+ /** Ms epoch when the slice was last updated (push or poll). */
56561
+ lastFetchedAt: number()
56562
+ });
56563
+ var heatingValveCapability = {
56564
+ name: "heating-valve",
56565
+ scope: "device",
56566
+ deviceNative: true,
56567
+ mode: "singleton",
56568
+ deviceTypes: [DeviceType.Thermostat],
56569
+ methods: {},
56570
+ status: {
56571
+ schema: HeatingValveStatusSchema,
56572
+ kind: "push"
56573
+ },
56574
+ runtimeState: HeatingValveStatusSchema,
56575
+ durability: "session",
56576
+ history: { fields: { position: {
56577
+ kind: "gauge",
56578
+ unit: "%",
56579
+ deadband: 1
56580
+ } } },
56581
+ volatileStateFields: ["lastFetchedAt"]
56582
+ };
56427
56583
  /**
56428
56584
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56429
56585
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -65844,6 +66000,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65844
66000
  dayNight: dayNightCapability,
65845
66001
  deviceDiscovery: deviceDiscoveryCapability,
65846
66002
  deviceStatus: deviceStatusCapability,
66003
+ dishwasher: dishwasherCapability,
65847
66004
  doorbell: doorbellCapability,
65848
66005
  enumSensor: enumSensorCapability,
65849
66006
  eventEmitter: eventEmitterCapability,
@@ -65851,6 +66008,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65851
66008
  featureProbe: featureProbeCapability,
65852
66009
  flood: floodCapability,
65853
66010
  gas: gasCapability,
66011
+ heatingValve: heatingValveCapability,
65854
66012
  humidifier: humidifierCapability,
65855
66013
  humiditySensor: humiditySensorCapability,
65856
66014
  image: imageCapability,
@@ -66576,6 +66734,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66576
66734
  provider: this
66577
66735
  }];
66578
66736
  }
66737
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66738
+ providerRegistrationsFromSuper(result) {
66739
+ if (Array.isArray(result)) return result;
66740
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66741
+ return [];
66742
+ }
66579
66743
  async onShutdown() {
66580
66744
  this._restoreShuttingDown = true;
66581
66745
  this.cancelRestoreRetries();
@@ -67102,7 +67266,7 @@ var BaseDeviceProvider = class extends BaseAddon {
67102
67266
  return toDeviceSummary(device, this.addonId);
67103
67267
  }
67104
67268
  };
67105
- 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;
67269
+ 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;
67106
67270
  new Set(Object.values(DeviceType));
67107
67271
  Object.freeze({
67108
67272
  "accessories.getStatus": {
@@ -69523,6 +69687,60 @@ Object.freeze({
69523
69687
  addonId: null,
69524
69688
  access: "view"
69525
69689
  },
69690
+ "dishwasher.getStatus": {
69691
+ capName: "dishwasher",
69692
+ capScope: "device",
69693
+ addonId: null,
69694
+ access: "view"
69695
+ },
69696
+ "dishwasher.pause": {
69697
+ capName: "dishwasher",
69698
+ capScope: "device",
69699
+ addonId: null,
69700
+ access: "create"
69701
+ },
69702
+ "dishwasher.setHalfLoad": {
69703
+ capName: "dishwasher",
69704
+ capScope: "device",
69705
+ addonId: null,
69706
+ access: "create"
69707
+ },
69708
+ "dishwasher.setHygienePlus": {
69709
+ capName: "dishwasher",
69710
+ capScope: "device",
69711
+ addonId: null,
69712
+ access: "create"
69713
+ },
69714
+ "dishwasher.setOption": {
69715
+ capName: "dishwasher",
69716
+ capScope: "device",
69717
+ addonId: null,
69718
+ access: "create"
69719
+ },
69720
+ "dishwasher.setPower": {
69721
+ capName: "dishwasher",
69722
+ capScope: "device",
69723
+ addonId: null,
69724
+ access: "create"
69725
+ },
69726
+ "dishwasher.setProgram": {
69727
+ capName: "dishwasher",
69728
+ capScope: "device",
69729
+ addonId: null,
69730
+ access: "create"
69731
+ },
69732
+ "dishwasher.start": {
69733
+ capName: "dishwasher",
69734
+ capScope: "device",
69735
+ addonId: null,
69736
+ access: "create"
69737
+ },
69738
+ "dishwasher.stop": {
69739
+ capName: "dishwasher",
69740
+ capScope: "device",
69741
+ addonId: null,
69742
+ access: "create"
69743
+ },
69526
69744
  "doorbell.getStatus": {
69527
69745
  capName: "doorbell",
69528
69746
  capScope: "device",
@@ -69733,6 +69951,12 @@ Object.freeze({
69733
69951
  addonId: null,
69734
69952
  access: "view"
69735
69953
  },
69954
+ "heatingValve.getStatus": {
69955
+ capName: "heating-valve",
69956
+ capScope: "device",
69957
+ addonId: null,
69958
+ access: "view"
69959
+ },
69736
69960
  "humidifier.getStatus": {
69737
69961
  capName: "humidifier",
69738
69962
  capScope: "device",
@@ -75320,7 +75544,7 @@ Object.freeze({
75320
75544
  access: "create"
75321
75545
  }
75322
75546
  });
75323
- 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;
75547
+ 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;
75324
75548
  DeviceFeature.BatteryOperated;
75325
75549
  Object.freeze({
75326
75550
  "accessories.getStatus": [{
@@ -76144,6 +76368,51 @@ Object.freeze({
76144
76368
  form: "single",
76145
76369
  optional: false
76146
76370
  }],
76371
+ "dishwasher.getStatus": [{
76372
+ name: "deviceId",
76373
+ form: "single",
76374
+ optional: false
76375
+ }],
76376
+ "dishwasher.pause": [{
76377
+ name: "deviceId",
76378
+ form: "single",
76379
+ optional: false
76380
+ }],
76381
+ "dishwasher.setHalfLoad": [{
76382
+ name: "deviceId",
76383
+ form: "single",
76384
+ optional: false
76385
+ }],
76386
+ "dishwasher.setHygienePlus": [{
76387
+ name: "deviceId",
76388
+ form: "single",
76389
+ optional: false
76390
+ }],
76391
+ "dishwasher.setOption": [{
76392
+ name: "deviceId",
76393
+ form: "single",
76394
+ optional: false
76395
+ }],
76396
+ "dishwasher.setPower": [{
76397
+ name: "deviceId",
76398
+ form: "single",
76399
+ optional: false
76400
+ }],
76401
+ "dishwasher.setProgram": [{
76402
+ name: "deviceId",
76403
+ form: "single",
76404
+ optional: false
76405
+ }],
76406
+ "dishwasher.start": [{
76407
+ name: "deviceId",
76408
+ form: "single",
76409
+ optional: false
76410
+ }],
76411
+ "dishwasher.stop": [{
76412
+ name: "deviceId",
76413
+ form: "single",
76414
+ optional: false
76415
+ }],
76147
76416
  "doorbell.getStatus": [{
76148
76417
  name: "deviceId",
76149
76418
  form: "single",
@@ -76213,6 +76482,11 @@ Object.freeze({
76213
76482
  form: "single",
76214
76483
  optional: false
76215
76484
  }],
76485
+ "heatingValve.getStatus": [{
76486
+ name: "deviceId",
76487
+ form: "single",
76488
+ optional: false
76489
+ }],
76216
76490
  "humidifier.getStatus": [{
76217
76491
  name: "deviceId",
76218
76492
  form: "single",
@@ -190137,7 +190411,7 @@ var MatterBrokerAddon = class extends BaseDeviceProvider {
190137
190411
  super({ ...DEFAULTS });
190138
190412
  }
190139
190413
  async onInitialize() {
190140
- const regs = await super.onInitialize();
190414
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
190141
190415
  const records = this.ctx.records;
190142
190416
  if (records === void 0) throw new Error("matter-broker: ctx.records is required (hub-only addon)");
190143
190417
  await records.declare({ brokers: matterBrokersEntryKind });
package/dist/addon.mjs CHANGED
@@ -5550,7 +5550,7 @@ var ZodIssueCode = {
5550
5550
  var ZodFirstPartyTypeKind;
5551
5551
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5552
5552
  //#endregion
5553
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5553
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5554
5554
  /**
5555
5555
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5556
5556
  * window to float samples (D455).
@@ -8769,7 +8769,7 @@ object({
8769
8769
  params: record(string$2(), union([string$2(), number()])).optional()
8770
8770
  });
8771
8771
  //#endregion
8772
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8772
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8773
8773
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8774
8774
  DeviceType["Camera"] = "camera";
8775
8775
  DeviceType["Hub"] = "hub";
@@ -8861,6 +8861,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8861
8861
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8862
8862
  * integrations sharing the same food/desiccant/hopper surface. */
8863
8863
  DeviceType["PetFeeder"] = "pet-feeder";
8864
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8865
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8866
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8867
+ DeviceType["Dishwasher"] = "dishwasher";
8864
8868
  return DeviceType;
8865
8869
  }({});
8866
8870
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -9118,7 +9122,7 @@ function errMsg(err) {
9118
9122
  return String(err);
9119
9123
  }
9120
9124
  //#endregion
9121
- //#region ../types/dist/composition-DOwQB_Ua.mjs
9125
+ //#region ../types/dist/composition-CB6PMT9p.mjs
9122
9126
  /**
9123
9127
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9124
9128
  *
@@ -13504,8 +13508,13 @@ var AlertSeveritySchema = _enum([
13504
13508
  "info",
13505
13509
  "success",
13506
13510
  "warning",
13507
- "error"
13511
+ "error",
13512
+ "critical"
13508
13513
  ]);
13514
+ var AlertActionSchema = object({
13515
+ label: string$2(),
13516
+ href: string$2().optional()
13517
+ });
13509
13518
  var AlertStatusSchema = _enum([
13510
13519
  "active",
13511
13520
  "in-progress",
@@ -13523,6 +13532,7 @@ var AlertSchema = object({
13523
13532
  severity: AlertSeveritySchema,
13524
13533
  title: string$2(),
13525
13534
  message: string$2(),
13535
+ action: AlertActionSchema.optional(),
13526
13536
  status: AlertStatusSchema,
13527
13537
  progress: number().optional(),
13528
13538
  read: boolean(),
@@ -54130,7 +54140,8 @@ var batteryCapability = {
54130
54140
  DeviceType.Button,
54131
54141
  DeviceType.Switch,
54132
54142
  DeviceType.PetFeeder,
54133
- DeviceType.Container
54143
+ DeviceType.Container,
54144
+ DeviceType.Thermostat
54134
54145
  ],
54135
54146
  methods: {
54136
54147
  /**
@@ -55620,6 +55631,125 @@ onStatusChanged: { data: object({
55620
55631
  * whether persisting is worth a SQLite commit. */
55621
55632
  volatileStateFields: ["lastChangedAt"]
55622
55633
  };
55634
+ /**
55635
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55636
+ * consumable levels (salt, rinse aid) and common program options.
55637
+ *
55638
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55639
+ * by any integration that exposes the same program / option surface.
55640
+ *
55641
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55642
+ * provider refreshes the slice on an interval and eagerly after commands.
55643
+ */
55644
+ var DishwasherStateSchema = _enum([
55645
+ "idle",
55646
+ "running",
55647
+ "paused",
55648
+ "finished",
55649
+ "error",
55650
+ "unavailable"
55651
+ ]);
55652
+ var DishwasherConsumableLevelSchema = _enum([
55653
+ "ok",
55654
+ "low",
55655
+ "empty"
55656
+ ]);
55657
+ var DishwasherStatusSchema = object({
55658
+ state: DishwasherStateSchema,
55659
+ /** Active program id/name, or null when none selected / unknown. */
55660
+ program: string$2().nullable(),
55661
+ /** Program tokens the hardware accepts — drives the UI selector. */
55662
+ availablePrograms: array(string$2()),
55663
+ /** Minutes remaining on the active cycle, or null when not running. */
55664
+ remainingMinutes: number().int().nonnegative().nullable(),
55665
+ /** Cycle completion 0..100, or null when not applicable. */
55666
+ progressPercent: number().min(0).max(100).nullable(),
55667
+ /** True when the door is reported open. */
55668
+ doorOpen: boolean(),
55669
+ /** True when remote start is allowed (door closed, power on, etc.). */
55670
+ remoteStartAllowed: boolean(),
55671
+ /** Main power / switched-on state. */
55672
+ powerOn: boolean(),
55673
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55674
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55675
+ halfLoad: boolean(),
55676
+ hygienePlus: boolean(),
55677
+ errorCode: number().nullable(),
55678
+ errorLabel: string$2().nullable(),
55679
+ lastFetchedAt: number()
55680
+ });
55681
+ var dishwasherCapability = {
55682
+ name: "dishwasher",
55683
+ scope: "device",
55684
+ deviceNative: true,
55685
+ mode: "singleton",
55686
+ deviceTypes: [DeviceType.Dishwasher],
55687
+ methods: {
55688
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55689
+ kind: "mutation",
55690
+ auth: "protected"
55691
+ }),
55692
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55693
+ kind: "mutation",
55694
+ auth: "protected"
55695
+ }),
55696
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55697
+ kind: "mutation",
55698
+ auth: "protected"
55699
+ }),
55700
+ setProgram: method(object({
55701
+ deviceId: number().int().nonnegative(),
55702
+ program: string$2().min(1)
55703
+ }), _void(), {
55704
+ kind: "mutation",
55705
+ auth: "protected"
55706
+ }),
55707
+ setPower: method(object({
55708
+ deviceId: number().int().nonnegative(),
55709
+ on: boolean()
55710
+ }), _void(), {
55711
+ kind: "mutation",
55712
+ auth: "protected"
55713
+ }),
55714
+ setHalfLoad: method(object({
55715
+ deviceId: number().int().nonnegative(),
55716
+ on: boolean()
55717
+ }), _void(), {
55718
+ kind: "mutation",
55719
+ auth: "protected"
55720
+ }),
55721
+ setHygienePlus: method(object({
55722
+ deviceId: number().int().nonnegative(),
55723
+ on: boolean()
55724
+ }), _void(), {
55725
+ kind: "mutation",
55726
+ auth: "protected"
55727
+ }),
55728
+ setOption: method(object({
55729
+ deviceId: number().int().nonnegative(),
55730
+ key: string$2().min(1),
55731
+ value: union([
55732
+ boolean(),
55733
+ string$2(),
55734
+ number()
55735
+ ])
55736
+ }), _void(), {
55737
+ kind: "mutation",
55738
+ auth: "protected"
55739
+ })
55740
+ },
55741
+ status: {
55742
+ schema: DishwasherStatusSchema,
55743
+ kind: "poll"
55744
+ },
55745
+ runtimeState: DishwasherStatusSchema,
55746
+ durability: "session",
55747
+ history: { fields: { progressPercent: {
55748
+ kind: "gauge",
55749
+ unit: "%",
55750
+ deadband: 2
55751
+ } } }
55752
+ };
55623
55753
  var DoorbellStatusSchema = object({
55624
55754
  /** Ms epoch of the last press. null = never observed since this provider started. */
55625
55755
  lastPressedAt: number().nullable(),
@@ -56422,6 +56552,32 @@ var gasCapability = {
56422
56552
  * whether persisting is worth a SQLite commit. */
56423
56553
  volatileStateFields: ["lastChangedAt"]
56424
56554
  };
56555
+ var HeatingValveStatusSchema = object({
56556
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56557
+ position: number().min(0).max(100).nullable(),
56558
+ /** Ms epoch when the slice was last updated (push or poll). */
56559
+ lastFetchedAt: number()
56560
+ });
56561
+ var heatingValveCapability = {
56562
+ name: "heating-valve",
56563
+ scope: "device",
56564
+ deviceNative: true,
56565
+ mode: "singleton",
56566
+ deviceTypes: [DeviceType.Thermostat],
56567
+ methods: {},
56568
+ status: {
56569
+ schema: HeatingValveStatusSchema,
56570
+ kind: "push"
56571
+ },
56572
+ runtimeState: HeatingValveStatusSchema,
56573
+ durability: "session",
56574
+ history: { fields: { position: {
56575
+ kind: "gauge",
56576
+ unit: "%",
56577
+ deadband: 1
56578
+ } } },
56579
+ volatileStateFields: ["lastFetchedAt"]
56580
+ };
56425
56581
  /**
56426
56582
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56427
56583
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -65842,6 +65998,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65842
65998
  dayNight: dayNightCapability,
65843
65999
  deviceDiscovery: deviceDiscoveryCapability,
65844
66000
  deviceStatus: deviceStatusCapability,
66001
+ dishwasher: dishwasherCapability,
65845
66002
  doorbell: doorbellCapability,
65846
66003
  enumSensor: enumSensorCapability,
65847
66004
  eventEmitter: eventEmitterCapability,
@@ -65849,6 +66006,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65849
66006
  featureProbe: featureProbeCapability,
65850
66007
  flood: floodCapability,
65851
66008
  gas: gasCapability,
66009
+ heatingValve: heatingValveCapability,
65852
66010
  humidifier: humidifierCapability,
65853
66011
  humiditySensor: humiditySensorCapability,
65854
66012
  image: imageCapability,
@@ -66574,6 +66732,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66574
66732
  provider: this
66575
66733
  }];
66576
66734
  }
66735
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66736
+ providerRegistrationsFromSuper(result) {
66737
+ if (Array.isArray(result)) return result;
66738
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66739
+ return [];
66740
+ }
66577
66741
  async onShutdown() {
66578
66742
  this._restoreShuttingDown = true;
66579
66743
  this.cancelRestoreRetries();
@@ -67100,7 +67264,7 @@ var BaseDeviceProvider = class extends BaseAddon {
67100
67264
  return toDeviceSummary(device, this.addonId);
67101
67265
  }
67102
67266
  };
67103
- 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;
67267
+ 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;
67104
67268
  new Set(Object.values(DeviceType));
67105
67269
  Object.freeze({
67106
67270
  "accessories.getStatus": {
@@ -69521,6 +69685,60 @@ Object.freeze({
69521
69685
  addonId: null,
69522
69686
  access: "view"
69523
69687
  },
69688
+ "dishwasher.getStatus": {
69689
+ capName: "dishwasher",
69690
+ capScope: "device",
69691
+ addonId: null,
69692
+ access: "view"
69693
+ },
69694
+ "dishwasher.pause": {
69695
+ capName: "dishwasher",
69696
+ capScope: "device",
69697
+ addonId: null,
69698
+ access: "create"
69699
+ },
69700
+ "dishwasher.setHalfLoad": {
69701
+ capName: "dishwasher",
69702
+ capScope: "device",
69703
+ addonId: null,
69704
+ access: "create"
69705
+ },
69706
+ "dishwasher.setHygienePlus": {
69707
+ capName: "dishwasher",
69708
+ capScope: "device",
69709
+ addonId: null,
69710
+ access: "create"
69711
+ },
69712
+ "dishwasher.setOption": {
69713
+ capName: "dishwasher",
69714
+ capScope: "device",
69715
+ addonId: null,
69716
+ access: "create"
69717
+ },
69718
+ "dishwasher.setPower": {
69719
+ capName: "dishwasher",
69720
+ capScope: "device",
69721
+ addonId: null,
69722
+ access: "create"
69723
+ },
69724
+ "dishwasher.setProgram": {
69725
+ capName: "dishwasher",
69726
+ capScope: "device",
69727
+ addonId: null,
69728
+ access: "create"
69729
+ },
69730
+ "dishwasher.start": {
69731
+ capName: "dishwasher",
69732
+ capScope: "device",
69733
+ addonId: null,
69734
+ access: "create"
69735
+ },
69736
+ "dishwasher.stop": {
69737
+ capName: "dishwasher",
69738
+ capScope: "device",
69739
+ addonId: null,
69740
+ access: "create"
69741
+ },
69524
69742
  "doorbell.getStatus": {
69525
69743
  capName: "doorbell",
69526
69744
  capScope: "device",
@@ -69731,6 +69949,12 @@ Object.freeze({
69731
69949
  addonId: null,
69732
69950
  access: "view"
69733
69951
  },
69952
+ "heatingValve.getStatus": {
69953
+ capName: "heating-valve",
69954
+ capScope: "device",
69955
+ addonId: null,
69956
+ access: "view"
69957
+ },
69734
69958
  "humidifier.getStatus": {
69735
69959
  capName: "humidifier",
69736
69960
  capScope: "device",
@@ -75318,7 +75542,7 @@ Object.freeze({
75318
75542
  access: "create"
75319
75543
  }
75320
75544
  });
75321
- 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;
75545
+ 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;
75322
75546
  DeviceFeature.BatteryOperated;
75323
75547
  Object.freeze({
75324
75548
  "accessories.getStatus": [{
@@ -76142,6 +76366,51 @@ Object.freeze({
76142
76366
  form: "single",
76143
76367
  optional: false
76144
76368
  }],
76369
+ "dishwasher.getStatus": [{
76370
+ name: "deviceId",
76371
+ form: "single",
76372
+ optional: false
76373
+ }],
76374
+ "dishwasher.pause": [{
76375
+ name: "deviceId",
76376
+ form: "single",
76377
+ optional: false
76378
+ }],
76379
+ "dishwasher.setHalfLoad": [{
76380
+ name: "deviceId",
76381
+ form: "single",
76382
+ optional: false
76383
+ }],
76384
+ "dishwasher.setHygienePlus": [{
76385
+ name: "deviceId",
76386
+ form: "single",
76387
+ optional: false
76388
+ }],
76389
+ "dishwasher.setOption": [{
76390
+ name: "deviceId",
76391
+ form: "single",
76392
+ optional: false
76393
+ }],
76394
+ "dishwasher.setPower": [{
76395
+ name: "deviceId",
76396
+ form: "single",
76397
+ optional: false
76398
+ }],
76399
+ "dishwasher.setProgram": [{
76400
+ name: "deviceId",
76401
+ form: "single",
76402
+ optional: false
76403
+ }],
76404
+ "dishwasher.start": [{
76405
+ name: "deviceId",
76406
+ form: "single",
76407
+ optional: false
76408
+ }],
76409
+ "dishwasher.stop": [{
76410
+ name: "deviceId",
76411
+ form: "single",
76412
+ optional: false
76413
+ }],
76145
76414
  "doorbell.getStatus": [{
76146
76415
  name: "deviceId",
76147
76416
  form: "single",
@@ -76211,6 +76480,11 @@ Object.freeze({
76211
76480
  form: "single",
76212
76481
  optional: false
76213
76482
  }],
76483
+ "heatingValve.getStatus": [{
76484
+ name: "deviceId",
76485
+ form: "single",
76486
+ optional: false
76487
+ }],
76214
76488
  "humidifier.getStatus": [{
76215
76489
  name: "deviceId",
76216
76490
  form: "single",
@@ -190135,7 +190409,7 @@ var MatterBrokerAddon = class extends BaseDeviceProvider {
190135
190409
  super({ ...DEFAULTS });
190136
190410
  }
190137
190411
  async onInitialize() {
190138
- const regs = await super.onInitialize();
190412
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
190139
190413
  const records = this.ctx.records;
190140
190414
  if (records === void 0) throw new Error("matter-broker: ctx.records is required (hub-only addon)");
190141
190415
  await records.declare({ brokers: matterBrokersEntryKind });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.127",
3
+ "version": "0.2.128",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",