@camstack/addon-provider-wyze 0.2.138 → 0.2.139

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
@@ -5437,7 +5437,7 @@ var ZodIssueCode = {
5437
5437
  var ZodFirstPartyTypeKind;
5438
5438
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5439
5439
  //#endregion
5440
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5440
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5441
5441
  /**
5442
5442
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5443
5443
  * window to float samples (D455).
@@ -8470,7 +8470,7 @@ function userError(code, params, englishFallback) {
8470
8470
  return new CamstackError(code, params, englishFallback);
8471
8471
  }
8472
8472
  //#endregion
8473
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8473
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8474
8474
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8475
8475
  DeviceType["Camera"] = "camera";
8476
8476
  DeviceType["Hub"] = "hub";
@@ -8562,6 +8562,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8562
8562
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8563
8563
  * integrations sharing the same food/desiccant/hopper surface. */
8564
8564
  DeviceType["PetFeeder"] = "pet-feeder";
8565
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8566
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8567
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8568
+ DeviceType["Dishwasher"] = "dishwasher";
8565
8569
  return DeviceType;
8566
8570
  }({});
8567
8571
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8819,7 +8823,7 @@ function errMsg(err) {
8819
8823
  return String(err);
8820
8824
  }
8821
8825
  //#endregion
8822
- //#region ../types/dist/composition-DOwQB_Ua.mjs
8826
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8823
8827
  /**
8824
8828
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8825
8829
  *
@@ -13225,8 +13229,13 @@ var AlertSeveritySchema = _enum([
13225
13229
  "info",
13226
13230
  "success",
13227
13231
  "warning",
13228
- "error"
13232
+ "error",
13233
+ "critical"
13229
13234
  ]);
13235
+ var AlertActionSchema = object({
13236
+ label: string(),
13237
+ href: string().optional()
13238
+ });
13230
13239
  var AlertStatusSchema = _enum([
13231
13240
  "active",
13232
13241
  "in-progress",
@@ -13244,6 +13253,7 @@ var AlertSchema = object({
13244
13253
  severity: AlertSeveritySchema,
13245
13254
  title: string(),
13246
13255
  message: string(),
13256
+ action: AlertActionSchema.optional(),
13247
13257
  status: AlertStatusSchema,
13248
13258
  progress: number().optional(),
13249
13259
  read: boolean(),
@@ -53906,7 +53916,8 @@ var batteryCapability = {
53906
53916
  DeviceType.Button,
53907
53917
  DeviceType.Switch,
53908
53918
  DeviceType.PetFeeder,
53909
- DeviceType.Container
53919
+ DeviceType.Container,
53920
+ DeviceType.Thermostat
53910
53921
  ],
53911
53922
  methods: {
53912
53923
  /**
@@ -55387,6 +55398,125 @@ onStatusChanged: { data: object({
55387
55398
  * whether persisting is worth a SQLite commit. */
55388
55399
  volatileStateFields: ["lastChangedAt"]
55389
55400
  };
