@camstack/addon-import-alexa 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
@@ -5577,7 +5577,7 @@ var ZodIssueCode = {
5577
5577
  var ZodFirstPartyTypeKind;
5578
5578
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5579
5579
  //#endregion
5580
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5580
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5581
5581
  /**
5582
5582
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5583
5583
  * window to float samples (D455).
@@ -8796,7 +8796,7 @@ object({
8796
8796
  params: record(string(), union([string(), number()])).optional()
8797
8797
  });
8798
8798
  //#endregion
8799
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8799
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8800
8800
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8801
8801
  DeviceType["Camera"] = "camera";
8802
8802
  DeviceType["Hub"] = "hub";
@@ -8888,6 +8888,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8888
8888
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8889
8889
  * integrations sharing the same food/desiccant/hopper surface. */
8890
8890
  DeviceType["PetFeeder"] = "pet-feeder";
8891
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8892
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8893
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8894
+ DeviceType["Dishwasher"] = "dishwasher";
8891
8895
  return DeviceType;
8892
8896
  }({});
8893
8897
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -9145,7 +9149,7 @@ function errMsg(err) {
9145
9149
  return String(err);
9146
9150
  }
9147
9151
  //#endregion
9148
- //#region ../types/dist/composition-DOwQB_Ua.mjs
9152
+ //#region ../types/dist/composition-CB6PMT9p.mjs
9149
9153
  /**
9150
9154
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9151
9155
  *
@@ -13667,8 +13671,13 @@ var AlertSeveritySchema = _enum([
13667
13671
  "info",
13668
13672
  "success",
13669
13673
  "warning",
13670
- "error"
13674
+ "error",
13675
+ "critical"
13671
13676
  ]);
13677
+ var AlertActionSchema = object({
13678
+ label: string(),
13679
+ href: string().optional()
13680
+ });
13672
13681
  var AlertStatusSchema = _enum([
13673
13682
  "active",
13674
13683
  "in-progress",
@@ -13686,6 +13695,7 @@ var AlertSchema = object({
13686
13695
  severity: AlertSeveritySchema,
13687
13696
  title: string(),
13688
13697
  message: string(),
13698
+ action: AlertActionSchema.optional(),
13689
13699
  status: AlertStatusSchema,
13690
13700
  progress: number().optional(),
13691
13701
  read: boolean(),
@@ -54293,7 +54303,8 @@ var batteryCapability = {
54293
54303
  DeviceType.Button,
54294
54304
  DeviceType.Switch,
54295
54305
  DeviceType.PetFeeder,
54296
- DeviceType.Container
54306
+ DeviceType.Container,
54307
+ DeviceType.Thermostat
54297
54308
  ],
54298
54309
  methods: {
54299
54310
  /**
@@ -55783,6 +55794,125 @@ onStatusChanged: { data: object({
55783
55794
  * whether persisting is worth a SQLite commit. */
55784
55795
  volatileStateFields: ["lastChangedAt"]
55785
55796
  };
