@camstack/addon-provider-dreame 0.2.150 → 0.2.152

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.
Files changed (3) hide show
  1. package/dist/addon.js +364 -146
  2. package/dist/addon.mjs +364 -146
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -5473,7 +5473,7 @@ var ZodIssueCode$1 = {
5473
5473
  var ZodFirstPartyTypeKind$1;
5474
5474
  ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
5475
5475
  //#endregion
5476
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5476
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5477
5477
  /**
5478
5478
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5479
5479
  * window to float samples (D455).
@@ -8365,7 +8365,11 @@ var ContributionSectionSchema = object({
8365
8365
  literal(4)
8366
8366
  ]).optional(),
8367
8367
  tab: string().optional(),
8368
- location: _enum(["settings", "top-tab"]).optional(),
8368
+ location: _enum([
8369
+ "settings",
8370
+ "top-tab",
8371
+ "hero"
8372
+ ]).optional(),
8369
8373
  order: number().optional(),
8370
8374
  fields: array(any())
8371
8375
  });
@@ -13312,7 +13316,11 @@ var ConfigSectionWithValuesSchema = object({
13312
13316
  literal(4)
13313
13317
  ]).optional(),
13314
13318
  tab: string().optional(),
13315
- location: _enum(["settings", "top-tab"]).optional(),
13319
+ location: _enum([
13320
+ "settings",
13321
+ "top-tab",
13322
+ "hero"
13323
+ ]).optional(),
13316
13324
  order: number().optional(),
13317
13325
  fields: array(any())
13318
13326
  });
@@ -17192,6 +17200,52 @@ var TierStatusSchema = object({
17192
17200
  countedAt: number().nullable()
17193
17201
  });
17194
17202
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17203
+ /**
17204
+ * Why a series is orphan. `device-gone`: its device is absent from the
17205
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17206
+ * key is declared by no capability any more (a field a cap removed).
17207
+ */
17208
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17209
+ /** Rows held per stored tier. */
17210
+ var TierRowsSchema = object({
17211
+ raw: number().int(),
17212
+ "5m": number().int(),
17213
+ "1h": number().int(),
17214
+ "1d": number().int()
17215
+ });
17216
+ var OrphanSeriesSchema = object({
17217
+ seriesId: number().int(),
17218
+ deviceId: number().int(),
17219
+ key: string(),
17220
+ scope: string(),
17221
+ /** The metric's display name; `null` when its metric row is gone too. */
17222
+ displayName: string().nullable(),
17223
+ reason: DeviceHistoryOrphanReasonSchema,
17224
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17225
+ missingSince: number().nullable(),
17226
+ firstTs: number(),
17227
+ lastTs: number(),
17228
+ rows: TierRowsSchema
17229
+ });
17230
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17231
+ "not-found",
17232
+ "not-orphan",
17233
+ "failed"
17234
+ ]);
17235
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17236
+ seriesId: number().int(),
17237
+ ok: literal(true),
17238
+ deleted: TierRowsSchema
17239
+ }), object({
17240
+ seriesId: number().int(),
17241
+ ok: literal(false),
17242
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17243
+ })]);
17244
+ var OrphanListSchema = object({
17245
+ series: array(OrphanSeriesSchema).readonly(),
17246
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17247
+ truncated: boolean()
17248
+ });
17195
17249
  var DeviceHistoryStatusSchema = object({
17196
17250
  startedAt: number(),
17197
17251
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17289,7 +17343,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17289
17343
  }), object({ enabled: boolean() }), {
17290
17344
  kind: "mutation",
17291
17345
  auth: "admin"
17292
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17346
+ }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" }), method(object({}), OrphanListSchema, { auth: "admin" }), method(object({ seriesIds: array(number().int()).min(1).max(50) }), object({ results: array(OrphanDeleteEntrySchema).readonly() }), {
17347
+ kind: "mutation",
17348
+ auth: "admin"
17349
+ });
17293
17350
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17294
17351
  object({ state: literal("absent") }),
