@camstack/addon-provider-hikvision 1.2.152 → 1.2.153

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
@@ -5440,7 +5440,7 @@ var ZodIssueCode = {
5440
5440
  var ZodFirstPartyTypeKind;
5441
5441
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5442
5442
  //#endregion
5443
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5443
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5444
5444
  /**
5445
5445
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5446
5446
  * window to float samples (D455).
@@ -8485,7 +8485,7 @@ function userError(code, params, englishFallback) {
8485
8485
  return new CamstackError(code, params, englishFallback);
8486
8486
  }
8487
8487
  //#endregion
8488
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8488
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8489
8489
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8490
8490
  DeviceType["Camera"] = "camera";
8491
8491
  DeviceType["Hub"] = "hub";
@@ -8577,6 +8577,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8577
8577
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8578
8578
  * integrations sharing the same food/desiccant/hopper surface. */
8579
8579
  DeviceType["PetFeeder"] = "pet-feeder";
8580
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8581
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8582
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8583
+ DeviceType["Dishwasher"] = "dishwasher";
8580
8584
  return DeviceType;
8581
8585
  }({});
8582
8586
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8824,7 +8828,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8824
8828
  return DeviceRole;
8825
8829
  }({});
8826
8830
  //#endregion
8827
- //#region ../types/dist/composition-DOwQB_Ua.mjs
8831
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8828
8832
  /**
8829
8833
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8830
8834
  *
@@ -13511,8 +13515,13 @@ var AlertSeveritySchema = _enum([
13511
13515
  "info",
13512
13516
  "success",
13513
13517
  "warning",
13514
- "error"
13518
+ "error",
13519
+ "critical"
13515
13520
  ]);
13521
+ var AlertActionSchema = object({
13522
+ label: string(),
13523
+ href: string().optional()
13524
+ });
13516
13525
  var AlertStatusSchema = _enum([
13517
13526
  "active",
13518
13527
  "in-progress",
@@ -13530,6 +13539,7 @@ var AlertSchema = object({
13530
13539
  severity: AlertSeveritySchema,
13531
13540
  title: string(),
13532
13541
  message: string(),
13542
+ action: AlertActionSchema.optional(),
13533
13543
  status: AlertStatusSchema,
13534
13544
  progress: number().optional(),
13535
13545
  read: boolean(),
@@ -54725,7 +54735,8 @@ var batteryCapability = {
54725
54735
  DeviceType.Button,
54726
54736
  DeviceType.Switch,
54727
54737
  DeviceType.PetFeeder,
54728
- DeviceType.Container
54738
+ DeviceType.Container,
54739
+ DeviceType.Thermostat
54729
54740
  ],
54730
54741
  methods: {
54731
54742
  /**
@@ -56198,6 +56209,125 @@ onStatusChanged: { data: object({
56198
56209
  * whether persisting is worth a SQLite commit. */
56199
56210
  volatileStateFields: ["lastChangedAt"]
56200
56211
  };