55401
+ /**
55402
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55403
+ * consumable levels (salt, rinse aid) and common program options.
55404
+ *
55405
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55406
+ * by any integration that exposes the same program / option surface.
55407
+ *
55408
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55409
+ * provider refreshes the slice on an interval and eagerly after commands.
55410
+ */
55411
+ var DishwasherStateSchema = _enum([
55412
+ "idle",
55413
+ "running",
55414
+ "paused",
55415
+ "finished",
55416
+ "error",
55417
+ "unavailable"
55418
+ ]);
55419
+ var DishwasherConsumableLevelSchema = _enum([
55420
+ "ok",
55421
+ "low",
55422
+ "empty"
55423
+ ]);
55424
+ var DishwasherStatusSchema = object({
55425
+ state: DishwasherStateSchema,
55426
+ /** Active program id/name, or null when none selected / unknown. */
55427
+ program: string().nullable(),
55428
+ /** Program tokens the hardware accepts — drives the UI selector. */
55429
+ availablePrograms: array(string()),
55430
+ /** Minutes remaining on the active cycle, or null when not running. */
55431
+ remainingMinutes: number().int().nonnegative().nullable(),
55432
+ /** Cycle completion 0..100, or null when not applicable. */
55433
+ progressPercent: number().min(0).max(100).nullable(),
55434
+ /** True when the door is reported open. */
55435
+ doorOpen: boolean(),
55436
+ /** True when remote start is allowed (door closed, power on, etc.). */
55437
+ remoteStartAllowed: boolean(),
55438
+ /** Main power / switched-on state. */
55439
+ powerOn: boolean(),
55440
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55441
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55442
+ halfLoad: boolean(),
55443
+ hygienePlus: boolean(),
55444
+ errorCode: number().nullable(),
55445
+ errorLabel: string().nullable(),
55446
+ lastFetchedAt: number()
55447
+ });
55448
+ var dishwasherCapability = {
55449
+ name: "dishwasher",
55450
+ scope: "device",
55451
+ deviceNative: true,
55452
+ mode: "singleton",
55453
+ deviceTypes: [DeviceType.Dishwasher],
55454
+ methods: {
55455
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55456
+ kind: "mutation",
55457
+ auth: "protected"
55458
+ }),
55459
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55460
+ kind: "mutation",
55461
+ auth: "protected"
55462
+ }),
55463
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55464
+ kind: "mutation",
55465
+ auth: "protected"
55466
+ }),
55467
+ setProgram: method(object({
55468
+ deviceId: number().int().nonnegative(),
55469
+ program: string().min(1)
55470
+ }), _void(), {
55471
+ kind: "mutation",
55472
+ auth: "protected"
55473
+ }),
55474
+ setPower: method(object({
55475
+ deviceId: number().int().nonnegative(),
55476
+ on: boolean()
55477
+ }), _void(), {
55478
+ kind: "mutation",
55479
+ auth: "protected"
55480
+ }),
55481
+ setHalfLoad: method(object({
55482
+ deviceId: number().int().nonnegative(),
55483
+ on: boolean()
55484
+ }), _void(), {
55485
+ kind: "mutation",
55486
+ auth: "protected"
55487
+ }),
55488
+ setHygienePlus: method(object({
55489
+ deviceId: number().int().nonnegative(),
55490
+ on: boolean()
55491
+ }), _void(), {
55492
+ kind: "mutation",
55493
+ auth: "protected"
55494
+ }),
55495
+ setOption: method(object({
55496
+ deviceId: number().int().nonnegative(),
55497
+ key: string().min(1),
55498
+ value: union([
55499
+ boolean(),
55500
+ string(),
55501
+ number()
55502
+ ])
55503
+ }), _void(), {
55504
+ kind: "mutation",
55505
+ auth: "protected"
55506
+ })
55507
+ },
55508
+ status: {
55509
+ schema: DishwasherStatusSchema,
55510
+ kind: "poll"
55511
+ },
55512
+ runtimeState: DishwasherStatusSchema,
55513
+ durability: "session",
55514
+ history: { fields: { progressPercent: {
55515
+ kind: "gauge",
55516
+ unit: "%",
55517
+ deadband: 2
55518
+ } } }
55519
+ };
55390
55520
  var DoorbellStatusSchema = object({
55391
55521
  /** Ms epoch of the last press. null = never observed since this provider started. */
55392
55522
  lastPressedAt: number().nullable(),
@@ -56189,6 +56319,32 @@ var gasCapability = {
56189
56319
  * whether persisting is worth a SQLite commit. */
56190
56320
  volatileStateFields: ["lastChangedAt"]
56191
56321
  };
56322
+ var HeatingValveStatusSchema = object({
56323
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56324
+ position: number().min(0).max(100).nullable(),
56325
+ /** Ms epoch when the slice was last updated (push or poll). */
56326
+ lastFetchedAt: number()
56327
+ });
56328
+ var heatingValveCapability = {
56329
+ name: "heating-valve",
56330
+ scope: "device",
56331
+ deviceNative: true,
56332
+ mode: "singleton",
56333
+ deviceTypes: [DeviceType.Thermostat],
56334
+ methods: {},
56335
+ status: {
56336
+ schema: HeatingValveStatusSchema,
56337
+ kind: "push"
56338
+ },
56339
+ runtimeState: HeatingValveStatusSchema,
56340
+ durability: "session",
56341
+ history: { fields: { position: {
56342
+ kind: "gauge",
56343
+ unit: "%",
56344
+ deadband: 1
56345
+ } } },
56346
+ volatileStateFields: ["lastFetchedAt"]
56347
+ };
56192
56348
  /**
56193
56349
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56194
56350
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -65609,6 +65765,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65609
65765
  dayNight: dayNightCapability,
65610
65766
  deviceDiscovery: deviceDiscoveryCapability,
65611
65767
  deviceStatus: deviceStatusCapability,
65768
+ dishwasher: dishwasherCapability,
65612
65769
  doorbell: doorbellCapability,
65613
65770
  enumSensor: enumSensorCapability,
65614
65771
  eventEmitter: eventEmitterCapability,
@@ -65616,6 +65773,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65616
65773
  featureProbe: featureProbeCapability,
65617
65774
  flood: floodCapability,
65618
65775
  gas: gasCapability,
65776
+ heatingValve: heatingValveCapability,
65619
65777
  humidifier: humidifierCapability,
65620
65778
  humiditySensor: humiditySensorCapability,
65621
65779
  image: imageCapability,
@@ -66341,6 +66499,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66341
66499
  provider: this
66342
66500
  }];
66343
66501
  }
66502
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66503
+ providerRegistrationsFromSuper(result) {
66504
+ if (Array.isArray(result)) return result;
66505
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66506
+ return [];
66507
+ }
66344
66508
  async onShutdown() {
66345
66509
  this._restoreShuttingDown = true;
66346
66510
  this.cancelRestoreRetries();
@@ -66867,7 +67031,7 @@ var BaseDeviceProvider = class extends BaseAddon {
66867
67031
  return toDeviceSummary(device, this.addonId);
66868
67032
  }
66869
67033
  };
66870
- 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;
67034
+ 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;
66871
67035
  new Set(Object.values(DeviceType));
66872
67036
  Object.freeze({
66873
67037
  "accessories.getStatus": {
@@ -69288,6 +69452,60 @@ Object.freeze({
69288
69452
  addonId: null,
69289
69453
  access: "view"
69290
69454
  },
69455
+ "dishwasher.getStatus": {
69456
+ capName: "dishwasher",
69457
+ capScope: "device",
69458
+ addonId: null,
69459
+ access: "view"
69460
+ },
69461
+ "dishwasher.pause": {
69462
+ capName: "dishwasher",
69463
+ capScope: "device",
69464
+ addonId: null,
69465
+ access: "create"
69466
+ },
69467
+ "dishwasher.setHalfLoad": {
69468
+ capName: "dishwasher",
69469
+ capScope: "device",
69470
+ addonId: null,
69471
+ access: "create"
69472
+ },
69473
+ "dishwasher.setHygienePlus": {
69474
+ capName: "dishwasher",
69475
+ capScope: "device",
69476
+ addonId: null,
69477
+ access: "create"
69478
+ },
69479
+ "dishwasher.setOption": {
69480
+ capName: "dishwasher",
69481
+ capScope: "device",
69482
+ addonId: null,
69483
+ access: "create"
69484
+ },
69485
+ "dishwasher.setPower": {
69486
+ capName: "dishwasher",
69487
+ capScope: "device",
69488
+ addonId: null,
69489
+ access: "create"
69490
+ },
69491
+ "dishwasher.setProgram": {
69492
+ capName: "dishwasher",
69493
+ capScope: "device",
69494
+ addonId: null,
69495
+ access: "create"
69496
+ },
69497
+ "dishwasher.start": {
69498
+ capName: "dishwasher",
69499
+ capScope: "device",
69500
+ addonId: null,
69501
+ access: "create"
69502
+ },
69503
+ "dishwasher.stop": {
69504
+ capName: "dishwasher",
69505
+ capScope: "device",
69506
+ addonId: null,
69507
+ access: "create"
69508
+ },
69291
69509
  "doorbell.getStatus": {
69292
69510
  capName: "doorbell",
69293
69511
  capScope: "device",
@@ -69498,6 +69716,12 @@ Object.freeze({
69498
69716
  addonId: null,
69499
69717
  access: "view"
69500
69718
  },
69719
+ "heatingValve.getStatus": {
69720
+ capName: "heating-valve",
69721
+ capScope: "device",
69722
+ addonId: null,
69723
+ access: "view"
69724
+ },
69501
69725
  "humidifier.getStatus": {
69502
69726
  capName: "humidifier",
69503
69727
  capScope: "device",
@@ -75085,7 +75309,7 @@ Object.freeze({
75085
75309
  access: "create"
75086
75310
  }
75087
75311
  });
75088
- 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;
75312
+ 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;
75089
75313
  DeviceFeature.BatteryOperated;
75090
75314
  Object.freeze({
75091
75315
  "accessories.getStatus": [{
@@ -75909,6 +76133,51 @@ Object.freeze({
75909
76133
  form: "single",
75910
76134
  optional: false
75911
76135
  }],
76136
+ "dishwasher.getStatus": [{
76137
+ name: "deviceId",
76138
+ form: "single",
76139
+ optional: false
76140
+ }],
76141
+ "dishwasher.pause": [{
76142
+ name: "deviceId",
76143
+ form: "single",
76144
+ optional: false
76145
+ }],
76146
+ "dishwasher.setHalfLoad": [{
76147
+ name: "deviceId",
76148
+ form: "single",
76149
+ optional: false
76150
+ }],
76151
+ "dishwasher.setHygienePlus": [{
76152
+ name: "deviceId",
76153
+ form: "single",
76154
+ optional: false
76155
+ }],
76156
+ "dishwasher.setOption": [{
76157
+ name: "deviceId",
76158
+ form: "single",
76159
+ optional: false
76160
+ }],
76161
+ "dishwasher.setPower": [{
76162
+ name: "deviceId",
76163
+ form: "single",
76164
+ optional: false
76165
+ }],
76166
+ "dishwasher.setProgram": [{
76167
+ name: "deviceId",
76168
+ form: "single",
76169
+ optional: false
76170
+ }],
76171
+ "dishwasher.start": [{
76172
+ name: "deviceId",
76173
+ form: "single",
76174
+ optional: false
76175
+ }],
76176
+ "dishwasher.stop": [{
76177
+ name: "deviceId",
76178
+ form: "single",
76179
+ optional: false
76180
+ }],
75912
76181
  "doorbell.getStatus": [{
75913
76182
  name: "deviceId",
75914
76183
  form: "single",
@@ -75978,6 +76247,11 @@ Object.freeze({
75978
76247
  form: "single",
75979
76248
  optional: false
75980
76249
  }],
76250
+ "heatingValve.getStatus": [{
76251
+ name: "deviceId",
76252
+ form: "single",
76253
+ optional: false
76254
+ }],
75981
76255
  "humidifier.getStatus": [{
75982
76256
  name: "deviceId",
75983
76257
  form: "single",
@@ -83718,7 +83992,7 @@ var WyzeProviderAddon = class extends BaseDeviceProvider {
83718
83992
  }
83719
83993
  async onInitialize() {
83720
83994
  applyWyzeCloudTlsTrust();
83721
- const regs = await super.onInitialize();
83995
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
83722
83996
  this.clients = new WyzeClientRegistry({
83723
83997
  dataDir: this.ctx.dataDir,
83724
83998
  logger: this.ctx.logger
package/dist/addon.mjs CHANGED
@@ -5416,7 +5416,7 @@ var ZodIssueCode = {
5416
5416
  var ZodFirstPartyTypeKind;
5417
5417
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5418
5418
  //#endregion
5419
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5419
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5420
5420
  /**
5421
5421
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5422
5422
  * window to float samples (D455).
@@ -8449,7 +8449,7 @@ function userError(code, params, englishFallback) {
8449
8449
  return new CamstackError(code, params, englishFallback);
8450
8450
  }
8451
8451
  //#endregion
8452
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8452
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8453
8453
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8454
8454
  DeviceType["Camera"] = "camera";
8455
8455
  DeviceType["Hub"] = "hub";
@@ -8541,6 +8541,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8541
8541
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8542
8542
  * integrations sharing the same food/desiccant/hopper surface. */
8543
8543
  DeviceType["PetFeeder"] = "pet-feeder";
8544
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8545
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8546
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8547
+ DeviceType["Dishwasher"] = "dishwasher";
8544
8548
  return DeviceType;
8545
8549
  }({});
8546
8550
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8798,7 +8802,7 @@ function errMsg(err) {
8798
8802
  return String(err);
8799
8803
  }
8800
8804
  //#endregion
8801
- //#region ../types/dist/composition-DOwQB_Ua.mjs
8805
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8802
8806
  /**
8803
8807
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8804
8808
  *
@@ -13204,8 +13208,13 @@ var AlertSeveritySchema = _enum([
13204
13208
  "info",
13205
13209
  "success",
13206
13210
  "warning",
13207
- "error"
13211
+ "error",
13212
+ "critical"
13208
13213
  ]);
13214
+ var AlertActionSchema = object({
13215
+ label: string(),
13216
+ href: string().optional()
13217
+ });
13209
13218
  var AlertStatusSchema = _enum([
13210
13219
  "active",
13211
13220
  "in-progress",
@@ -13223,6 +13232,7 @@ var AlertSchema = object({
13223
13232
  severity: AlertSeveritySchema,
13224
13233
  title: string(),
13225
13234
  message: string(),
13235
+ action: AlertActionSchema.optional(),
13226
13236
  status: AlertStatusSchema,
13227
13237
  progress: number().optional(),
13228
13238
  read: boolean(),
@@ -53885,7 +53895,8 @@ var batteryCapability = {
53885
53895
  DeviceType.Button,
53886
53896
  DeviceType.Switch,
53887
53897
  DeviceType.PetFeeder,
53888
- DeviceType.Container
53898
+ DeviceType.Container,
53899
+ DeviceType.Thermostat
53889
53900
  ],
53890
53901
  methods: {
53891
53902
  /**
@@ -55366,6 +55377,125 @@ onStatusChanged: { data: object({
55366
55377
  * whether persisting is worth a SQLite commit. */
55367
55378
  volatileStateFields: ["lastChangedAt"]
55368
55379
  };
