@camstack/addon-provider-homeassistant 1.1.7 → 1.1.8

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
@@ -10109,15 +10109,18 @@ var humiditySensorCapability = {
10109
10109
  runtimeState: HumiditySensorStatusSchema
10110
10110
  };
10111
10111
  /**
10112
- * Image display cap. Models HA `image.*` entities a single still image
10113
- * exposed by an integration (a snapshot, a chart, a generated picture).
10114
- *
10115
- * Read-only: there are no setters. The provider resolves the HA
10116
- * `entity_picture` (a relative, signed-token path) into an ABSOLUTE URL
10117
- * the browser loads directly the token stays in the query string so no
10118
- * auth header is required. The slice carries that URL plus the upstream
10119
- * last-updated timestamp; the image changes when the entity state (a
10120
- * timestamp) changes.
10112
+ * Image display cap. Models a single still image exposed by an integration
10113
+ * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
10114
+ *
10115
+ * Read-only: there are no setters. The provider resolves whatever upstream
10116
+ * source it has into an ABSOLUTE URL the browser loads directly:
10117
+ * - HA `image.*` entities the `entity_picture` signed-token path
10118
+ * (token stays in the query string, so no auth header is needed);
10119
+ * - a Dreame/robot map the cloud/OSS map-image URL (or an addon
10120
+ * data-plane URL serving the rendered map bytes), exposed as its own
10121
+ * Image child device grouped under the robot's container.
10122
+ * The slice carries that URL plus the upstream last-updated timestamp; the
10123
+ * image changes when the source's last-updated marker changes.
10121
10124
  */
10122
10125
  var ImageStatusSchema = object({
10123
10126
  /** Absolute signed URL the browser loads directly. Null when the
@@ -10143,18 +10146,47 @@ var imageCapability = {
10143
10146
  */
10144
10147
  runtimeState: ImageStatusSchema
10145
10148
  };
10149
+ /**
10150
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
10151
+ * with a mowing lifecycle plus a dock action.
10152
+ *
10153
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
10154
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
10155
+ * nullable — some mowers don't report a battery percentage.
10156
+ *
10157
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
10158
+ * `dock` sends the mower back to its charging station.
10159
+ */
10160
+ var LawnMowerActivitySchema = _enum([
10161
+ "idle",
10162
+ "mowing",
10163
+ "paused",
10164
+ "docked",
10165
+ "error"
10166
+ ]);
10167
+ /** Severity of the current device/error code — info (status), warning, error. */
10168
+ var DeviceCodeSeveritySchema = _enum([
10169
+ "info",
10170
+ "warning",
10171
+ "error"
10172
+ ]);
10146
10173
  var LawnMowerControlStatusSchema = object({
10147
10174
  /** Lifecycle activity of the mower. */
10148
- activity: _enum([
10149
- "idle",
10150
- "mowing",
10151
- "paused",
10152
- "docked",
10153
- "error"
10154
- ]),
10175
+ activity: LawnMowerActivitySchema,
10155
10176
  /** 0..100 battery percentage. Null when the device has no battery
10156
10177
  * reading. */
10157
10178
  batteryLevel: number().min(0).max(100).nullable(),
10179
+ /** 0..100 mowing-completion percentage of the current task, or null when no
10180
+ * task is active / progress is unavailable. */
10181
+ progressPercent: number().min(0).max(100).nullable(),
10182
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
10183
+ * or null when unknown. */
10184
+ currentCode: number().nullable(),
10185
+ /** Human label for {@link currentCode}, or null when undecodable. */
10186
+ currentCodeLabel: string().nullable(),
10187
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
10188
+ * attention; `info` is normal status. */
10189
+ severity: DeviceCodeSeveritySchema,
10158
10190
  /** Ms epoch when the slice was last updated. */
10159
10191
  lastChangedAt: number()
10160
10192
  });
@@ -12380,6 +12412,7 @@ var VacuumStateSchema = _enum([
12380
12412
  "paused",
12381
12413
  "returning",
12382
12414
  "docked",
12415
+ "drying",
12383
12416
  "error"
12384
12417
  ]);
12385
12418
  /**
@@ -12418,6 +12451,12 @@ var VacuumControlStatusSchema = object({
12418
12451
  detergent: TankStatusSchema.nullable(),
12419
12452
  /** Dust bin. Null when the hardware has no dust bin. */
12420
12453
  dustBin: TankStatusSchema.nullable(),
12454
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
12455
+ progressPercent: number().min(0).max(100).nullable(),
12456
+ /** Current error code (0 / null = no error). */
12457
+ errorCode: number().nullable(),
12458
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
12459
+ errorLabel: string().nullable(),
12421
12460
  /** Ms epoch when the slice was last updated. */
12422
12461
  lastChangedAt: number()
12423
12462
  });