56212
+ /**
56213
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56214
+ * consumable levels (salt, rinse aid) and common program options.
56215
+ *
56216
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56217
+ * by any integration that exposes the same program / option surface.
56218
+ *
56219
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
56220
+ * provider refreshes the slice on an interval and eagerly after commands.
56221
+ */
56222
+ var DishwasherStateSchema = _enum([
56223
+ "idle",
56224
+ "running",
56225
+ "paused",
56226
+ "finished",
56227
+ "error",
56228
+ "unavailable"
56229
+ ]);
56230
+ var DishwasherConsumableLevelSchema = _enum([
56231
+ "ok",
56232
+ "low",
56233
+ "empty"
56234
+ ]);
56235
+ var DishwasherStatusSchema = object({
56236
+ state: DishwasherStateSchema,
56237
+ /** Active program id/name, or null when none selected / unknown. */
56238
+ program: string().nullable(),
56239
+ /** Program tokens the hardware accepts — drives the UI selector. */
56240
+ availablePrograms: array(string()),
56241
+ /** Minutes remaining on the active cycle, or null when not running. */
56242
+ remainingMinutes: number().int().nonnegative().nullable(),
56243
+ /** Cycle completion 0..100, or null when not applicable. */
56244
+ progressPercent: number().min(0).max(100).nullable(),
56245
+ /** True when the door is reported open. */
56246
+ doorOpen: boolean(),
56247
+ /** True when remote start is allowed (door closed, power on, etc.). */
56248
+ remoteStartAllowed: boolean(),
56249
+ /** Main power / switched-on state. */
56250
+ powerOn: boolean(),
56251
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
56252
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
56253
+ halfLoad: boolean(),
56254
+ hygienePlus: boolean(),
56255
+ errorCode: number().nullable(),
56256
+ errorLabel: string().nullable(),
56257
+ lastFetchedAt: number()
56258
+ });
56259
+ var dishwasherCapability = {
56260
+ name: "dishwasher",
56261
+ scope: "device",
56262
+ deviceNative: true,
56263
+ mode: "singleton",
56264
+ deviceTypes: [DeviceType.Dishwasher],
56265
+ methods: {
56266
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56267
+ kind: "mutation",
56268
+ auth: "protected"
56269
+ }),
56270
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56271
+ kind: "mutation",
56272
+ auth: "protected"
56273
+ }),
56274
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56275
+ kind: "mutation",
56276
+ auth: "protected"
56277
+ }),
56278
+ setProgram: method(object({
56279
+ deviceId: number().int().nonnegative(),
56280
+ program: string().min(1)
56281
+ }), _void(), {
56282
+ kind: "mutation",
56283
+ auth: "protected"
56284
+ }),
56285
+ setPower: method(object({
56286
+ deviceId: number().int().nonnegative(),
56287
+ on: boolean()
56288
+ }), _void(), {
56289
+ kind: "mutation",
56290
+ auth: "protected"
56291
+ }),
56292
+ setHalfLoad: method(object({
56293
+ deviceId: number().int().nonnegative(),
56294
+ on: boolean()
56295
+ }), _void(), {
56296
+ kind: "mutation",
56297
+ auth: "protected"
56298
+ }),
56299
+ setHygienePlus: method(object({
56300
+ deviceId: number().int().nonnegative(),
56301
+ on: boolean()
56302
+ }), _void(), {
56303
+ kind: "mutation",
56304
+ auth: "protected"
56305
+ }),
56306
+ setOption: method(object({
56307
+ deviceId: number().int().nonnegative(),
56308
+ key: string().min(1),
56309
+ value: union([
56310
+ boolean(),
56311
+ string(),
56312
+ number()
56313
+ ])
56314
+ }), _void(), {
56315
+ kind: "mutation",
56316
+ auth: "protected"
56317
+ })
56318
+ },
56319
+ status: {
56320
+ schema: DishwasherStatusSchema,
56321
+ kind: "poll"
56322
+ },
56323
+ runtimeState: DishwasherStatusSchema,
56324
+ durability: "session",
56325
+ history: { fields: { progressPercent: {
56326
+ kind: "gauge",
56327
+ unit: "%",
56328
+ deadband: 2
56329
+ } } }
56330
+ };
56201
56331
  var DoorbellStatusSchema = object({
56202
56332
  /** Ms epoch of the last press. null = never observed since this provider started. */
56203
56333
  lastPressedAt: number().nullable(),
@@ -57000,6 +57130,32 @@ var gasCapability = {
57000
57130
  * whether persisting is worth a SQLite commit. */
57001
57131
  volatileStateFields: ["lastChangedAt"]
57002
57132
  };
57133
+ var HeatingValveStatusSchema = object({
57134
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
57135
+ position: number().min(0).max(100).nullable(),
57136
+ /** Ms epoch when the slice was last updated (push or poll). */
57137
+ lastFetchedAt: number()
57138
+ });
57139
+ var heatingValveCapability = {
57140
+ name: "heating-valve",
57141
+ scope: "device",
57142
+ deviceNative: true,
57143
+ mode: "singleton",
57144
+ deviceTypes: [DeviceType.Thermostat],
57145
+ methods: {},
57146
+ status: {
57147
+ schema: HeatingValveStatusSchema,
57148
+ kind: "push"
57149
+ },
57150
+ runtimeState: HeatingValveStatusSchema,
57151
+ durability: "session",
57152
+ history: { fields: { position: {
57153
+ kind: "gauge",
57154
+ unit: "%",
57155
+ deadband: 1
57156
+ } } },
57157
+ volatileStateFields: ["lastFetchedAt"]
57158
+ };
57003
57159
  /**
57004
57160
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
57005
57161
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -66996,6 +67152,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66996
67152
  dayNight: dayNightCapability,
66997
67153
  deviceDiscovery: deviceDiscoveryCapability,
66998
67154
  deviceStatus: deviceStatusCapability,
67155
+ dishwasher: dishwasherCapability,
66999
67156
  doorbell: doorbellCapability,
67000
67157
  enumSensor: enumSensorCapability,
67001
67158
  eventEmitter: eventEmitterCapability,
@@ -67003,6 +67160,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
67003
67160
  featureProbe: featureProbeCapability,
67004
67161
  flood: floodCapability,
67005
67162
  gas: gasCapability,
67163
+ heatingValve: heatingValveCapability,
67006
67164
  humidifier: humidifierCapability,
67007
67165
  humiditySensor: humiditySensorCapability,
67008
67166
  image: imageCapability,
@@ -67728,6 +67886,12 @@ var BaseDeviceProvider = class extends BaseAddon {
67728
67886
  provider: this
67729
67887
  }];
67730
67888
  }
67889
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
67890
+ providerRegistrationsFromSuper(result) {
67891
+ if (Array.isArray(result)) return result;
67892
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
67893
+ return [];
67894
+ }
67731
67895
  async onShutdown() {
67732
67896
  this._restoreShuttingDown = true;
67733
67897
  this.cancelRestoreRetries();
@@ -68258,7 +68422,7 @@ var BaseDeviceProvider = class extends BaseAddon {
68258
68422
  function widenDeviceConstructor(ctor) {
68259
68423
  return ctor;
68260
68424
  }
68261
- 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;
68425
+ 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;
68262
68426
  new Set(Object.values(DeviceType));
68263
68427
  Object.freeze({
68264
68428
  "accessories.getStatus": {
@@ -70679,6 +70843,60 @@ Object.freeze({
70679
70843
  addonId: null,
70680
70844
  access: "view"
70681
70845
  },
70846
+ "dishwasher.getStatus": {
70847
+ capName: "dishwasher",
70848
+ capScope: "device",
70849
+ addonId: null,
70850
+ access: "view"
70851
+ },
70852
+ "dishwasher.pause": {
70853
+ capName: "dishwasher",
70854
+ capScope: "device",
70855
+ addonId: null,
70856
+ access: "create"
70857
+ },
70858
+ "dishwasher.setHalfLoad": {
70859
+ capName: "dishwasher",
70860
+ capScope: "device",
70861
+ addonId: null,
70862
+ access: "create"
70863
+ },
70864
+ "dishwasher.setHygienePlus": {
70865
+ capName: "dishwasher",
70866
+ capScope: "device",
70867
+ addonId: null,
70868
+ access: "create"
70869
+ },
70870
+ "dishwasher.setOption": {
70871
+ capName: "dishwasher",
70872
+ capScope: "device",
70873
+ addonId: null,
70874
+ access: "create"
70875
+ },
70876
+ "dishwasher.setPower": {
70877
+ capName: "dishwasher",
70878
+ capScope: "device",
70879
+ addonId: null,
70880
+ access: "create"
70881
+ },
70882
+ "dishwasher.setProgram": {
70883
+ capName: "dishwasher",
70884
+ capScope: "device",
70885
+ addonId: null,
70886
+ access: "create"
70887
+ },
70888
+ "dishwasher.start": {
70889
+ capName: "dishwasher",
70890
+ capScope: "device",
70891
+ addonId: null,
70892
+ access: "create"
70893
+ },
70894
+ "dishwasher.stop": {
70895
+ capName: "dishwasher",
70896
+ capScope: "device",
70897
+ addonId: null,
70898
+ access: "create"
70899
+ },
70682
70900
  "doorbell.getStatus": {
70683
70901
  capName: "doorbell",
70684
70902
  capScope: "device",
@@ -70889,6 +71107,12 @@ Object.freeze({
70889
71107
  addonId: null,
70890
71108
  access: "view"
70891
71109
  },
71110
+ "heatingValve.getStatus": {
71111
+ capName: "heating-valve",
71112
+ capScope: "device",
71113
+ addonId: null,
71114
+ access: "view"
71115
+ },
70892
71116
  "humidifier.getStatus": {
70893
71117
  capName: "humidifier",
70894
71118
  capScope: "device",
@@ -76476,7 +76700,7 @@ Object.freeze({
76476
76700
  access: "create"
76477
76701
  }
76478
76702
  });
76479
- 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;
76703
+ 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;
76480
76704
  DeviceFeature.BatteryOperated;
76481
76705
  /** Reject after `ms`; always clears its own timer. */
76482
76706
  async function withTimeout$1(promise, ms, label) {
@@ -77518,6 +77742,51 @@ Object.freeze({
77518
77742
  form: "single",
77519
77743
  optional: false
77520
77744
  }],
77745
+ "dishwasher.getStatus": [{
77746
+ name: "deviceId",
77747
+ form: "single",
77748
+ optional: false
77749
+ }],
77750
+ "dishwasher.pause": [{
77751
+ name: "deviceId",
77752
+ form: "single",
77753
+ optional: false
77754
+ }],
77755
+ "dishwasher.setHalfLoad": [{
77756
+ name: "deviceId",
77757
+ form: "single",
77758
+ optional: false
77759
+ }],
77760
+ "dishwasher.setHygienePlus": [{
77761
+ name: "deviceId",
77762
+ form: "single",
77763
+ optional: false
77764
+ }],
77765
+ "dishwasher.setOption": [{
77766
+ name: "deviceId",
77767
+ form: "single",
77768
+ optional: false
77769
+ }],
77770
+ "dishwasher.setPower": [{
77771
+ name: "deviceId",
77772
+ form: "single",
77773
+ optional: false
77774
+ }],
77775
+ "dishwasher.setProgram": [{
77776
+ name: "deviceId",
77777
+ form: "single",
77778
+ optional: false
77779
+ }],
77780
+ "dishwasher.start": [{
77781
+ name: "deviceId",
77782
+ form: "single",
77783
+ optional: false
77784
+ }],
77785
+ "dishwasher.stop": [{
77786
+ name: "deviceId",
77787
+ form: "single",
77788
+ optional: false
77789
+ }],
77521
77790
  "doorbell.getStatus": [{
77522
77791
  name: "deviceId",
77523
77792
  form: "single",
@@ -77587,6 +77856,11 @@ Object.freeze({
77587
77856
  form: "single",
77588
77857
  optional: false
77589
77858
  }],
77859
+ "heatingValve.getStatus": [{
77860
+ name: "deviceId",
77861
+ form: "single",
77862
+ optional: false
77863
+ }],
77590
77864
  "humidifier.getStatus": [{
77591
77865
  name: "deviceId",
77592
77866
  form: "single",
@@ -103188,7 +103462,7 @@ var HikvisionProviderAddon = class extends BaseDeviceProvider {
103188
103462
  throw new Error(`Hikvision: ${reason}`);
103189
103463
  }
103190
103464
  async onInitialize() {
103191
- const regs = await super.onInitialize();
103465
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
103192
103466
  regs.push({
103193
103467
  capability: failureContributionCapability,
103194
103468
  provider: { list: () => intercomFailureReport.list() }
package/dist/addon.mjs CHANGED
@@ -5419,7 +5419,7 @@ var ZodIssueCode = {
5419
5419
  var ZodFirstPartyTypeKind;
5420
5420
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5421
5421
  //#endregion
5422
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5422
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5423
5423
  /**
5424
5424
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5425
5425
  * window to float samples (D455).
@@ -8464,7 +8464,7 @@ function userError(code, params, englishFallback) {
8464
8464
  return new CamstackError(code, params, englishFallback);
8465
8465
  }
8466
8466
  //#endregion
8467
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8467
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8468
8468
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8469
8469
  DeviceType["Camera"] = "camera";
8470
8470
  DeviceType["Hub"] = "hub";
@@ -8556,6 +8556,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8556
8556
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8557
8557
  * integrations sharing the same food/desiccant/hopper surface. */
8558
8558
  DeviceType["PetFeeder"] = "pet-feeder";
8559
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8560
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8561
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8562
+ DeviceType["Dishwasher"] = "dishwasher";
8559
8563
  return DeviceType;
8560
8564
  }({});
8561
8565
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8803,7 +8807,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8803
8807
  return DeviceRole;
8804
8808
  }({});
8805
8809
  //#endregion
8806
- //#region ../types/dist/composition-DOwQB_Ua.mjs
8810
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8807
8811
  /**
8808
8812
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8809
8813
  *
@@ -13490,8 +13494,13 @@ var AlertSeveritySchema = _enum([
13490
13494
  "info",
13491
13495
  "success",
13492
13496
  "warning",
13493
- "error"
13497
+ "error",
13498
+ "critical"
13494
13499
  ]);
13500
+ var AlertActionSchema = object({
13501
+ label: string(),
13502
+ href: string().optional()
13503
+ });
13495
13504
  var AlertStatusSchema = _enum([
13496
13505
  "active",
13497
13506
  "in-progress",
@@ -13509,6 +13518,7 @@ var AlertSchema = object({
13509
13518
  severity: AlertSeveritySchema,
13510
13519
  title: string(),
13511
13520
  message: string(),
13521
+ action: AlertActionSchema.optional(),
13512
13522
  status: AlertStatusSchema,
13513
13523
  progress: number().optional(),
13514
13524
  read: boolean(),
@@ -54704,7 +54714,8 @@ var batteryCapability = {
54704
54714
  DeviceType.Button,
54705
54715
  DeviceType.Switch,
54706
54716
  DeviceType.PetFeeder,
54707
- DeviceType.Container
54717
+ DeviceType.Container,
54718
+ DeviceType.Thermostat
54708
54719
  ],
54709
54720
  methods: {
54710
54721
  /**
@@ -56177,6 +56188,125 @@ onStatusChanged: { data: object({
56177
56188
  * whether persisting is worth a SQLite commit. */
56178
56189
  volatileStateFields: ["lastChangedAt"]
56179
56190
  };
56191
+ /**
56192
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56193
+ * consumable levels (salt, rinse aid) and common program options.
56194
+ *
56195
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56196
+ * by any integration that exposes the same program / option surface.
56197
+ *
56198
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
56199
+ * provider refreshes the slice on an interval and eagerly after commands.
56200
+ */
56201
+ var DishwasherStateSchema = _enum([
56202
+ "idle",
56203
+ "running",
56204
+ "paused",
56205
+ "finished",
56206
+ "error",
56207
+ "unavailable"
56208
+ ]);
56209
+ var DishwasherConsumableLevelSchema = _enum([
56210
+ "ok",
56211
+ "low",
56212
+ "empty"
56213
+ ]);
56214
+ var DishwasherStatusSchema = object({
56215
+ state: DishwasherStateSchema,
56216
+ /** Active program id/name, or null when none selected / unknown. */
56217
+ program: string().nullable(),
56218
+ /** Program tokens the hardware accepts — drives the UI selector. */
56219
+ availablePrograms: array(string()),
56220
+ /** Minutes remaining on the active cycle, or null when not running. */
56221
+ remainingMinutes: number().int().nonnegative().nullable(),
56222
+ /** Cycle completion 0..100, or null when not applicable. */
56223
+ progressPercent: number().min(0).max(100).nullable(),
56224
+ /** True when the door is reported open. */
56225
+ doorOpen: boolean(),
56226
+ /** True when remote start is allowed (door closed, power on, etc.). */
56227
+ remoteStartAllowed: boolean(),
56228
+ /** Main power / switched-on state. */
56229
+ powerOn: boolean(),
56230
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
56231
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
56232
+ halfLoad: boolean(),
56233
+ hygienePlus: boolean(),
56234
+ errorCode: number().nullable(),
56235
+ errorLabel: string().nullable(),
56236
+ lastFetchedAt: number()
56237
+ });
56238
+ var dishwasherCapability = {
56239
+ name: "dishwasher",
56240
+ scope: "device",
56241
+ deviceNative: true,
56242
+ mode: "singleton",
56243
+ deviceTypes: [DeviceType.Dishwasher],
56244
+ methods: {
56245
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56246
+ kind: "mutation",
56247
+ auth: "protected"
56248
+ }),
56249
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56250
+ kind: "mutation",
56251
+ auth: "protected"
56252
+ }),
56253
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56254
+ kind: "mutation",
56255
+ auth: "protected"
56256
+ }),
56257
+ setProgram: method(object({
56258
+ deviceId: number().int().nonnegative(),
56259
+ program: string().min(1)
56260
+ }), _void(), {
56261
+ kind: "mutation",
56262
+ auth: "protected"
56263
+ }),
56264
+ setPower: method(object({
56265
+ deviceId: number().int().nonnegative(),
56266
+ on: boolean()
56267
+ }), _void(), {
56268
+ kind: "mutation",
56269
+ auth: "protected"
56270
+ }),
56271
+ setHalfLoad: method(object({
56272
+ deviceId: number().int().nonnegative(),
56273
+ on: boolean()
56274
+ }), _void(), {
56275
+ kind: "mutation",
56276
+ auth: "protected"
56277
+ }),
56278
+ setHygienePlus: method(object({
56279
+ deviceId: number().int().nonnegative(),
56280
+ on: boolean()
56281
+ }), _void(), {
56282
+ kind: "mutation",
56283
+ auth: "protected"
56284
+ }),
56285
+ setOption: method(object({
56286
+ deviceId: number().int().nonnegative(),
56287
+ key: string().min(1),
56288
+ value: union([
56289
+ boolean(),
56290
+ string(),
56291
+ number()
56292
+ ])
56293
+ }), _void(), {
56294
+ kind: "mutation",
56295
+ auth: "protected"
56296
+ })
56297
+ },
56298
+ status: {
56299
+ schema: DishwasherStatusSchema,
56300
+ kind: "poll"
56301
+ },
56302
+ runtimeState: DishwasherStatusSchema,
56303
+ durability: "session",
56304
+ history: { fields: { progressPercent: {
56305
+ kind: "gauge",
56306
+ unit: "%",
56307
+ deadband: 2
56308
+ } } }
56309
+ };
56180
56310
  var DoorbellStatusSchema = object({
56181
56311
  /** Ms epoch of the last press. null = never observed since this provider started. */
56182
56312
  lastPressedAt: number().nullable(),
@@ -56979,6 +57109,32 @@ var gasCapability = {
56979
57109
  * whether persisting is worth a SQLite commit. */
56980
57110
  volatileStateFields: ["lastChangedAt"]
56981
57111
  };
57112
+ var HeatingValveStatusSchema = object({
57113
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
57114
+ position: number().min(0).max(100).nullable(),
57115
+ /** Ms epoch when the slice was last updated (push or poll). */
57116
+ lastFetchedAt: number()
57117
+ });
57118
+ var heatingValveCapability = {
57119
+ name: "heating-valve",
57120
+ scope: "device",
57121
+ deviceNative: true,
57122
+ mode: "singleton",
57123
+ deviceTypes: [DeviceType.Thermostat],
57124
+ methods: {},
57125
+ status: {
57126
+ schema: HeatingValveStatusSchema,
57127
+ kind: "push"
57128
+ },
57129
+ runtimeState: HeatingValveStatusSchema,
57130
+ durability: "session",
57131
+ history: { fields: { position: {
57132
+ kind: "gauge",
57133
+ unit: "%",
57134
+ deadband: 1
57135
+ } } },
57136
+ volatileStateFields: ["lastFetchedAt"]
57137
+ };
56982
57138
  /**
56983
57139
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56984
57140
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -66975,6 +67131,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66975
67131
  dayNight: dayNightCapability,
66976
67132
  deviceDiscovery: deviceDiscoveryCapability,
66977
67133
  deviceStatus: deviceStatusCapability,
67134
+ dishwasher: dishwasherCapability,
66978
67135
  doorbell: doorbellCapability,
66979
67136
  enumSensor: enumSensorCapability,
66980
67137
  eventEmitter: eventEmitterCapability,
@@ -66982,6 +67139,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66982
67139
  featureProbe: featureProbeCapability,
66983
67140
  flood: floodCapability,
66984
67141
  gas: gasCapability,
67142
+ heatingValve: heatingValveCapability,
66985
67143
  humidifier: humidifierCapability,
66986
67144
  humiditySensor: humiditySensorCapability,
66987
67145
  image: imageCapability,
@@ -67707,6 +67865,12 @@ var BaseDeviceProvider = class extends BaseAddon {
67707
67865
  provider: this
67708
67866
  }];
67709
67867
  }
67868
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
67869
+ providerRegistrationsFromSuper(result) {
67870
+ if (Array.isArray(result)) return result;
67871
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
67872
+ return [];
67873
+ }
67710
67874
  async onShutdown() {
67711
67875
  this._restoreShuttingDown = true;
67712
67876
  this.cancelRestoreRetries();
@@ -68237,7 +68401,7 @@ var BaseDeviceProvider = class extends BaseAddon {
68237
68401
  function widenDeviceConstructor(ctor) {
68238
68402
  return ctor;
68239
68403
  }
68240
- 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;
68404
+ 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;
68241
68405
  new Set(Object.values(DeviceType));
68242
68406
  Object.freeze({
68243
68407
  "accessories.getStatus": {
@@ -70658,6 +70822,60 @@ Object.freeze({
70658
70822
  addonId: null,
70659
70823
  access: "view"
70660
70824
  },
70825
+ "dishwasher.getStatus": {
70826
+ capName: "dishwasher",
70827
+ capScope: "device",
70828
+ addonId: null,
70829
+ access: "view"
70830
+ },
70831
+ "dishwasher.pause": {
70832
+ capName: "dishwasher",
70833
+ capScope: "device",
70834
+ addonId: null,
70835
+ access: "create"
70836
+ },
70837
+ "dishwasher.setHalfLoad": {
70838
+ capName: "dishwasher",
70839
+ capScope: "device",
70840
+ addonId: null,
70841
+ access: "create"
70842
+ },
70843
+ "dishwasher.setHygienePlus": {
70844
+ capName: "dishwasher",
70845
+ capScope: "device",
70846
+ addonId: null,
70847
+ access: "create"
70848
+ },
70849
+ "dishwasher.setOption": {
70850
+ capName: "dishwasher",
70851
+ capScope: "device",
70852
+ addonId: null,
70853
+ access: "create"
70854
+ },
70855
+ "dishwasher.setPower": {
70856
+ capName: "dishwasher",
70857
+ capScope: "device",
70858
+ addonId: null,
70859
+ access: "create"
70860
+ },
70861
+ "dishwasher.setProgram": {
70862
+ capName: "dishwasher",
70863
+ capScope: "device",
70864
+ addonId: null,
70865
+ access: "create"
70866
+ },
70867
+ "dishwasher.start": {
70868
+ capName: "dishwasher",
70869
+ capScope: "device",
70870
+ addonId: null,
70871
+ access: "create"
70872
+ },
70873
+ "dishwasher.stop": {
70874
+ capName: "dishwasher",
70875
+ capScope: "device",
70876
+ addonId: null,
70877
+ access: "create"
70878
+ },
70661
70879
  "doorbell.getStatus": {
70662
70880
  capName: "doorbell",
70663
70881
  capScope: "device",
@@ -70868,6 +71086,12 @@ Object.freeze({
70868
71086
  addonId: null,
70869
71087
  access: "view"
70870
71088
  },
71089
+ "heatingValve.getStatus": {
71090
+ capName: "heating-valve",
71091
+ capScope: "device",
71092
+ addonId: null,
71093
+ access: "view"
71094
+ },
70871
71095
  "humidifier.getStatus": {
70872
71096
  capName: "humidifier",
70873
71097
  capScope: "device",
@@ -76455,7 +76679,7 @@ Object.freeze({
76455
76679
  access: "create"
76456
76680
  }
76457
76681
  });
76458
- 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;
76682
+ 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;
76459
76683
  DeviceFeature.BatteryOperated;
76460
76684
  /** Reject after `ms`; always clears its own timer. */
76461
76685
  async function withTimeout$1(promise, ms, label) {
@@ -77497,6 +77721,51 @@ Object.freeze({
77497
77721
  form: "single",
77498
77722
  optional: false
77499
77723
  }],
77724
+ "dishwasher.getStatus": [{
77725
+ name: "deviceId",
77726
+ form: "single",
77727
+ optional: false
77728
+ }],
77729
+ "dishwasher.pause": [{
77730
+ name: "deviceId",
77731
+ form: "single",
77732
+ optional: false
77733
+ }],
77734
+ "dishwasher.setHalfLoad": [{
77735
+ name: "deviceId",
77736
+ form: "single",
77737
+ optional: false
77738
+ }],
77739
+ "dishwasher.setHygienePlus": [{
77740
+ name: "deviceId",
77741
+ form: "single",
77742
+ optional: false
77743
+ }],
77744
+ "dishwasher.setOption": [{
77745
+ name: "deviceId",
77746
+ form: "single",
77747
+ optional: false
77748
+ }],
77749
+ "dishwasher.setPower": [{
77750
+ name: "deviceId",
77751
+ form: "single",
77752
+ optional: false
77753
+ }],
77754
+ "dishwasher.setProgram": [{
77755
+ name: "deviceId",
77756
+ form: "single",
77757
+ optional: false
77758
+ }],
77759
+ "dishwasher.start": [{
77760
+ name: "deviceId",
77761
+ form: "single",
77762
+ optional: false
77763
+ }],
77764
+ "dishwasher.stop": [{
77765
+ name: "deviceId",
77766
+ form: "single",
77767
+ optional: false
77768
+ }],
77500
77769
  "doorbell.getStatus": [{
77501
77770
  name: "deviceId",
77502
77771
  form: "single",
@@ -77566,6 +77835,11 @@ Object.freeze({
77566
77835
  form: "single",
77567
77836
  optional: false
77568
77837
  }],
77838
+ "heatingValve.getStatus": [{
77839
+ name: "deviceId",
77840
+ form: "single",
77841
+ optional: false
77842
+ }],
77569
77843
  "humidifier.getStatus": [{
77570
77844
  name: "deviceId",
77571
77845
  form: "single",
@@ -103167,7 +103441,7 @@ var HikvisionProviderAddon = class extends BaseDeviceProvider {
103167
103441
  throw new Error(`Hikvision: ${reason}`);
103168
103442
  }
103169
103443
  async onInitialize() {
103170
- const regs = await super.onInitialize();
103444
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
103171
103445
  regs.push({
103172
103446
  capability: failureContributionCapability,
103173
103447
  provider: { list: () => intercomFailureReport.list() }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.152",
3
+ "version": "1.2.153",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",