55380
+ /**
55381
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55382
+ * consumable levels (salt, rinse aid) and common program options.
55383
+ *
55384
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55385
+ * by any integration that exposes the same program / option surface.
55386
+ *
55387
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55388
+ * provider refreshes the slice on an interval and eagerly after commands.
55389
+ */
55390
+ var DishwasherStateSchema = _enum([
55391
+ "idle",
55392
+ "running",
55393
+ "paused",
55394
+ "finished",
55395
+ "error",
55396
+ "unavailable"
55397
+ ]);
55398
+ var DishwasherConsumableLevelSchema = _enum([
55399
+ "ok",
55400
+ "low",
55401
+ "empty"
55402
+ ]);
55403
+ var DishwasherStatusSchema = object({
55404
+ state: DishwasherStateSchema,
55405
+ /** Active program id/name, or null when none selected / unknown. */
55406
+ program: string().nullable(),
55407
+ /** Program tokens the hardware accepts — drives the UI selector. */
55408
+ availablePrograms: array(string()),
55409
+ /** Minutes remaining on the active cycle, or null when not running. */
55410
+ remainingMinutes: number().int().nonnegative().nullable(),
55411
+ /** Cycle completion 0..100, or null when not applicable. */
55412
+ progressPercent: number().min(0).max(100).nullable(),
55413
+ /** True when the door is reported open. */
55414
+ doorOpen: boolean(),
55415
+ /** True when remote start is allowed (door closed, power on, etc.). */
55416
+ remoteStartAllowed: boolean(),
55417
+ /** Main power / switched-on state. */
55418
+ powerOn: boolean(),
55419
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55420
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55421
+ halfLoad: boolean(),
55422
+ hygienePlus: boolean(),
55423
+ errorCode: number().nullable(),
55424
+ errorLabel: string().nullable(),
55425
+ lastFetchedAt: number()
55426
+ });
55427
+ var dishwasherCapability = {
55428
+ name: "dishwasher",
55429
+ scope: "device",
55430
+ deviceNative: true,
55431
+ mode: "singleton",
55432
+ deviceTypes: [DeviceType.Dishwasher],
55433
+ methods: {
55434
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55435
+ kind: "mutation",
55436
+ auth: "protected"
55437
+ }),
55438
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55439
+ kind: "mutation",
55440
+ auth: "protected"
55441
+ }),
55442
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55443
+ kind: "mutation",
55444
+ auth: "protected"
55445
+ }),
55446
+ setProgram: method(object({
55447
+ deviceId: number().int().nonnegative(),
55448
+ program: string().min(1)
55449
+ }), _void(), {
55450
+ kind: "mutation",
55451
+ auth: "protected"
55452
+ }),
55453
+ setPower: method(object({
55454
+ deviceId: number().int().nonnegative(),
55455
+ on: boolean()
55456
+ }), _void(), {
55457
+ kind: "mutation",
55458
+ auth: "protected"
55459
+ }),
55460
+ setHalfLoad: method(object({
55461
+ deviceId: number().int().nonnegative(),
55462
+ on: boolean()
55463
+ }), _void(), {
55464
+ kind: "mutation",
55465
+ auth: "protected"
55466
+ }),
55467
+ setHygienePlus: method(object({
55468
+ deviceId: number().int().nonnegative(),
55469
+ on: boolean()
55470
+ }), _void(), {
55471
+ kind: "mutation",
55472
+ auth: "protected"
55473
+ }),
55474
+ setOption: method(object({
55475
+ deviceId: number().int().nonnegative(),
55476
+ key: string().min(1),
55477
+ value: union([
55478
+ boolean(),
55479
+ string(),
55480
+ number()
55481
+ ])
55482
+ }), _void(), {
55483
+ kind: "mutation",
55484
+ auth: "protected"
55485
+ })
55486
+ },
55487
+ status: {
55488
+ schema: DishwasherStatusSchema,
55489
+ kind: "poll"
55490
+ },
55491
+ runtimeState: DishwasherStatusSchema,
55492
+ durability: "session",
55493
+ history: { fields: { progressPercent: {
55494
+ kind: "gauge",
55495
+ unit: "%",
55496
+ deadband: 2
55497
+ } } }
55498
+ };
55369
55499
  var DoorbellStatusSchema = object({
55370
55500
  /** Ms epoch of the last press. null = never observed since this provider started. */
55371
55501
  lastPressedAt: number().nullable(),
@@ -56168,6 +56298,32 @@ var gasCapability = {
56168
56298
  * whether persisting is worth a SQLite commit. */
56169
56299
  volatileStateFields: ["lastChangedAt"]
56170
56300
  };
56301
+ var HeatingValveStatusSchema = object({
56302
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56303
+ position: number().min(0).max(100).nullable(),
56304
+ /** Ms epoch when the slice was last updated (push or poll). */
56305
+ lastFetchedAt: number()
56306
+ });
56307
+ var heatingValveCapability = {
56308
+ name: "heating-valve",
56309
+ scope: "device",
56310
+ deviceNative: true,
56311
+ mode: "singleton",
56312
+ deviceTypes: [DeviceType.Thermostat],
56313
+ methods: {},
56314
+ status: {
56315
+ schema: HeatingValveStatusSchema,
56316
+ kind: "push"
56317
+ },
56318
+ runtimeState: HeatingValveStatusSchema,
56319
+ durability: "session",
56320
+ history: { fields: { position: {
56321
+ kind: "gauge",
56322
+ unit: "%",
56323
+ deadband: 1
56324
+ } } },
56325
+ volatileStateFields: ["lastFetchedAt"]
56326
+ };
56171
56327
  /**
56172
56328
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56173
56329
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -65588,6 +65744,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65588
65744
  dayNight: dayNightCapability,
65589
65745
  deviceDiscovery: deviceDiscoveryCapability,
65590
65746
  deviceStatus: deviceStatusCapability,
65747
+ dishwasher: dishwasherCapability,
65591
65748
  doorbell: doorbellCapability,
65592
65749
  enumSensor: enumSensorCapability,
65593
65750
  eventEmitter: eventEmitterCapability,
@@ -65595,6 +65752,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65595
65752
  featureProbe: featureProbeCapability,
65596
65753
  flood: floodCapability,
65597
65754
  gas: gasCapability,
65755
+ heatingValve: heatingValveCapability,
65598
65756
  humidifier: humidifierCapability,
65599
65757
  humiditySensor: humiditySensorCapability,
65600
65758
  image: imageCapability,
@@ -66320,6 +66478,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66320
66478
  provider: this
66321
66479
  }];
66322
66480
  }
66481
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66482
+ providerRegistrationsFromSuper(result) {
66483
+ if (Array.isArray(result)) return result;
66484
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66485
+ return [];
66486
+ }
66323
66487
  async onShutdown() {
66324
66488
  this._restoreShuttingDown = true;
66325
66489
  this.cancelRestoreRetries();
@@ -66846,7 +67010,7 @@ var BaseDeviceProvider = class extends BaseAddon {
66846
67010
  return toDeviceSummary(device, this.addonId);
66847
67011
  }
66848
67012
  };
66849
- 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;
67013
+ 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;
66850
67014
  new Set(Object.values(DeviceType));
66851
67015
  Object.freeze({
66852
67016
  "accessories.getStatus": {
@@ -69267,6 +69431,60 @@ Object.freeze({
69267
69431
  addonId: null,
69268
69432
  access: "view"
69269
69433
  },
69434
+ "dishwasher.getStatus": {
69435
+ capName: "dishwasher",
69436
+ capScope: "device",
69437
+ addonId: null,
69438
+ access: "view"
69439
+ },
69440
+ "dishwasher.pause": {
69441
+ capName: "dishwasher",
69442
+ capScope: "device",
69443
+ addonId: null,
69444
+ access: "create"
69445
+ },
69446
+ "dishwasher.setHalfLoad": {
69447
+ capName: "dishwasher",
69448
+ capScope: "device",
69449
+ addonId: null,
69450
+ access: "create"
69451
+ },
69452
+ "dishwasher.setHygienePlus": {
69453
+ capName: "dishwasher",
69454
+ capScope: "device",
69455
+ addonId: null,
69456
+ access: "create"
69457
+ },
69458
+ "dishwasher.setOption": {
69459
+ capName: "dishwasher",
69460
+ capScope: "device",
69461
+ addonId: null,
69462
+ access: "create"
69463
+ },
69464
+ "dishwasher.setPower": {
69465
+ capName: "dishwasher",
69466
+ capScope: "device",
69467
+ addonId: null,
69468
+ access: "create"
69469
+ },
69470
+ "dishwasher.setProgram": {
69471
+ capName: "dishwasher",
69472
+ capScope: "device",
69473
+ addonId: null,
69474
+ access: "create"
69475
+ },
69476
+ "dishwasher.start": {
69477
+ capName: "dishwasher",
69478
+ capScope: "device",
69479
+ addonId: null,
69480
+ access: "create"
69481
+ },
69482
+ "dishwasher.stop": {
69483
+ capName: "dishwasher",
69484
+ capScope: "device",
69485
+ addonId: null,
69486
+ access: "create"
69487
+ },
69270
69488
  "doorbell.getStatus": {
69271
69489
  capName: "doorbell",
69272
69490
  capScope: "device",
@@ -69477,6 +69695,12 @@ Object.freeze({
69477
69695
  addonId: null,
69478
69696
  access: "view"
69479
69697
  },
69698
+ "heatingValve.getStatus": {
69699
+ capName: "heating-valve",
69700
+ capScope: "device",
69701
+ addonId: null,
69702
+ access: "view"
69703
+ },
69480
69704
  "humidifier.getStatus": {
69481
69705
  capName: "humidifier",
69482
69706
  capScope: "device",
@@ -75064,7 +75288,7 @@ Object.freeze({
75064
75288
  access: "create"
75065
75289
  }
75066
75290
  });
75067
- 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;
75291
+ 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;
75068
75292
  DeviceFeature.BatteryOperated;
75069
75293
  Object.freeze({
75070
75294
  "accessories.getStatus": [{
@@ -75888,6 +76112,51 @@ Object.freeze({
75888
76112
  form: "single",
75889
76113
  optional: false
75890
76114
  }],
76115
+ "dishwasher.getStatus": [{
76116
+ name: "deviceId",
76117
+ form: "single",
76118
+ optional: false
76119
+ }],
76120
+ "dishwasher.pause": [{
76121
+ name: "deviceId",
76122
+ form: "single",
76123
+ optional: false
76124
+ }],
76125
+ "dishwasher.setHalfLoad": [{
76126
+ name: "deviceId",
76127
+ form: "single",
76128
+ optional: false
76129
+ }],
76130
+ "dishwasher.setHygienePlus": [{
76131
+ name: "deviceId",
76132
+ form: "single",
76133
+ optional: false
76134
+ }],
76135
+ "dishwasher.setOption": [{
76136
+ name: "deviceId",
76137
+ form: "single",
76138
+ optional: false
76139
+ }],
76140
+ "dishwasher.setPower": [{
76141
+ name: "deviceId",
76142
+ form: "single",
76143
+ optional: false
76144
+ }],
76145
+ "dishwasher.setProgram": [{
76146
+ name: "deviceId",
76147
+ form: "single",
76148
+ optional: false
76149
+ }],
76150
+ "dishwasher.start": [{
76151
+ name: "deviceId",
76152
+ form: "single",
76153
+ optional: false
76154
+ }],
76155
+ "dishwasher.stop": [{
76156
+ name: "deviceId",
76157
+ form: "single",
76158
+ optional: false
76159
+ }],
75891
76160
  "doorbell.getStatus": [{
75892
76161
  name: "deviceId",
75893
76162
  form: "single",
@@ -75957,6 +76226,11 @@ Object.freeze({
75957
76226
  form: "single",
75958
76227
  optional: false
75959
76228
  }],
76229
+ "heatingValve.getStatus": [{
76230
+ name: "deviceId",
76231
+ form: "single",
76232
+ optional: false
76233
+ }],
75960
76234
  "humidifier.getStatus": [{
75961
76235
  name: "deviceId",
75962
76236
  form: "single",
@@ -83697,7 +83971,7 @@ var WyzeProviderAddon = class extends BaseDeviceProvider {
83697
83971
  }
83698
83972
  async onInitialize() {
83699
83973
  applyWyzeCloudTlsTrust();
83700
- const regs = await super.onInitialize();
83974
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
83701
83975
  this.clients = new WyzeClientRegistry({
83702
83976
  dataDir: this.ctx.dataDir,
83703
83977
  logger: this.ctx.logger
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.138",
3
+ "version": "0.2.139",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",