@@ -16933,6 +16972,9 @@ method(object({
16933
16972
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
16934
16973
  kind: "mutation",
16935
16974
  auth: "admin"
16975
+ }), method(ResyncInputSchema, ResyncResultSchema, {
16976
+ kind: "mutation",
16977
+ auth: "admin"
16936
16978
  }), method(object({
16937
16979
  deviceId: number(),
16938
16980
  key: string(),
@@ -20784,6 +20826,12 @@ Object.freeze({
20784
20826
  addonId: null,
20785
20827
  access: "create"
20786
20828
  },
20829
+ "deviceManager.adoptionResync": {
20830
+ capName: "device-manager",
20831
+ capScope: "system",
20832
+ addonId: null,
20833
+ access: "create"
20834
+ },
20787
20835
  "deviceManager.allocateDeviceId": {
20788
20836
  capName: "device-manager",
20789
20837
  capScope: "system",
@@ -27481,6 +27529,9 @@ var COLD_START$12 = {
27481
27529
  dirtyWater: null,
27482
27530
  detergent: null,
27483
27531
  dustBin: null,
27532
+ progressPercent: null,
27533
+ errorCode: null,
27534
+ errorLabel: null,
27484
27535
  lastChangedAt: 0
27485
27536
  };
27486
27537
  /**
@@ -27517,6 +27568,9 @@ var HaVacuumDevice = class extends HaBaseChildDevice {
27517
27568
  dirtyWater: null,
27518
27569
  detergent: null,
27519
27570
  dustBin: null,
27571
+ progressPercent: null,
27572
+ errorCode: null,
27573
+ errorLabel: lifecycleState === "error" ? readStringAttr$3(state.attributes, "error") : null,
27520
27574
  lastChangedAt
27521
27575
  });
27522
27576
  }
@@ -27573,6 +27627,10 @@ function readStringArrayAttr(attrs, key) {
27573
27627
  var COLD_START$11 = {
27574
27628
  activity: "idle",
27575
27629
  batteryLevel: null,
27630
+ progressPercent: null,
27631
+ currentCode: null,
27632
+ currentCodeLabel: null,
27633
+ severity: "info",
27576
27634
  lastChangedAt: 0
27577
27635
  };
27578
27636
  /**
@@ -27598,6 +27656,10 @@ var HaLawnMowerDevice = class extends HaBaseChildDevice {
27598
27656
  this.runtimeState.setCapState("lawn-mower-control", {
27599
27657
  activity,
27600
27658
  batteryLevel,
27659
+ progressPercent: readNumericAttr$1(state.attributes, "mowing_progress"),
27660
+ currentCode: null,
27661
+ currentCodeLabel: null,
27662
+ severity: activity === "error" ? "error" : "info",
27601
27663
  lastChangedAt
27602
27664
  });
27603
27665
  }
package/dist/addon.mjs CHANGED
@@ -10108,15 +10108,18 @@ var humiditySensorCapability = {
10108
10108
  runtimeState: HumiditySensorStatusSchema
10109
10109
  };
10110
10110
  /**
10111
- * Image display cap. Models HA `image.*` entities a single still image
10112
- * exposed by an integration (a snapshot, a chart, a generated picture).
10113
- *
10114
- * Read-only: there are no setters. The provider resolves the HA
10115
- * `entity_picture` (a relative, signed-token path) into an ABSOLUTE URL
10116
- * the browser loads directly the token stays in the query string so no
10117
- * auth header is required. The slice carries that URL plus the upstream
10118
- * last-updated timestamp; the image changes when the entity state (a
10119
- * timestamp) changes.
10111
+ * Image display cap. Models a single still image exposed by an integration
10112
+ * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
10113
+ *
10114
+ * Read-only: there are no setters. The provider resolves whatever upstream
10115
+ * source it has into an ABSOLUTE URL the browser loads directly:
10116
+ * - HA `image.*` entities the `entity_picture` signed-token path
10117
+ * (token stays in the query string, so no auth header is needed);
10118
+ * - a Dreame/robot map the cloud/OSS map-image URL (or an addon
10119
+ * data-plane URL serving the rendered map bytes), exposed as its own
10120
+ * Image child device grouped under the robot's container.
10121
+ * The slice carries that URL plus the upstream last-updated timestamp; the
10122
+ * image changes when the source's last-updated marker changes.
10120
10123
  */
10121
10124
  var ImageStatusSchema = object({
10122
10125
  /** Absolute signed URL the browser loads directly. Null when the
@@ -10142,18 +10145,47 @@ var imageCapability = {
10142
10145
  */
10143
10146
  runtimeState: ImageStatusSchema
10144
10147
  };
10148
+ /**
10149
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
10150
+ * with a mowing lifecycle plus a dock action.
10151
+ *
10152
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
10153
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
10154
+ * nullable — some mowers don't report a battery percentage.
10155
+ *
10156
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
10157
+ * `dock` sends the mower back to its charging station.
10158
+ */
10159
+ var LawnMowerActivitySchema = _enum([
10160
+ "idle",
10161
+ "mowing",
10162
+ "paused",
10163
+ "docked",
10164
+ "error"
10165
+ ]);
10166
+ /** Severity of the current device/error code — info (status), warning, error. */
10167
+ var DeviceCodeSeveritySchema = _enum([
10168
+ "info",
10169
+ "warning",
10170
+ "error"
10171
+ ]);
10145
10172
  var LawnMowerControlStatusSchema = object({
10146
10173
  /** Lifecycle activity of the mower. */
10147
- activity: _enum([
10148
- "idle",
10149
- "mowing",
10150
- "paused",
10151
- "docked",
10152
- "error"
10153
- ]),
10174
+ activity: LawnMowerActivitySchema,
10154
10175
  /** 0..100 battery percentage. Null when the device has no battery
10155
10176
  * reading. */
10156
10177
  batteryLevel: number().min(0).max(100).nullable(),
10178
+ /** 0..100 mowing-completion percentage of the current task, or null when no
10179
+ * task is active / progress is unavailable. */
10180
+ progressPercent: number().min(0).max(100).nullable(),
10181
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
10182
+ * or null when unknown. */
10183
+ currentCode: number().nullable(),
10184
+ /** Human label for {@link currentCode}, or null when undecodable. */
10185
+ currentCodeLabel: string().nullable(),
10186
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
10187
+ * attention; `info` is normal status. */
10188
+ severity: DeviceCodeSeveritySchema,
10157
10189
  /** Ms epoch when the slice was last updated. */
10158
10190
  lastChangedAt: number()
10159
10191
  });
@@ -12379,6 +12411,7 @@ var VacuumStateSchema = _enum([
12379
12411
  "paused",
12380
12412
  "returning",
12381
12413
  "docked",
12414
+ "drying",
12382
12415
  "error"
12383
12416
  ]);
12384
12417
  /**
@@ -12417,6 +12450,12 @@ var VacuumControlStatusSchema = object({
12417
12450
  detergent: TankStatusSchema.nullable(),
12418
12451
  /** Dust bin. Null when the hardware has no dust bin. */
12419
12452
  dustBin: TankStatusSchema.nullable(),
12453
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
12454
+ progressPercent: number().min(0).max(100).nullable(),
12455
+ /** Current error code (0 / null = no error). */
12456
+ errorCode: number().nullable(),
12457
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
12458
+ errorLabel: string().nullable(),
12420
12459
  /** Ms epoch when the slice was last updated. */
12421
12460
  lastChangedAt: number()
12422
12461
  });
@@ -16932,6 +16971,9 @@ method(object({
16932
16971
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
16933
16972
  kind: "mutation",
16934
16973
  auth: "admin"
16974
+ }), method(ResyncInputSchema, ResyncResultSchema, {
16975
+ kind: "mutation",
16976
+ auth: "admin"
16935
16977
  }), method(object({
16936
16978
  deviceId: number(),
16937
16979
  key: string(),
@@ -20783,6 +20825,12 @@ Object.freeze({
20783
20825
  addonId: null,
20784
20826
  access: "create"
20785
20827
  },
20828
+ "deviceManager.adoptionResync": {
20829
+ capName: "device-manager",
20830
+ capScope: "system",
20831
+ addonId: null,
20832
+ access: "create"
20833
+ },
20786
20834
  "deviceManager.allocateDeviceId": {
20787
20835
  capName: "device-manager",
20788
20836
  capScope: "system",
@@ -27480,6 +27528,9 @@ var COLD_START$12 = {
27480
27528
  dirtyWater: null,
27481
27529
  detergent: null,
27482
27530
  dustBin: null,
27531
+ progressPercent: null,
27532
+ errorCode: null,
27533
+ errorLabel: null,
27483
27534
  lastChangedAt: 0
27484
27535
  };
27485
27536
  /**
@@ -27516,6 +27567,9 @@ var HaVacuumDevice = class extends HaBaseChildDevice {
27516
27567
  dirtyWater: null,
27517
27568
  detergent: null,
27518
27569
  dustBin: null,
27570
+ progressPercent: null,
27571
+ errorCode: null,
27572
+ errorLabel: lifecycleState === "error" ? readStringAttr$3(state.attributes, "error") : null,
27519
27573
  lastChangedAt
27520
27574
  });
27521
27575
  }
@@ -27572,6 +27626,10 @@ function readStringArrayAttr(attrs, key) {
27572
27626
  var COLD_START$11 = {
27573
27627
  activity: "idle",
27574
27628
  batteryLevel: null,
27629
+ progressPercent: null,
27630
+ currentCode: null,
27631
+ currentCodeLabel: null,
27632
+ severity: "info",
27575
27633
  lastChangedAt: 0
27576
27634
  };
27577
27635
  /**
@@ -27597,6 +27655,10 @@ var HaLawnMowerDevice = class extends HaBaseChildDevice {
27597
27655
  this.runtimeState.setCapState("lawn-mower-control", {
27598
27656
  activity,
27599
27657
  batteryLevel,
27658
+ progressPercent: readNumericAttr$1(state.attributes, "mowing_progress"),
27659
+ currentCode: null,
27660
+ currentCodeLabel: null,
27661
+ severity: activity === "error" ? "error" : "info",
27600
27662
  lastChangedAt
27601
27663
  });
27602
27664
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",