17295
17352
  object({
@@ -50272,6 +50329,19 @@ var NodeInferenceDeviceSchema = object({
50272
50329
  /** Whether the node's live probe reports the device as usable right now. */
50273
50330
  available: boolean(),
50274
50331
  /**
50332
+ * Is the device on the node at all (D919)? `present` — the live probe
50333
+ * reported it; `absent` — the probe ANSWERED and did not report it, so only
50334
+ * its stored settings remain (unplugged, moved to another node): never
50335
+ * eligible, whatever its stored `enabled`, and forgettable with
50336
+ * `forgetInferenceDevice`; `unknown` — the probe did not answer, nothing is
50337
+ * claimed (D315). Optional only for an orchestrator older than the field.
50338
+ */
50339
+ presence: _enum([
50340
+ "present",
50341
+ "absent",
50342
+ "unknown"
50343
+ ]).optional(),
50344
+ /**
50275
50345
  * Whether this device participates in dispatch. AUTO default (spec C2):
50276
50346
  * accelerators are opt-OUT (a discovered NPU/iGPU/Coral/ANE with no stored
50277
50347
  * entry is `true`); CPU is opt-IN (`false` by default — the fallback pool,
@@ -50497,7 +50567,13 @@ method(object({
50497
50567
  }), object({ success: literal(true) }), {
50498
50568
  kind: "mutation",
50499
50569
  auth: "admin"
50500
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({ agentNodeId: string() }), object({
50570
+ }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
50571
+ agentNodeId: string(),
50572
+ deviceKey: string()
50573
+ }), object({ success: literal(true) }), {
50574
+ kind: "mutation",
50575
+ auth: "admin"
50576
+ }), method(object({ agentNodeId: string() }), object({
50501
50577
  success: literal(true),
50502
50578
  /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
50503
50579
  effectiveModelId: string().nullable(),
@@ -55186,17 +55262,73 @@ var connectivityCapability = {
55186
55262
  volatileStateFields: ["lastChangedAt"]
55187
55263
  };
55188
55264
  /**
55189
- * Generic device-consumables capability — surfaces a device's
55190
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
55191
- * descaling cycles, …) with their remaining life and an optional
55192
- * "Replaced" reset action. Device-agnostic: any provider that knows its
55193
- * device tracks consumables can register it; the cap declares no
55194
- * vocabulary of its own — the provider names each item verbatim.
55265
+ * Generic device-consumables capability — the ONE place a device reports what
55266
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
55267
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
55268
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
55269
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
55270
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
55271
+ * its device tracks consumables registers it; the provider names each item
55272
+ * verbatim and says which `kind` it is.
55273
+ *
55274
+ * The admin UI renders it as ONE collapsible section directly under the
55275
+ * device page's hero card (`placement: 'hero'`), for every device bound to
55276
+ * this cap — never drawn by a device type's hero card itself (D915).
55195
55277
  *
55196
55278
  * Like `childLayout`, the cap is INERT until a provider sets items: no
55197
55279
  * provider populates it by guessing (no HA inference). The UI renders a
55198
55280
  * "No consumables reported" placeholder when `items` is empty.
55199
55281
  */
55282
+ /**
55283
+ * What an item IS, which decides which direction is bad:
55284
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
55285
+ * - `supply` — something the device draws from (clean water, detergent,
55286
+ * salt, rinse aid); low or empty is bad.
55287
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
55288
+ * bad.
55289
+ * Absent = `wear`.
55290
+ */
55291
+ var ConsumableKindSchema = _enum([
55292
+ "wear",
55293
+ "supply",
55294
+ "waste"
55295
+ ]);
55296
+ /**
55297
+ * What an item LOOKS like, which decides how a client draws it — independent
55298
+ * of `kind`, which decides which direction is bad:
55299
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
55300
+ * remaining time and a reset.
55301
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
55302
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
55303
+ * a stepped level and "refill".
55304
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
55305
+ * that warns when full.
55306
+ * Absent = derived from the kind ({@link consumableFormOf}).
55307
+ */
55308
+ var ConsumableFormSchema = _enum([
55309
+ "part",
55310
+ "tank",
55311
+ "product",
55312
+ "bin"
55313
+ ]);
55314
+ /** The provider's own discrete verdict on an item. */
55315
+ var ConsumableStatusSchema = _enum([
55316
+ "ok",
55317
+ "low",
55318
+ "empty",
55319
+ "full",
55320
+ "replace"
55321
+ ]);
55322
+ _enum([
55323
+ "ok",
55324
+ "low",
55325
+ "empty",
55326
+ "full"
55327
+ ]);
55328
+ /** The kind of an item, with the documented default for an absent one. */
55329
+ function consumableKindOf(item) {
55330
+ return item.kind ?? "wear";
55331
+ }
55200
55332
  /** Units a remaining-life counter is reported in. Closed: the panel renders
55201
55333
  * each. */
55202
55334
  var ConsumableRemainingUnitSchema = _enum([
@@ -55211,18 +55343,23 @@ var ConsumableRemainingSchema = object({
55211
55343
  unit: ConsumableRemainingUnitSchema
55212
55344
  });
55213
55345
  /** A single consumable item. Either a continuous `level` (remaining
55214
- * life %) or a discrete `status` may be known — both may be null when a
55215
- * provider only knows the item exists. `level` and `status` are not
55216
- * mutually exclusive; a provider may report both. */
55346
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
55347
+ * may be known — both may be null when a provider only knows the item
55348
+ * exists. `level` and `status` are not mutually exclusive; a provider may
55349
+ * report both. */
55217
55350
  var ConsumableItemSchema = object({
55218
55351
  /** Stable id, e.g. 'main-brush'. */
55219
55352
  key: string().min(1),
55220
55353
  /** Display name. */
55221
55354
  label: string().min(1),
55222
- /** Remaining life % when known (0..100). */
55355
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
55223
55356
  level: number().min(0).max(100).nullable(),
55224
- /** Discrete state when known (binary mode). */
55225
- status: _enum(["ok", "replace"]).nullable(),
55357
+ /** The provider's discrete verdict when known (binary mode). */
55358
+ status: ConsumableStatusSchema.nullable(),
55359
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
55360
+ kind: ConsumableKindSchema.optional(),
55361
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
55362
+ form: ConsumableFormSchema.optional(),
55226
55363
  /** Ms epoch of the last replace, when known. */
55227
55364
  lastResetAt: number().nullable(),
55228
55365
  /** Whether `reset()` is meaningful for this item. */
@@ -55245,7 +55382,7 @@ var consumablesCapability = {
55245
55382
  kind: "widget",
55246
55383
  widgetId: "host/consumables-panel",
55247
55384
  tab: "consumables",
55248
- topTab: true,
55385
+ placement: "hero",
55249
55386
  label: "Consumables",
55250
55387
  order: 5
55251
55388
  } },
@@ -55306,9 +55443,37 @@ reset: method(object({
55306
55443
  */
55307
55444
  durability: "restored",
55308
55445
  /**
55309
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
55446
+ * History (D850, D917): one series per (item field, item `key`) — the item key
55447
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
55448
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
55449
+ * their provider reports them; an item that appears later gets its series.
55310
55450
  */
55311
- history: "none",
55451
+ history: {
55452
+ fields: {},
55453
+ items: {
55454
+ path: "items",
55455
+ key: "key",
55456
+ label: "label",
55457
+ fields: {
55458
+ level: {
55459
+ kind: "gauge",
55460
+ unit: "%",
55461
+ deadband: 2,
55462
+ displayName: "Level"
55463
+ },
55464
+ status: {
55465
+ kind: "enum",
55466
+ displayName: "Status"
55467
+ },
55468
+ "remaining.value": {
55469
+ kind: "gauge",
55470
+ unitFrom: "remaining.unit",
55471
+ deadband: 1,
55472
+ displayName: "Remaining"
55473
+ }
55474
+ }
55475
+ }
55476
+ },
55312
55477
  /** Clocks, not content: a re-read that changed no item costs no commit. */
55313
55478
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
55314
55479
  };
@@ -55723,8 +55888,9 @@ onStatusChanged: { data: object({
55723
55888
  volatileStateFields: ["lastChangedAt"]
55724
55889
  };
55725
55890
  /**
55726
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55727
- * consumable levels (salt, rinse aid) and common program options.
55891
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
55892
+ * common program options. Salt and rinse aid are NOT here: they are items of
55893
+ * the device's `consumables` cap, like every other device's (D915).
55728
55894
  *
55729
55895
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55730
55896
  * by any integration that exposes the same program / option surface.
@@ -55772,11 +55938,6 @@ var DishwasherAvailabilitySchema = _enum([
55772
55938
  "offline",
55773
55939
  "description-missing"
55774
55940
  ]);
55775
- var DishwasherConsumableLevelSchema = _enum([
55776
- "ok",
55777
- "low",
55778
- "empty"
55779
- ]);
55780
55941
  var DishwasherStatusSchema = object({
55781
55942
  availability: DishwasherAvailabilitySchema,
55782
55943
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -55809,8 +55970,6 @@ var DishwasherStatusSchema = object({
55809
55970
  powerOn: boolean().nullable(),
55810
55971
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55811
55972
  powerState: string().nullable(),
55812
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
55813
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55814
55973
  /**
55815
55974
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55816
55975
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -58686,7 +58845,7 @@ var motionTriggerCapability = {
58686
58845
  enabled: boolean()
58687
58846
  }), _void(), {
58688
58847
  kind: "mutation",
58689
- auth: "admin"
58848
+ auth: "protected"
58690
58849
  }) },
58691
58850
  events: { onMotionTriggerChanged: { data: object({
58692
58851
  deviceId: number(),
@@ -59564,6 +59723,13 @@ var TopologyNodeSchema = object({
59564
59723
  cpuModel: string().nullable(),
59565
59724
  cpuCores: number(),
59566
59725
  memoryMB: number(),
59726
+ /**
59727
+ * The inference RUNTIMES installed on the node (`pythonRuntimes`: onnx,
59728
+ * openvino, edgetpu …) — not its devices. An installed runtime says nothing
59729
+ * about whether its hardware is there (a Coral delegate stays installed
59730
+ * after the stick leaves, D919); the live device set is
59731
+ * `pipelineOrchestrator.getNodeInferenceDevices`.
59732
+ */
59567
59733
  engines: array(string()).readonly(),
59568
59734
  isHub: boolean(),
59569
59735
  isOnline: boolean(),
@@ -60681,7 +60847,28 @@ var ResolvedInferenceConfigSchema = object({
60681
60847
  format: ModelFormatSchema,
60682
60848
  reason: string()
60683
60849
  });
60684
- method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema), method(object({ requirements: array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema);
60850
+ /**
60851
+ * The answer of an accelerator rescan (D919): the node's device list after
60852
+ * the re-probe, what changed, and the evidence that decided the Coral answer
60853
+ * (`usbBus` — could the USB bus be read at all; `decidedBy` — USB ids, the PCI
60854
+ * bus, the installed-delegate fallback, or nothing).
60855
+ */
60856
+ var AcceleratorRescanSchema = object({
60857
+ devices: array(InferenceDeviceDescriptorSchema).readonly(),
60858
+ appeared: array(string()).readonly(),
60859
+ disappeared: array(string()).readonly(),
60860
+ usbBus: _enum(["observed", "unobservable"]),
60861
+ decidedBy: _enum([
60862
+ "usb-ids",
60863
+ "pci",
60864
+ "delegate-fallback",
60865
+ "none"
60866
+ ])
60867
+ });
60868
+ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema), method(object({ requirements: array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(object({ prefer: HwAccelBackendInputSchema }), HwAccelResolutionSchema), method(_void(), AcceleratorRescanSchema, {
60869
+ kind: "mutation",
60870
+ auth: "admin"
60871
+ });
60685
60872
  /**
60686
60873
  * Multi-metric electrical meter. One slice can carry any combination
60687
60874
  * of instantaneous power (W), cumulative energy (kWh), voltage (V),
@@ -64774,60 +64961,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64774
64961
  auth: "admin",
64775
64962
  access: "delete"
64776
64963
  });
64777
- /**
64778
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
64779
- * cleaning lifecycle plus a return-to-base / locate surface and an
64780
- * optional fan-speed selector.
64781
- *
64782
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
64783
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
64784
- * (0..100) is nullable — some vacuums don't report a battery
64785
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
64786
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
64787
- * tokens the hardware accepts so the UI renders only supported choices.
64788
- *
64789
- * The `setFanSpeed` method takes the bare `speed` token — the provider
64790
- * validates it against the vacuum's own list. `locate` triggers the
64791
- * find-me chirp; `returnToBase` sends it home.
64792
- *
64793
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
64794
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
64795
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
64796
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
64797
- * only when the device has no such tank at all, and use a `TankStatus`
64798
- * with both inner fields `null` when the tank exists but its level is
64799
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
64800
- * so the HA provider leaves all four `null`.
64801
- */
64802
- var VacuumStateSchema = _enum([
64803
- "idle",
64804
- "cleaning",
64805
- "paused",
64806
- "returning",
64807
- "docked",
64808
- "drying",
64809
- "error"
64810
- ]);
64811
- /**
64812
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
64813
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
64814
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
64815
- * level is currently unknown; the OWNING field being `null` means the
64816
- * hardware has no such tank at all.
64817
- */
64818
- var TankStatusSchema = object({
64819
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
64820
- level: number().min(0).max(100).nullable(),
64821
- /** Discrete state when the hardware is binary-mode; null otherwise. */
64822
- status: _enum([
64823
- "ok",
64824
- "low",
64825
- "full"
64826
- ]).nullable()
64827
- });
64828
64964
  var VacuumControlStatusSchema = object({
64829
64965
  /** Lifecycle state of the vacuum. */
64830
- state: VacuumStateSchema,
64966
+ state: _enum([
64967
+ "idle",
64968
+ "cleaning",
64969
+ "paused",
64970
+ "returning",
64971
+ "docked",
64972
+ "drying",
64973
+ "error"
64974
+ ]),
64831
64975
  /** 0..100 battery percentage. Null when the device has no battery
64832
64976
  * reading. */
64833
64977
  batteryLevel: number().min(0).max(100).nullable(),
@@ -64836,14 +64980,6 @@ var VacuumControlStatusSchema = object({
64836
64980
  fanSpeed: string().nullable(),
64837
64981
  /** Speed tokens the hardware accepts — drives the UI selector. */
64838
64982
  availableFanSpeeds: array(string()),
64839
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
64840
- cleanWater: TankStatusSchema.nullable(),
64841
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
64842
- dirtyWater: TankStatusSchema.nullable(),
64843
- /** Detergent tank. Null when the hardware has no detergent tank. */
64844
- detergent: TankStatusSchema.nullable(),
64845
- /** Dust bin. Null when the hardware has no dust bin. */
64846
- dustBin: TankStatusSchema.nullable(),
64847
64983
  /** 0..100 cleaning-completion percentage of the current task, or null. */
64848
64984
  progressPercent: number().min(0).max(100).nullable(),
64849
64985
  /** Current error code (0 / null = no error). */
@@ -64905,35 +65041,14 @@ var vacuumControlCapability = {
64905
65041
  */
64906
65042
  durability: "session",
64907
65043
  /**
64908
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
65044
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
65045
+ * items are keyed by runtime ids and record no history.
64909
65046
  */
64910
- history: { fields: {
64911
- batteryLevel: {
64912
- kind: "gauge",
64913
- unit: "%",
64914
- deadband: 2
64915
- },
64916
- "cleanWater.level": {
64917
- kind: "gauge",
64918
- unit: "%",
64919
- deadband: 2
64920
- },
64921
- "dirtyWater.level": {
64922
- kind: "gauge",
64923
- unit: "%",
64924
- deadband: 2
64925
- },
64926
- "detergent.level": {
64927
- kind: "gauge",
64928
- unit: "%",
64929
- deadband: 2
64930
- },
64931
- "dustBin.level": {
64932
- kind: "gauge",
64933
- unit: "%",
64934
- deadband: 2
64935
- }
64936
- } }
65047
+ history: { fields: { batteryLevel: {
65048
+ kind: "gauge",
65049
+ unit: "%",
65050
+ deadband: 2
65051
+ } } }
64937
65052
  };
64938
65053
  var ValveStatusSchema = object({
64939
65054
  /** Lifecycle state of the valve. */
@@ -69343,6 +69458,12 @@ Object.freeze({
69343
69458
  addonId: null,
69344
69459
  access: "create"
69345
69460
  },
69461
+ "deviceHistory.deleteOrphanSeries": {
69462
+ capName: "device-history",
69463
+ capScope: "system",
69464
+ addonId: null,
69465
+ access: "delete"
69466
+ },
69346
69467
  "deviceHistory.getDeviceEnabled": {
69347
69468
  capName: "device-history",
69348
69469
  capScope: "system",
@@ -69361,6 +69482,12 @@ Object.freeze({
69361
69482
  addonId: null,
69362
69483
  access: "view"
69363
69484
  },
69485
+ "deviceHistory.listOrphanSeries": {
69486
+ capName: "device-history",
69487
+ capScope: "system",
69488
+ addonId: null,
69489
+ access: "view"
69490
+ },
69364
69491
  "deviceHistory.listSeries": {
69365
69492
  capName: "device-history",
69366
69493
  capScope: "system",
@@ -72985,6 +73112,12 @@ Object.freeze({
72985
73112
  addonId: null,
72986
73113
  access: "delete"
72987
73114
  },
73115
+ "pipelineOrchestrator.forgetInferenceDevice": {
73116
+ capName: "pipeline-orchestrator",
73117
+ capScope: "system",
73118
+ addonId: null,
73119
+ access: "delete"
73120
+ },
72988
73121
  "pipelineOrchestrator.getAgentLoad": {
72989
73122
  capName: "pipeline-orchestrator",
72990
73123
  capScope: "system",
@@ -73561,6 +73694,12 @@ Object.freeze({
73561
73694
  addonId: null,
73562
73695
  access: "view"
73563
73696
  },
73697
+ "platformProbe.rescanAccelerators": {
73698
+ capName: "platform-probe",
73699
+ capScope: "system",
73700
+ addonId: null,
73701
+ access: "create"
73702
+ },
73564
73703
  "platformProbe.resolveHwAccel": {
73565
73704
  capName: "platform-probe",
73566
73705
  capScope: "system",
@@ -79366,7 +79505,7 @@ var STATE_SUMMARY_VARS = [
79366
79505
  ([...RULE_TEXT], [...COMBINED_ALARM]),
79367
79506
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
79368
79507
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
79369
- ([...RULE_TEXT], [...CONSUMABLE]),
79508
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
79370
79509
  ([...RULE_TEXT], [...TANK]),
79371
79510
  [...RULE_TEXT],
79372
79511
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
@@ -135236,8 +135375,7 @@ function dirtyWaterTankStatus(value, errorCode) {
135236
135375
  return null;
135237
135376
  }
135238
135377
  /**
135239
- * The four `vacuum-control` tank fields (clean-water / dirty-water / detergent /
135240
- * dust-bin) decoded from the model's {@link VacuumCapabilities}, with the
135378
+ * The four tanks (clean-water / dirty-water / detergent / dust-bin) decoded from the model's {@link VacuumCapabilities}, with the
135241
135379
  * discrete `status` populated from the live MIoT enum props when supplied. Pure.
135242
135380
  *
135243
135381
  * The nodedreame library exposes NO tank FILL-LEVEL telemetry — the cloud shadow
@@ -135268,6 +135406,57 @@ function decodeVacuumTanks(caps, props, errorCode = null) {
135268
135406
  dustBin: tank(Boolean(caps?.canAutoEmpty), props ? dustBinTankStatus(props.dustCollection, props.dustBagStatus) : null)
135269
135407
  };
135270
135408
  }
135409
+ /** How each tank is named and what it is, in the order the panel lists them. */
135410
+ var TANK_ITEMS = [
135411
+ {
135412
+ key: "cleanWater",
135413
+ label: "Clean water tank",
135414
+ kind: "supply",
135415
+ form: "tank"
135416
+ },
135417
+ {
135418
+ key: "dirtyWater",
135419
+ label: "Dirty water tank",
135420
+ kind: "waste",
135421
+ form: "tank"
135422
+ },
135423
+ {
135424
+ key: "detergent",
135425
+ label: "Detergent",
135426
+ kind: "supply",
135427
+ form: "product"
135428
+ },
135429
+ {
135430
+ key: "dustBin",
135431
+ label: "Dust bin",
135432
+ kind: "waste",
135433
+ form: "bin"
135434
+ }
135435
+ ];
135436
+ /**
135437
+ * The tanks as `consumables` items (D915): every PRESENT tank becomes a
135438
+ * `supply` (clean water, detergent) or `waste` (dirty water, dust bin) item
135439
+ * keyed by its old field name, drawn as a `tank` (the two water tanks), a
135440
+ * `product` (detergent) or a `bin` (the dust bin) — the key the notification centre's tank
135441
+ * episodes were built on, so an open episode carries on. A tank is never
135442
+ * resettable: emptying or refilling it is the reset. Pure.
135443
+ */
135444
+ function vacuumTankItems(tanks) {
135445
+ return TANK_ITEMS.flatMap(({ key, label, kind, form }) => {
135446
+ const tank = tanks[key];
135447
+ if (tank === null) return [];
135448
+ return [{
135449
+ key,
135450
+ label,
135451
+ level: tank.level,
135452
+ status: tank.status,
135453
+ kind,
135454
+ form,
135455
+ lastResetAt: null,
135456
+ resettable: false
135457
+ }];
135458
+ });
135459
+ }
135271
135460
  /**
135272
135461
  * Clamp a raw consumable percentage to `[0, 100]`, or return `null` when the
135273
135462
  * value is absent / non-finite. The library reports remaining life as a 0..100
@@ -135296,7 +135485,8 @@ function buildVacuumConsumableItems(readings) {
135296
135485
  level: clampConsumablePct(c.leftPct),
135297
135486
  status: null,
135298
135487
  lastResetAt: null,
135299
- resettable: c.resettable
135488
+ resettable: c.resettable,
135489
+ form: "part"
135300
135490
  }));
135301
135491
  }
135302
135492
  /** Structural equality of two JSON-shaped values, key order ignored. */
@@ -182681,7 +182871,8 @@ function buildMowerConsumables(readings) {
182681
182871
  level: r.remainingPercent,
182682
182872
  status: null,
182683
182873
  lastResetAt: null,
182684
- resettable: true
182874
+ resettable: true,
182875
+ form: "part"
182685
182876
  }));
182686
182877
  }
182687
182878
  //#endregion
@@ -182705,7 +182896,7 @@ var CONSUMABLES_COLD_START = {
182705
182896
  lastFetchedAt: 0
182706
182897
  };
182707
182898
  function itemEqual(a, b) {
182708
- return a.key === b.key && a.label === b.label && a.level === b.level && a.status === b.status && a.lastResetAt === b.lastResetAt && a.resettable === b.resettable;
182899
+ return a.key === b.key && a.label === b.label && a.level === b.level && a.status === b.status && a.lastResetAt === b.lastResetAt && a.resettable === b.resettable && a.kind === b.kind && a.remaining?.value === b.remaining?.value && a.remaining?.unit === b.remaining?.unit;
182709
182900
  }
182710
182901
  function itemsEqual(a, b) {
182711
182902
  return a.length === b.length && a.every((item, i) => {
@@ -183695,6 +183886,31 @@ var DreameSwitchDevice = class extends DreameChildDevice {
183695
183886
  };
183696
183887
  //#endregion
183697
183888
  //#region src/devices/dreame-vacuum-consumables.ts
183889
+ /**
183890
+ * The vacuum's `consumables` slice: when it is re-read, and what a reset does.
183891
+ *
183892
+ * The life %s and their time-left twins are settings the robot rarely re-pushes
183893
+ * over MQTT, and the library does not poll them. So they are re-read from the
183894
+ * cloud SHADOW (no robot wake) on activate, every {@link CONSUMABLES_REFRESH_MS},
183895
+ * and on the edge INTO `docked` — the moment a run has just used them up. The
183896
+ * same read reseeds the station tank-status props (dirty water, dust bag, …),
183897
+ * which otherwise arrive only as pushes.
183898
+ *
183899
+ * A reset goes through the library, which re-reads the item it reset (live,
183900
+ * else shadow) before it resolves; the slice is rebuilt from that. A shadow
183901
+ * answer may still be the pre-reset value, so it earns ONE follow-up refresh.
183902
+ *
183903
+ * The TANKS ride the same slice (D915): every push hands over the tank items
183904
+ * the device decoded, appended after the wear items. Either half may be
183905
+ * unknown for a while after a restart — the shadow has not answered, or a
183906
+ * refresh lands before the first push brought the tanks — and the slice is
183907
+ * `restored`, so an unknown half keeps the restored rows instead of erasing
183908
+ * them.
183909
+ */
183910
+ /** A tank item (`supply` / `waste`) as opposed to a wear item. */
183911
+ function isTankItem(item) {
183912
+ return consumableKindOf(item) !== "wear";
183913
+ }
183698
183914
  /** Hourly: a consumable moves by hours of cleaning, and the dock edge covers a run. */
183699
183915
  var CONSUMABLES_REFRESH_MS = 60 * 6e4;
183700
183916
  /** Time for the robot to report a reset to the cloud before the shadow is re-read. */
@@ -183711,6 +183927,8 @@ var DreameVacuumConsumables = class {
183711
183927
  #refresher;
183712
183928
  /** Last pushed lifecycle state; `null` until the first push after boot. */
183713
183929
  #prevState = null;
183930
+ /** Last pushed tank items; `null` until the first push after boot. */
183931
+ #tanks = null;
183714
183932
  constructor(deps) {
183715
183933
  this.#deps = deps;
183716
183934
  this.#refresher = new DreameConsumablesRefresher({
@@ -183730,12 +183948,14 @@ var DreameVacuumConsumables = class {
183730
183948
  this.#refresher.stop();
183731
183949
  }
183732
183950
  /**
183733
- * Every `stateChanged` push: replay the cache into the slice (written only if
183734
- * an item changed) and refresh on the edge into `docked`. The first push after
183735
- * boot is not an edge — activation already reads — and neither is a hop
183736
- * between station routines (`drying` → `docked`): only the end of a RUN is.
183951
+ * Every `stateChanged` push: replay the cache and the pushed tanks into the
183952
+ * slice (written only if an item changed) and refresh on the edge into
183953
+ * `docked`. The first push after boot is not an edge — activation already
183954
+ * reads — and neither is a hop between station routines (`drying` →
183955
+ * `docked`): only the end of a RUN is.
183737
183956
  */
183738
- onPush(state) {
183957
+ onPush(state, tanks) {
183958
+ this.#tanks = tanks;
183739
183959
  this.#apply(false);
183740
183960
  const enteredDock = this.#prevState !== null && DOCK_EDGE_FROM.has(this.#prevState) && state === "docked";
183741
183961
  this.#prevState = state;
@@ -183785,7 +184005,11 @@ var DreameVacuumConsumables = class {
183785
184005
  const { store, resolveVacuum, now } = this.#deps;
183786
184006
  const vacuum = resolveVacuum();
183787
184007
  if (vacuum === null) return;
183788
- writeConsumables(store, buildVacuumConsumableItems(vacuum.supportedConsumables), (now ?? Date.now)(), landed);
184008
+ const prev = store.getCapState("consumables")?.items ?? [];
184009
+ const read = buildVacuumConsumableItems(vacuum.supportedConsumables);
184010
+ const wear = read.length > 0 ? read : prev.filter((item) => !isTankItem(item));
184011
+ const tanks = this.#tanks ?? prev.filter(isTankItem);
184012
+ writeConsumables(store, [...wear, ...tanks], (now ?? Date.now)(), landed);
183789
184013
  }
183790
184014
  };
183791
184015
  function resetMeta(result) {
@@ -183805,10 +184029,6 @@ var CONTROL_COLD_START = {
183805
184029
  batteryLevel: null,
183806
184030
  fanSpeed: null,
183807
184031
  availableFanSpeeds: [],
183808
- cleanWater: null,
183809
- dirtyWater: null,
183810
- detergent: null,
183811
- dustBin: null,
183812
184032
  progressPercent: null,
183813
184033
  errorCode: null,
183814
184034
  errorLabel: null,
@@ -183824,11 +184044,13 @@ var CONTROL_COLD_START = {
183824
184044
  * `setFanSpeed`→`setSuction()` (token validated against the model's supported
183825
184045
  * suction levels).
183826
184046
  *
183827
- * Tank state (cleanWater/dirtyWater/detergent/dustBin): the library exposes NO
183828
- * tank fill LEVEL, so `level` is always null. PRESENCE comes from the model
183829
- * capability flags and a discrete `status` from the station's tank-status enum
183830
- * props (`decodeVacuumTanks`, ids in `VACUUM_TANK_PROPS`); an absent tank is
183831
- * `null`, an unknown status is `null` — never `ok`.
184047
+ * Tanks (clean water / dirty water / detergent / dust bin) are `supply` /
184048
+ * `waste` items of the `consumables` slice (D915), not `vacuum-control` fields:
184049
+ * the library exposes NO tank fill LEVEL, so `level` is always null. PRESENCE
184050
+ * comes from the model capability flags and a discrete `status` from the
184051
+ * station's tank-status enum props (`decodeVacuumTanks`, ids in
184052
+ * `VACUUM_TANK_PROPS`); an absent tank is no item, an unknown status is `null`
184053
+ * — never `ok`.
183832
184054
  *
183833
184055
  * Consumables: whatever the model REPORTS (the library's presence-driven
183834
184056
  * `supportedConsumables`), re-read from the cloud shadow on activate, hourly and
@@ -183952,16 +184174,12 @@ var DreameVacuumDevice = class extends DreameChildDevice {
183952
184174
  recomputeSlice() {
183953
184175
  const vacuum = this.resolveVacuum();
183954
184176
  if (vacuum === null) return;
183955
- const tanks = decodeVacuumTanks(vacuum.vacuumCapabilities, this.readTankProps(), vacuum.errorCode);
184177
+ const tanks = vacuumTankItems(decodeVacuumTanks(vacuum.vacuumCapabilities, this.readTankProps(), vacuum.errorCode));
183956
184178
  const controlSlice = {
183957
184179
  state: mapMiotStateToVacuumState(vacuum.status),
183958
184180
  batteryLevel: clampBatteryLevel$1(vacuum.battery),
183959
184181
  fanSpeed: suctionLevelToken(vacuum.suction),
183960
184182
  availableFanSpeeds: supportedFanSpeedTokens(vacuum.supportedSuctionLevels),
183961
- cleanWater: tanks.cleanWater,
183962
- dirtyWater: tanks.dirtyWater,
183963
- detergent: tanks.detergent,
183964
- dustBin: tanks.dustBin,
183965
184183
  progressPercent: clampPercent$1(vacuum.taskProgressPct),
183966
184184
  errorCode: vacuum.errorCode,
183967
184185
  errorLabel: vacuum.errorCode ? `Error ${vacuum.errorCode}` : null,
@@ -183969,7 +184187,7 @@ var DreameVacuumDevice = class extends DreameChildDevice {
183969
184187
  };
183970
184188
  const toWrite = nextVacuumControlSlice(this.runtimeState.getCapState(CAP_NAME$1), controlSlice);
183971
184189
  if (toWrite !== null) this.runtimeState.setCapState(CAP_NAME$1, toWrite);
183972
- this.consumables.onPush(controlSlice.state);
184190
+ this.consumables.onPush(controlSlice.state, tanks);
183973
184191
  }
183974
184192
  /**
183975
184193
  * Read the tank-status MIoT enum props ({@link VACUUM_TANK_PROPS}) from the