55797
+ /**
55798
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55799
+ * consumable levels (salt, rinse aid) and common program options.
55800
+ *
55801
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55802
+ * by any integration that exposes the same program / option surface.
55803
+ *
55804
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55805
+ * provider refreshes the slice on an interval and eagerly after commands.
55806
+ */
55807
+ var DishwasherStateSchema = _enum([
55808
+ "idle",
55809
+ "running",
55810
+ "paused",
55811
+ "finished",
55812
+ "error",
55813
+ "unavailable"
55814
+ ]);
55815
+ var DishwasherConsumableLevelSchema = _enum([
55816
+ "ok",
55817
+ "low",
55818
+ "empty"
55819
+ ]);
55820
+ var DishwasherStatusSchema = object({
55821
+ state: DishwasherStateSchema,
55822
+ /** Active program id/name, or null when none selected / unknown. */
55823
+ program: string().nullable(),
55824
+ /** Program tokens the hardware accepts — drives the UI selector. */
55825
+ availablePrograms: array(string()),
55826
+ /** Minutes remaining on the active cycle, or null when not running. */
55827
+ remainingMinutes: number().int().nonnegative().nullable(),
55828
+ /** Cycle completion 0..100, or null when not applicable. */
55829
+ progressPercent: number().min(0).max(100).nullable(),
55830
+ /** True when the door is reported open. */
55831
+ doorOpen: boolean(),
55832
+ /** True when remote start is allowed (door closed, power on, etc.). */
55833
+ remoteStartAllowed: boolean(),
55834
+ /** Main power / switched-on state. */
55835
+ powerOn: boolean(),
55836
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55837
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55838
+ halfLoad: boolean(),
55839
+ hygienePlus: boolean(),
55840
+ errorCode: number().nullable(),
55841
+ errorLabel: string().nullable(),
55842
+ lastFetchedAt: number()
55843
+ });
55844
+ var dishwasherCapability = {
55845
+ name: "dishwasher",
55846
+ scope: "device",
55847
+ deviceNative: true,
55848
+ mode: "singleton",
55849
+ deviceTypes: [DeviceType.Dishwasher],
55850
+ methods: {
55851
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55852
+ kind: "mutation",
55853
+ auth: "protected"
55854
+ }),
55855
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55856
+ kind: "mutation",
55857
+ auth: "protected"
55858
+ }),
55859
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55860
+ kind: "mutation",
55861
+ auth: "protected"
55862
+ }),
55863
+ setProgram: method(object({
55864
+ deviceId: number().int().nonnegative(),
55865
+ program: string().min(1)
55866
+ }), _void(), {
55867
+ kind: "mutation",
55868
+ auth: "protected"
55869
+ }),
55870
+ setPower: method(object({
55871
+ deviceId: number().int().nonnegative(),
55872
+ on: boolean()
55873
+ }), _void(), {
55874
+ kind: "mutation",
55875
+ auth: "protected"
55876
+ }),
55877
+ setHalfLoad: method(object({
55878
+ deviceId: number().int().nonnegative(),
55879
+ on: boolean()
55880
+ }), _void(), {
55881
+ kind: "mutation",
55882
+ auth: "protected"
55883
+ }),
55884
+ setHygienePlus: method(object({
55885
+ deviceId: number().int().nonnegative(),
55886
+ on: boolean()
55887
+ }), _void(), {
55888
+ kind: "mutation",
55889
+ auth: "protected"
55890
+ }),
55891
+ setOption: method(object({
55892
+ deviceId: number().int().nonnegative(),
55893
+ key: string().min(1),
55894
+ value: union([
55895
+ boolean(),
55896
+ string(),
55897
+ number()
55898
+ ])
55899
+ }), _void(), {
55900
+ kind: "mutation",
55901
+ auth: "protected"
55902
+ })
55903
+ },
55904
+ status: {
55905
+ schema: DishwasherStatusSchema,
55906
+ kind: "poll"
55907
+ },
55908
+ runtimeState: DishwasherStatusSchema,
55909
+ durability: "session",
55910
+ history: { fields: { progressPercent: {
55911
+ kind: "gauge",
55912
+ unit: "%",
55913
+ deadband: 2
55914
+ } } }
55915
+ };
55786
55916
  var DoorbellStatusSchema = object({
55787
55917
  /** Ms epoch of the last press. null = never observed since this provider started. */
55788
55918
  lastPressedAt: number().nullable(),
@@ -56585,6 +56715,32 @@ var gasCapability = {
56585
56715
  * whether persisting is worth a SQLite commit. */
56586
56716
  volatileStateFields: ["lastChangedAt"]
56587
56717
  };
56718
+ var HeatingValveStatusSchema = object({
56719
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56720
+ position: number().min(0).max(100).nullable(),
56721
+ /** Ms epoch when the slice was last updated (push or poll). */
56722
+ lastFetchedAt: number()
56723
+ });
56724
+ var heatingValveCapability = {
56725
+ name: "heating-valve",
56726
+ scope: "device",
56727
+ deviceNative: true,
56728
+ mode: "singleton",
56729
+ deviceTypes: [DeviceType.Thermostat],
56730
+ methods: {},
56731
+ status: {
56732
+ schema: HeatingValveStatusSchema,
56733
+ kind: "push"
56734
+ },
56735
+ runtimeState: HeatingValveStatusSchema,
56736
+ durability: "session",
56737
+ history: { fields: { position: {
56738
+ kind: "gauge",
56739
+ unit: "%",
56740
+ deadband: 1
56741
+ } } },
56742
+ volatileStateFields: ["lastFetchedAt"]
56743
+ };
56588
56744
  /**
56589
56745
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56590
56746
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -66005,6 +66161,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66005
66161
  dayNight: dayNightCapability,
66006
66162
  deviceDiscovery: deviceDiscoveryCapability,
66007
66163
  deviceStatus: deviceStatusCapability,
66164
+ dishwasher: dishwasherCapability,
66008
66165
  doorbell: doorbellCapability,
66009
66166
  enumSensor: enumSensorCapability,
66010
66167
  eventEmitter: eventEmitterCapability,
@@ -66012,6 +66169,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66012
66169
  featureProbe: featureProbeCapability,
66013
66170
  flood: floodCapability,
66014
66171
  gas: gasCapability,
66172
+ heatingValve: heatingValveCapability,
66015
66173
  humidifier: humidifierCapability,
66016
66174
  humiditySensor: humiditySensorCapability,
66017
66175
  image: imageCapability,
@@ -66737,6 +66895,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66737
66895
  provider: this
66738
66896
  }];
66739
66897
  }
66898
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66899
+ providerRegistrationsFromSuper(result) {
66900
+ if (Array.isArray(result)) return result;
66901
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66902
+ return [];
66903
+ }
66740
66904
  async onShutdown() {
66741
66905
  this._restoreShuttingDown = true;
66742
66906
  this.cancelRestoreRetries();
@@ -67263,7 +67427,7 @@ var BaseDeviceProvider = class extends BaseAddon {
67263
67427
  return toDeviceSummary(device, this.addonId);
67264
67428
  }
67265
67429
  };
67266
- 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;
67430
+ 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;
67267
67431
  new Set(Object.values(DeviceType));
67268
67432
  Object.freeze({
67269
67433
  "accessories.getStatus": {
@@ -69684,6 +69848,60 @@ Object.freeze({
69684
69848
  addonId: null,
69685
69849
  access: "view"
69686
69850
  },
69851
+ "dishwasher.getStatus": {
69852
+ capName: "dishwasher",
69853
+ capScope: "device",
69854
+ addonId: null,
69855
+ access: "view"
69856
+ },
69857
+ "dishwasher.pause": {
69858
+ capName: "dishwasher",
69859
+ capScope: "device",
69860
+ addonId: null,
69861
+ access: "create"
69862
+ },
69863
+ "dishwasher.setHalfLoad": {
69864
+ capName: "dishwasher",
69865
+ capScope: "device",
69866
+ addonId: null,
69867
+ access: "create"
69868
+ },
69869
+ "dishwasher.setHygienePlus": {
69870
+ capName: "dishwasher",
69871
+ capScope: "device",
69872
+ addonId: null,
69873
+ access: "create"
69874
+ },
69875
+ "dishwasher.setOption": {
69876
+ capName: "dishwasher",
69877
+ capScope: "device",
69878
+ addonId: null,
69879
+ access: "create"
69880
+ },
69881
+ "dishwasher.setPower": {
69882
+ capName: "dishwasher",
69883
+ capScope: "device",
69884
+ addonId: null,
69885
+ access: "create"
69886
+ },
69887
+ "dishwasher.setProgram": {
69888
+ capName: "dishwasher",
69889
+ capScope: "device",
69890
+ addonId: null,
69891
+ access: "create"
69892
+ },
69893
+ "dishwasher.start": {
69894
+ capName: "dishwasher",
69895
+ capScope: "device",
69896
+ addonId: null,
69897
+ access: "create"
69898
+ },
69899
+ "dishwasher.stop": {
69900
+ capName: "dishwasher",
69901
+ capScope: "device",
69902
+ addonId: null,
69903
+ access: "create"
69904
+ },
69687
69905
  "doorbell.getStatus": {
69688
69906
  capName: "doorbell",
69689
69907
  capScope: "device",
@@ -69894,6 +70112,12 @@ Object.freeze({
69894
70112
  addonId: null,
69895
70113
  access: "view"
69896
70114
  },
70115
+ "heatingValve.getStatus": {
70116
+ capName: "heating-valve",
70117
+ capScope: "device",
70118
+ addonId: null,
70119
+ access: "view"
70120
+ },
69897
70121
  "humidifier.getStatus": {
69898
70122
  capName: "humidifier",
69899
70123
  capScope: "device",
@@ -75481,7 +75705,7 @@ Object.freeze({
75481
75705
  access: "create"
75482
75706
  }
75483
75707
  });
75484
- 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;
75708
+ 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;
75485
75709
  DeviceFeature.BatteryOperated;
75486
75710
  Object.freeze({
75487
75711
  "accessories.getStatus": [{
@@ -76305,6 +76529,51 @@ Object.freeze({
76305
76529
  form: "single",
76306
76530
  optional: false
76307
76531
  }],
76532
+ "dishwasher.getStatus": [{
76533
+ name: "deviceId",
76534
+ form: "single",
76535
+ optional: false
76536
+ }],
76537
+ "dishwasher.pause": [{
76538
+ name: "deviceId",
76539
+ form: "single",
76540
+ optional: false
76541
+ }],
76542
+ "dishwasher.setHalfLoad": [{
76543
+ name: "deviceId",
76544
+ form: "single",
76545
+ optional: false
76546
+ }],
76547
+ "dishwasher.setHygienePlus": [{
76548
+ name: "deviceId",
76549
+ form: "single",
76550
+ optional: false
76551
+ }],
76552
+ "dishwasher.setOption": [{
76553
+ name: "deviceId",
76554
+ form: "single",
76555
+ optional: false
76556
+ }],
76557
+ "dishwasher.setPower": [{
76558
+ name: "deviceId",
76559
+ form: "single",
76560
+ optional: false
76561
+ }],
76562
+ "dishwasher.setProgram": [{
76563
+ name: "deviceId",
76564
+ form: "single",
76565
+ optional: false
76566
+ }],
76567
+ "dishwasher.start": [{
76568
+ name: "deviceId",
76569
+ form: "single",
76570
+ optional: false
76571
+ }],
76572
+ "dishwasher.stop": [{
76573
+ name: "deviceId",
76574
+ form: "single",
76575
+ optional: false
76576
+ }],
76308
76577
  "doorbell.getStatus": [{
76309
76578
  name: "deviceId",
76310
76579
  form: "single",
@@ -76374,6 +76643,11 @@ Object.freeze({
76374
76643
  form: "single",
76375
76644
  optional: false
76376
76645
  }],
76646
+ "heatingValve.getStatus": [{
76647
+ name: "deviceId",
76648
+ form: "single",
76649
+ optional: false
76650
+ }],
76377
76651
  "humidifier.getStatus": [{
76378
76652
  name: "deviceId",
76379
76653
  form: "single",
@@ -122872,7 +123146,7 @@ var AlexaImportAddon = class extends BaseDeviceProvider {
122872
123146
  super({ ...DEFAULTS });
122873
123147
  }
122874
123148
  async onInitialize() {
122875
- const regs = await super.onInitialize();
123149
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
122876
123150
  const records = this.ctx.records;
122877
123151
  if (records === void 0) throw new Error("import-alexa: ctx.records is required (hub-only addon)");
122878
123152
  await records.declare({ brokers: alexaBrokersEntryKind });
package/dist/addon.mjs CHANGED
@@ -5577,7 +5577,7 @@ var ZodIssueCode = {
5577
5577
  var ZodFirstPartyTypeKind;
5578
5578
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5579
5579
  //#endregion
5580
- //#region ../types/dist/sleep-bZIhUvjd.mjs
5580
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5581
5581
  /**
5582
5582
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5583
5583
  * window to float samples (D455).
@@ -8796,7 +8796,7 @@ object({
8796
8796
  params: record(string(), union([string(), number()])).optional()
8797
8797
  });
8798
8798
  //#endregion
8799
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8799
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8800
8800
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8801
8801
  DeviceType["Camera"] = "camera";
8802
8802
  DeviceType["Hub"] = "hub";
@@ -8888,6 +8888,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8888
8888
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8889
8889
  * integrations sharing the same food/desiccant/hopper surface. */
8890
8890
  DeviceType["PetFeeder"] = "pet-feeder";
8891
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8892
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8893
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8894
+ DeviceType["Dishwasher"] = "dishwasher";
8891
8895
  return DeviceType;
8892
8896
  }({});
8893
8897
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -9145,7 +9149,7 @@ function errMsg(err) {
9145
9149
  return String(err);
9146
9150
  }
9147
9151
  //#endregion
9148
- //#region ../types/dist/composition-DOwQB_Ua.mjs
9152
+ //#region ../types/dist/composition-CB6PMT9p.mjs
9149
9153
  /**
9150
9154
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9151
9155
  *
@@ -13667,8 +13671,13 @@ var AlertSeveritySchema = _enum([
13667
13671
  "info",
13668
13672
  "success",
13669
13673
  "warning",
13670
- "error"
13674
+ "error",
13675
+ "critical"
13671
13676
  ]);
13677
+ var AlertActionSchema = object({
13678
+ label: string(),
13679
+ href: string().optional()
13680
+ });
13672
13681
  var AlertStatusSchema = _enum([
13673
13682
  "active",
13674
13683
  "in-progress",
@@ -13686,6 +13695,7 @@ var AlertSchema = object({
13686
13695
  severity: AlertSeveritySchema,
13687
13696
  title: string(),
13688
13697
  message: string(),
13698
+ action: AlertActionSchema.optional(),
13689
13699
  status: AlertStatusSchema,
13690
13700
  progress: number().optional(),
13691
13701
  read: boolean(),
@@ -54293,7 +54303,8 @@ var batteryCapability = {
54293
54303
  DeviceType.Button,
54294
54304
  DeviceType.Switch,
54295
54305
  DeviceType.PetFeeder,
54296
- DeviceType.Container
54306
+ DeviceType.Container,
54307
+ DeviceType.Thermostat
54297
54308
  ],
54298
54309
  methods: {
54299
54310
  /**
@@ -55783,6 +55794,125 @@ onStatusChanged: { data: object({
55783
55794
  * whether persisting is worth a SQLite commit. */
55784
55795
  volatileStateFields: ["lastChangedAt"]
55785
55796
  };
55797
+ /**
55798
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55799
+ * consumable levels (salt, rinse aid) and common program options.
55800
+ *
55801
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55802
+ * by any integration that exposes the same program / option surface.
55803
+ *
55804
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55805
+ * provider refreshes the slice on an interval and eagerly after commands.
55806
+ */
55807
+ var DishwasherStateSchema = _enum([
55808
+ "idle",
55809
+ "running",
55810
+ "paused",
55811
+ "finished",
55812
+ "error",
55813
+ "unavailable"
55814
+ ]);
55815
+ var DishwasherConsumableLevelSchema = _enum([
55816
+ "ok",
55817
+ "low",
55818
+ "empty"
55819
+ ]);
55820
+ var DishwasherStatusSchema = object({
55821
+ state: DishwasherStateSchema,
55822
+ /** Active program id/name, or null when none selected / unknown. */
55823
+ program: string().nullable(),
55824
+ /** Program tokens the hardware accepts — drives the UI selector. */
55825
+ availablePrograms: array(string()),
55826
+ /** Minutes remaining on the active cycle, or null when not running. */
55827
+ remainingMinutes: number().int().nonnegative().nullable(),
55828
+ /** Cycle completion 0..100, or null when not applicable. */
55829
+ progressPercent: number().min(0).max(100).nullable(),
55830
+ /** True when the door is reported open. */
55831
+ doorOpen: boolean(),
55832
+ /** True when remote start is allowed (door closed, power on, etc.). */
55833
+ remoteStartAllowed: boolean(),
55834
+ /** Main power / switched-on state. */
55835
+ powerOn: boolean(),
55836
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55837
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55838
+ halfLoad: boolean(),
55839
+ hygienePlus: boolean(),
55840
+ errorCode: number().nullable(),
55841
+ errorLabel: string().nullable(),
55842
+ lastFetchedAt: number()
55843
+ });
55844
+ var dishwasherCapability = {
55845
+ name: "dishwasher",
55846
+ scope: "device",
55847
+ deviceNative: true,
55848
+ mode: "singleton",
55849
+ deviceTypes: [DeviceType.Dishwasher],
55850
+ methods: {
55851
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55852
+ kind: "mutation",
55853
+ auth: "protected"
55854
+ }),
55855
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55856
+ kind: "mutation",
55857
+ auth: "protected"
55858
+ }),
55859
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55860
+ kind: "mutation",
55861
+ auth: "protected"
55862
+ }),
55863
+ setProgram: method(object({
55864
+ deviceId: number().int().nonnegative(),
55865
+ program: string().min(1)
55866
+ }), _void(), {
55867
+ kind: "mutation",
55868
+ auth: "protected"
55869
+ }),
55870
+ setPower: method(object({
55871
+ deviceId: number().int().nonnegative(),
55872
+ on: boolean()
55873
+ }), _void(), {
55874
+ kind: "mutation",
55875
+ auth: "protected"
55876
+ }),
55877
+ setHalfLoad: method(object({
55878
+ deviceId: number().int().nonnegative(),
55879
+ on: boolean()
55880
+ }), _void(), {
55881
+ kind: "mutation",
55882
+ auth: "protected"
55883
+ }),
55884
+ setHygienePlus: method(object({
55885
+ deviceId: number().int().nonnegative(),
55886
+ on: boolean()
55887
+ }), _void(), {
55888
+ kind: "mutation",
55889
+ auth: "protected"
55890
+ }),
55891
+ setOption: method(object({
55892
+ deviceId: number().int().nonnegative(),
55893
+ key: string().min(1),
55894
+ value: union([
55895
+ boolean(),
55896
+ string(),
55897
+ number()
55898
+ ])
55899
+ }), _void(), {
55900
+ kind: "mutation",
55901
+ auth: "protected"
55902
+ })
55903
+ },
55904
+ status: {
55905
+ schema: DishwasherStatusSchema,
55906
+ kind: "poll"
55907
+ },
55908
+ runtimeState: DishwasherStatusSchema,
55909
+ durability: "session",
55910
+ history: { fields: { progressPercent: {
55911
+ kind: "gauge",
55912
+ unit: "%",
55913
+ deadband: 2
55914
+ } } }
55915
+ };
55786
55916
  var DoorbellStatusSchema = object({
55787
55917
  /** Ms epoch of the last press. null = never observed since this provider started. */
55788
55918
  lastPressedAt: number().nullable(),
@@ -56585,6 +56715,32 @@ var gasCapability = {
56585
56715
  * whether persisting is worth a SQLite commit. */
56586
56716
  volatileStateFields: ["lastChangedAt"]
56587
56717
  };
56718
+ var HeatingValveStatusSchema = object({
56719
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56720
+ position: number().min(0).max(100).nullable(),
56721
+ /** Ms epoch when the slice was last updated (push or poll). */
56722
+ lastFetchedAt: number()
56723
+ });
56724
+ var heatingValveCapability = {
56725
+ name: "heating-valve",
56726
+ scope: "device",
56727
+ deviceNative: true,
56728
+ mode: "singleton",
56729
+ deviceTypes: [DeviceType.Thermostat],
56730
+ methods: {},
56731
+ status: {
56732
+ schema: HeatingValveStatusSchema,
56733
+ kind: "push"
56734
+ },
56735
+ runtimeState: HeatingValveStatusSchema,
56736
+ durability: "session",
56737
+ history: { fields: { position: {
56738
+ kind: "gauge",
56739
+ unit: "%",
56740
+ deadband: 1
56741
+ } } },
56742
+ volatileStateFields: ["lastFetchedAt"]
56743
+ };
56588
56744
  /**
56589
56745
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56590
56746
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -66005,6 +66161,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66005
66161
  dayNight: dayNightCapability,
66006
66162
  deviceDiscovery: deviceDiscoveryCapability,
66007
66163
  deviceStatus: deviceStatusCapability,
66164
+ dishwasher: dishwasherCapability,
66008
66165
  doorbell: doorbellCapability,
66009
66166
  enumSensor: enumSensorCapability,
66010
66167
  eventEmitter: eventEmitterCapability,
@@ -66012,6 +66169,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
66012
66169
  featureProbe: featureProbeCapability,
66013
66170
  flood: floodCapability,
66014
66171
  gas: gasCapability,
66172
+ heatingValve: heatingValveCapability,
66015
66173
  humidifier: humidifierCapability,
66016
66174
  humiditySensor: humiditySensorCapability,
66017
66175
  image: imageCapability,
@@ -66737,6 +66895,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66737
66895
  provider: this
66738
66896
  }];
66739
66897
  }
66898
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66899
+ providerRegistrationsFromSuper(result) {
66900
+ if (Array.isArray(result)) return result;
66901
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66902
+ return [];
66903
+ }
66740
66904
  async onShutdown() {
66741
66905
  this._restoreShuttingDown = true;
66742
66906
  this.cancelRestoreRetries();
@@ -67263,7 +67427,7 @@ var BaseDeviceProvider = class extends BaseAddon {
67263
67427
  return toDeviceSummary(device, this.addonId);
67264
67428
  }
67265
67429
  };
67266
- 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;
67430
+ 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;
67267
67431
  new Set(Object.values(DeviceType));
67268
67432
  Object.freeze({
67269
67433
  "accessories.getStatus": {
@@ -69684,6 +69848,60 @@ Object.freeze({
69684
69848
  addonId: null,
69685
69849
  access: "view"
69686
69850
  },
69851
+ "dishwasher.getStatus": {
69852
+ capName: "dishwasher",
69853
+ capScope: "device",
69854
+ addonId: null,
69855
+ access: "view"
69856
+ },
69857
+ "dishwasher.pause": {
69858
+ capName: "dishwasher",
69859
+ capScope: "device",
69860
+ addonId: null,
69861
+ access: "create"
69862
+ },
69863
+ "dishwasher.setHalfLoad": {
69864
+ capName: "dishwasher",
69865
+ capScope: "device",
69866
+ addonId: null,
69867
+ access: "create"
69868
+ },
69869
+ "dishwasher.setHygienePlus": {
69870
+ capName: "dishwasher",
69871
+ capScope: "device",
69872
+ addonId: null,
69873
+ access: "create"
69874
+ },
69875
+ "dishwasher.setOption": {
69876
+ capName: "dishwasher",
69877
+ capScope: "device",
69878
+ addonId: null,
69879
+ access: "create"
69880
+ },
69881
+ "dishwasher.setPower": {
69882
+ capName: "dishwasher",
69883
+ capScope: "device",
69884
+ addonId: null,
69885
+ access: "create"
69886
+ },
69887
+ "dishwasher.setProgram": {
69888
+ capName: "dishwasher",
69889
+ capScope: "device",
69890
+ addonId: null,
69891
+ access: "create"
69892
+ },
69893
+ "dishwasher.start": {
69894
+ capName: "dishwasher",
69895
+ capScope: "device",
69896
+ addonId: null,
69897
+ access: "create"
69898
+ },
69899
+ "dishwasher.stop": {
69900
+ capName: "dishwasher",
69901
+ capScope: "device",
69902
+ addonId: null,
69903
+ access: "create"
69904
+ },
69687
69905
  "doorbell.getStatus": {
69688
69906
  capName: "doorbell",
69689
69907
  capScope: "device",
@@ -69894,6 +70112,12 @@ Object.freeze({
69894
70112
  addonId: null,
69895
70113
  access: "view"
69896
70114
  },
70115
+ "heatingValve.getStatus": {
70116
+ capName: "heating-valve",
70117
+ capScope: "device",
70118
+ addonId: null,
70119
+ access: "view"
70120
+ },
69897
70121
  "humidifier.getStatus": {
69898
70122
  capName: "humidifier",
69899
70123
  capScope: "device",
@@ -75481,7 +75705,7 @@ Object.freeze({
75481
75705
  access: "create"
75482
75706
  }
75483
75707
  });
75484
- 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;
75708
+ 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;
75485
75709
  DeviceFeature.BatteryOperated;
75486
75710
  Object.freeze({
75487
75711
  "accessories.getStatus": [{
@@ -76305,6 +76529,51 @@ Object.freeze({
76305
76529
  form: "single",
76306
76530
  optional: false
76307
76531
  }],
76532
+ "dishwasher.getStatus": [{
76533
+ name: "deviceId",
76534
+ form: "single",
76535
+ optional: false
76536
+ }],
76537
+ "dishwasher.pause": [{
76538
+ name: "deviceId",
76539
+ form: "single",
76540
+ optional: false
76541
+ }],
76542
+ "dishwasher.setHalfLoad": [{
76543
+ name: "deviceId",
76544
+ form: "single",
76545
+ optional: false
76546
+ }],
76547
+ "dishwasher.setHygienePlus": [{
76548
+ name: "deviceId",
76549
+ form: "single",
76550
+ optional: false
76551
+ }],
76552
+ "dishwasher.setOption": [{
76553
+ name: "deviceId",
76554
+ form: "single",
76555
+ optional: false
76556
+ }],
76557
+ "dishwasher.setPower": [{
76558
+ name: "deviceId",
76559
+ form: "single",
76560
+ optional: false
76561
+ }],
76562
+ "dishwasher.setProgram": [{
76563
+ name: "deviceId",
76564
+ form: "single",
76565
+ optional: false
76566
+ }],
76567
+ "dishwasher.start": [{
76568
+ name: "deviceId",
76569
+ form: "single",
76570
+ optional: false
76571
+ }],
76572
+ "dishwasher.stop": [{
76573
+ name: "deviceId",
76574
+ form: "single",
76575
+ optional: false
76576
+ }],
76308
76577
  "doorbell.getStatus": [{
76309
76578
  name: "deviceId",
76310
76579
  form: "single",
@@ -76374,6 +76643,11 @@ Object.freeze({
76374
76643
  form: "single",
76375
76644
  optional: false
76376
76645
  }],
76646
+ "heatingValve.getStatus": [{
76647
+ name: "deviceId",
76648
+ form: "single",
76649
+ optional: false
76650
+ }],
76377
76651
  "humidifier.getStatus": [{
76378
76652
  name: "deviceId",
76379
76653
  form: "single",
@@ -122872,7 +123146,7 @@ var AlexaImportAddon = class extends BaseDeviceProvider {
122872
123146
  super({ ...DEFAULTS });
122873
123147
  }
122874
123148
  async onInitialize() {
122875
- const regs = await super.onInitialize();
123149
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
122876
123150
  const records = this.ctx.records;
122877
123151
  if (records === void 0) throw new Error("import-alexa: ctx.records is required (hub-only addon)");
122878
123152
  await records.declare({ brokers: alexaBrokersEntryKind });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.127",
3
+ "version": "0.2.128",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",