@camstack/addon-provider-reolink 1.2.203 → 1.2.205

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 +193 -123
  2. package/dist/addon.mjs +193 -123
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5468,7 +5468,7 @@ var ZodIssueCode = {
5468
5468
  var ZodFirstPartyTypeKind;
5469
5469
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5470
5470
  //#endregion
5471
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5471
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5472
5472
  /**
5473
5473
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5474
5474
  * window to float samples (D455).
@@ -8364,7 +8364,11 @@ var ContributionSectionSchema = object({
8364
8364
  literal(4)
8365
8365
  ]).optional(),
8366
8366
  tab: string().optional(),
8367
- location: _enum(["settings", "top-tab"]).optional(),
8367
+ location: _enum([
8368
+ "settings",
8369
+ "top-tab",
8370
+ "hero"
8371
+ ]).optional(),
8368
8372
  order: number().optional(),
8369
8373
  fields: array(any())
8370
8374
  });
@@ -13911,7 +13915,11 @@ var ConfigSectionWithValuesSchema = object({
13911
13915
  literal(4)
13912
13916
  ]).optional(),
13913
13917
  tab: string().optional(),
13914
- location: _enum(["settings", "top-tab"]).optional(),
13918
+ location: _enum([
13919
+ "settings",
13920
+ "top-tab",
13921
+ "hero"
13922
+ ]).optional(),
13915
13923
  order: number().optional(),
13916
13924
  fields: array(any())
13917
13925
  });
@@ -17791,6 +17799,52 @@ var TierStatusSchema = object({
17791
17799
  countedAt: number().nullable()
17792
17800
  });
17793
17801
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17802
+ /**
17803
+ * Why a series is orphan. `device-gone`: its device is absent from the
17804
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17805
+ * key is declared by no capability any more (a field a cap removed).
17806
+ */
17807
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17808
+ /** Rows held per stored tier. */
17809
+ var TierRowsSchema = object({
17810
+ raw: number().int(),
17811
+ "5m": number().int(),
17812
+ "1h": number().int(),
17813
+ "1d": number().int()
17814
+ });
17815
+ var OrphanSeriesSchema = object({
17816
+ seriesId: number().int(),
17817
+ deviceId: number().int(),
17818
+ key: string(),
17819
+ scope: string(),
17820
+ /** The metric's display name; `null` when its metric row is gone too. */
17821
+ displayName: string().nullable(),
17822
+ reason: DeviceHistoryOrphanReasonSchema,
17823
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17824
+ missingSince: number().nullable(),
17825
+ firstTs: number(),
17826
+ lastTs: number(),
17827
+ rows: TierRowsSchema
17828
+ });
17829
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17830
+ "not-found",
17831
+ "not-orphan",
17832
+ "failed"
17833
+ ]);
17834
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17835
+ seriesId: number().int(),
17836
+ ok: literal(true),
17837
+ deleted: TierRowsSchema
17838
+ }), object({
17839
+ seriesId: number().int(),
17840
+ ok: literal(false),
17841
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17842
+ })]);
17843
+ var OrphanListSchema = object({
17844
+ series: array(OrphanSeriesSchema).readonly(),
17845
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17846
+ truncated: boolean()
17847
+ });
17794
17848
  var DeviceHistoryStatusSchema = object({
17795
17849
  startedAt: number(),
17796
17850
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17888,7 +17942,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17888
17942
  }), object({ enabled: boolean() }), {
17889
17943
  kind: "mutation",
17890
17944
  auth: "admin"
17891
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17945
+ }), 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() }), {
17946
+ kind: "mutation",
17947
+ auth: "admin"
17948
+ });
17892
17949
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17893
17950
  object({ state: literal("absent") }),
17894
17951
  object({
@@ -48752,7 +48809,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
48752
48809
  modelId: string()
48753
48810
  }),
48754
48811
  object({ kind: literal("cpu-device") }),
48755
- object({ kind: literal("coral-untouched") }),
48756
48812
  object({ kind: literal("device-disabled") }),
48757
48813
  object({ kind: literal("device-unavailable") }),
48758
48814
  object({ kind: literal("node-offline") }),
@@ -48850,11 +48906,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
48850
48906
  kind: literal("detector-store-unreadable"),
48851
48907
  error: string()
48852
48908
  }),
48853
- object({
48854
- kind: literal("coral-enabled"),
48855
- nodeId: string(),
48856
- deviceKey: string()
48857
- }),
48858
48909
  object({
48859
48910
  kind: literal("custom-pin-kept"),
48860
48911
  nodeId: string(),
@@ -56412,17 +56463,69 @@ var connectivityCapability = {
56412
56463
  volatileStateFields: ["lastChangedAt"]
56413
56464
  };
56414
56465
  /**
56415
- * Generic device-consumables capability — surfaces a device's
56416
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
56417
- * descaling cycles, …) with their remaining life and an optional
56418
- * "Replaced" reset action. Device-agnostic: any provider that knows its
56419
- * device tracks consumables can register it; the cap declares no
56420
- * vocabulary of its own — the provider names each item verbatim.
56466
+ * Generic device-consumables capability — the ONE place a device reports what
56467
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
56468
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
56469
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
56470
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
56471
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
56472
+ * its device tracks consumables registers it; the provider names each item
56473
+ * verbatim and says which `kind` it is.
56474
+ *
56475
+ * The admin UI renders it as ONE collapsible section directly under the
56476
+ * device page's hero card (`placement: 'hero'`), for every device bound to
56477
+ * this cap — never drawn by a device type's hero card itself (D915).
56421
56478
  *
56422
56479
  * Like `childLayout`, the cap is INERT until a provider sets items: no
56423
56480
  * provider populates it by guessing (no HA inference). The UI renders a
56424
56481
  * "No consumables reported" placeholder when `items` is empty.
56425
56482
  */
56483
+ /**
56484
+ * What an item IS, which decides which direction is bad:
56485
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
56486
+ * - `supply` — something the device draws from (clean water, detergent,
56487
+ * salt, rinse aid); low or empty is bad.
56488
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
56489
+ * bad.
56490
+ * Absent = `wear`.
56491
+ */
56492
+ var ConsumableKindSchema = _enum([
56493
+ "wear",
56494
+ "supply",
56495
+ "waste"
56496
+ ]);
56497
+ /**
56498
+ * What an item LOOKS like, which decides how a client draws it — independent
56499
+ * of `kind`, which decides which direction is bad:
56500
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
56501
+ * remaining time and a reset.
56502
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
56503
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
56504
+ * a stepped level and "refill".
56505
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
56506
+ * that warns when full.
56507
+ * Absent = derived from the kind ({@link consumableFormOf}).
56508
+ */
56509
+ var ConsumableFormSchema = _enum([
56510
+ "part",
56511
+ "tank",
56512
+ "product",
56513
+ "bin"
56514
+ ]);
56515
+ /** The provider's own discrete verdict on an item. */
56516
+ var ConsumableStatusSchema = _enum([
56517
+ "ok",
56518
+ "low",
56519
+ "empty",
56520
+ "full",
56521
+ "replace"
56522
+ ]);
56523
+ _enum([
56524
+ "ok",
56525
+ "low",
56526
+ "empty",
56527
+ "full"
56528
+ ]);
56426
56529
  /** Units a remaining-life counter is reported in. Closed: the panel renders
56427
56530
  * each. */
56428
56531
  var ConsumableRemainingUnitSchema = _enum([
@@ -56437,18 +56540,23 @@ var ConsumableRemainingSchema = object({
56437
56540
  unit: ConsumableRemainingUnitSchema
56438
56541
  });
56439
56542
  /** A single consumable item. Either a continuous `level` (remaining
56440
- * life %) or a discrete `status` may be known — both may be null when a
56441
- * provider only knows the item exists. `level` and `status` are not
56442
- * mutually exclusive; a provider may report both. */
56543
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
56544
+ * may be known — both may be null when a provider only knows the item
56545
+ * exists. `level` and `status` are not mutually exclusive; a provider may
56546
+ * report both. */
56443
56547
  var ConsumableItemSchema = object({
56444
56548
  /** Stable id, e.g. 'main-brush'. */
56445
56549
  key: string().min(1),
56446
56550
  /** Display name. */
56447
56551
  label: string().min(1),
56448
- /** Remaining life % when known (0..100). */
56552
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
56449
56553
  level: number().min(0).max(100).nullable(),
56450
- /** Discrete state when known (binary mode). */
56451
- status: _enum(["ok", "replace"]).nullable(),
56554
+ /** The provider's discrete verdict when known (binary mode). */
56555
+ status: ConsumableStatusSchema.nullable(),
56556
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
56557
+ kind: ConsumableKindSchema.optional(),
56558
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
56559
+ form: ConsumableFormSchema.optional(),
56452
56560
  /** Ms epoch of the last replace, when known. */
56453
56561
  lastResetAt: number().nullable(),
56454
56562
  /** Whether `reset()` is meaningful for this item. */
@@ -56471,7 +56579,7 @@ var consumablesCapability = {
56471
56579
  kind: "widget",
56472
56580
  widgetId: "host/consumables-panel",
56473
56581
  tab: "consumables",
56474
- topTab: true,
56582
+ placement: "hero",
56475
56583
  label: "Consumables",
56476
56584
  order: 5
56477
56585
  } },
@@ -56532,9 +56640,37 @@ reset: method(object({
56532
56640
  */
56533
56641
  durability: "restored",
56534
56642
  /**
56535
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
56643
+ * History (D850, D917): one series per (item field, item `key`) — the item key
56644
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
56645
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
56646
+ * their provider reports them; an item that appears later gets its series.
56536
56647
  */
56537
- history: "none",
56648
+ history: {
56649
+ fields: {},
56650
+ items: {
56651
+ path: "items",
56652
+ key: "key",
56653
+ label: "label",
56654
+ fields: {
56655
+ level: {
56656
+ kind: "gauge",
56657
+ unit: "%",
56658
+ deadband: 2,
56659
+ displayName: "Level"
56660
+ },
56661
+ status: {
56662
+ kind: "enum",
56663
+ displayName: "Status"
56664
+ },
56665
+ "remaining.value": {
56666
+ kind: "gauge",
56667
+ unitFrom: "remaining.unit",
56668
+ deadband: 1,
56669
+ displayName: "Remaining"
56670
+ }
56671
+ }
56672
+ }
56673
+ },
56538
56674
  /** Clocks, not content: a re-read that changed no item costs no commit. */
56539
56675
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
56540
56676
  };
@@ -56949,8 +57085,9 @@ onStatusChanged: { data: object({
56949
57085
  volatileStateFields: ["lastChangedAt"]
56950
57086
  };
56951
57087
  /**
56952
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56953
- * consumable levels (salt, rinse aid) and common program options.
57088
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
57089
+ * common program options. Salt and rinse aid are NOT here: they are items of
57090
+ * the device's `consumables` cap, like every other device's (D915).
56954
57091
  *
56955
57092
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56956
57093
  * by any integration that exposes the same program / option surface.
@@ -56998,11 +57135,6 @@ var DishwasherAvailabilitySchema = _enum([
56998
57135
  "offline",
56999
57136
  "description-missing"
57000
57137
  ]);
57001
- var DishwasherConsumableLevelSchema = _enum([
57002
- "ok",
57003
- "low",
57004
- "empty"
57005
- ]);
57006
57138
  var DishwasherStatusSchema = object({
57007
57139
  availability: DishwasherAvailabilitySchema,
57008
57140
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -57035,8 +57167,6 @@ var DishwasherStatusSchema = object({
57035
57167
  powerOn: boolean().nullable(),
57036
57168
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
57037
57169
  powerState: string().nullable(),
57038
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
57039
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
57040
57170
  /**
57041
57171
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
57042
57172
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -66422,60 +66552,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
66422
66552
  auth: "admin",
66423
66553
  access: "delete"
66424
66554
  });
66425
- /**
66426
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
66427
- * cleaning lifecycle plus a return-to-base / locate surface and an
66428
- * optional fan-speed selector.
66429
- *
66430
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
66431
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
66432
- * (0..100) is nullable — some vacuums don't report a battery
66433
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
66434
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
66435
- * tokens the hardware accepts so the UI renders only supported choices.
66436
- *
66437
- * The `setFanSpeed` method takes the bare `speed` token — the provider
66438
- * validates it against the vacuum's own list. `locate` triggers the
66439
- * find-me chirp; `returnToBase` sends it home.
66440
- *
66441
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
66442
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
66443
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
66444
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
66445
- * only when the device has no such tank at all, and use a `TankStatus`
66446
- * with both inner fields `null` when the tank exists but its level is
66447
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
66448
- * so the HA provider leaves all four `null`.
66449
- */
66450
- var VacuumStateSchema = _enum([
66451
- "idle",
66452
- "cleaning",
66453
- "paused",
66454
- "returning",
66455
- "docked",
66456
- "drying",
66457
- "error"
66458
- ]);
66459
- /**
66460
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
66461
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
66462
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
66463
- * level is currently unknown; the OWNING field being `null` means the
66464
- * hardware has no such tank at all.
66465
- */
66466
- var TankStatusSchema = object({
66467
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
66468
- level: number().min(0).max(100).nullable(),
66469
- /** Discrete state when the hardware is binary-mode; null otherwise. */
66470
- status: _enum([
66471
- "ok",
66472
- "low",
66473
- "full"
66474
- ]).nullable()
66475
- });
66476
66555
  var VacuumControlStatusSchema = object({
66477
66556
  /** Lifecycle state of the vacuum. */
66478
- state: VacuumStateSchema,
66557
+ state: _enum([
66558
+ "idle",
66559
+ "cleaning",
66560
+ "paused",
66561
+ "returning",
66562
+ "docked",
66563
+ "drying",
66564
+ "error"
66565
+ ]),
66479
66566
  /** 0..100 battery percentage. Null when the device has no battery
66480
66567
  * reading. */
66481
66568
  batteryLevel: number().min(0).max(100).nullable(),
@@ -66484,14 +66571,6 @@ var VacuumControlStatusSchema = object({
66484
66571
  fanSpeed: string().nullable(),
66485
66572
  /** Speed tokens the hardware accepts — drives the UI selector. */
66486
66573
  availableFanSpeeds: array(string()),
66487
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
66488
- cleanWater: TankStatusSchema.nullable(),
66489
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
66490
- dirtyWater: TankStatusSchema.nullable(),
66491
- /** Detergent tank. Null when the hardware has no detergent tank. */
66492
- detergent: TankStatusSchema.nullable(),
66493
- /** Dust bin. Null when the hardware has no dust bin. */
66494
- dustBin: TankStatusSchema.nullable(),
66495
66574
  /** 0..100 cleaning-completion percentage of the current task, or null. */
66496
66575
  progressPercent: number().min(0).max(100).nullable(),
66497
66576
  /** Current error code (0 / null = no error). */
@@ -66553,35 +66632,14 @@ var vacuumControlCapability = {
66553
66632
  */
66554
66633
  durability: "session",
66555
66634
  /**
66556
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
66635
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
66636
+ * items are keyed by runtime ids and record no history.
66557
66637
  */
66558
- history: { fields: {
66559
- batteryLevel: {
66560
- kind: "gauge",
66561
- unit: "%",
66562
- deadband: 2
66563
- },
66564
- "cleanWater.level": {
66565
- kind: "gauge",
66566
- unit: "%",
66567
- deadband: 2
66568
- },
66569
- "dirtyWater.level": {
66570
- kind: "gauge",
66571
- unit: "%",
66572
- deadband: 2
66573
- },
66574
- "detergent.level": {
66575
- kind: "gauge",
66576
- unit: "%",
66577
- deadband: 2
66578
- },
66579
- "dustBin.level": {
66580
- kind: "gauge",
66581
- unit: "%",
66582
- deadband: 2
66583
- }
66584
- } }
66638
+ history: { fields: { batteryLevel: {
66639
+ kind: "gauge",
66640
+ unit: "%",
66641
+ deadband: 2
66642
+ } } }
66585
66643
  };
66586
66644
  var ValveStatusSchema = object({
66587
66645
  /** Lifecycle state of the valve. */
@@ -70990,6 +71048,12 @@ Object.freeze({
70990
71048
  addonId: null,
70991
71049
  access: "create"
70992
71050
  },
71051
+ "deviceHistory.deleteOrphanSeries": {
71052
+ capName: "device-history",
71053
+ capScope: "system",
71054
+ addonId: null,
71055
+ access: "delete"
71056
+ },
70993
71057
  "deviceHistory.getDeviceEnabled": {
70994
71058
  capName: "device-history",
70995
71059
  capScope: "system",
@@ -71008,6 +71072,12 @@ Object.freeze({
71008
71072
  addonId: null,
71009
71073
  access: "view"
71010
71074
  },
71075
+ "deviceHistory.listOrphanSeries": {
71076
+ capName: "device-history",
71077
+ capScope: "system",
71078
+ addonId: null,
71079
+ access: "view"
71080
+ },
71011
71081
  "deviceHistory.listSeries": {
71012
71082
  capName: "device-history",
71013
71083
  capScope: "system",
@@ -81165,7 +81235,7 @@ var STATE_SUMMARY_VARS = [
81165
81235
  ([...RULE_TEXT], [...COMBINED_ALARM]),
81166
81236
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
81167
81237
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
81168
- ([...RULE_TEXT], [...CONSUMABLE]),
81238
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
81169
81239
  ([...RULE_TEXT], [...TANK]),
81170
81240
  [...RULE_TEXT],
81171
81241
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
package/dist/addon.mjs CHANGED
@@ -5460,7 +5460,7 @@ var ZodIssueCode = {
5460
5460
  var ZodFirstPartyTypeKind;
5461
5461
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5462
5462
  //#endregion
5463
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5463
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5464
5464
  /**
5465
5465
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5466
5466
  * window to float samples (D455).
@@ -8356,7 +8356,11 @@ var ContributionSectionSchema = object({
8356
8356
  literal(4)
8357
8357
  ]).optional(),
8358
8358
  tab: string().optional(),
8359
- location: _enum(["settings", "top-tab"]).optional(),
8359
+ location: _enum([
8360
+ "settings",
8361
+ "top-tab",
8362
+ "hero"
8363
+ ]).optional(),
8360
8364
  order: number().optional(),
8361
8365
  fields: array(any())
8362
8366
  });
@@ -13903,7 +13907,11 @@ var ConfigSectionWithValuesSchema = object({
13903
13907
  literal(4)
13904
13908
  ]).optional(),
13905
13909
  tab: string().optional(),
13906
- location: _enum(["settings", "top-tab"]).optional(),
13910
+ location: _enum([
13911
+ "settings",
13912
+ "top-tab",
13913
+ "hero"
13914
+ ]).optional(),
13907
13915
  order: number().optional(),
13908
13916
  fields: array(any())
13909
13917
  });
@@ -17783,6 +17791,52 @@ var TierStatusSchema = object({
17783
17791
  countedAt: number().nullable()
17784
17792
  });
17785
17793
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17794
+ /**
17795
+ * Why a series is orphan. `device-gone`: its device is absent from the
17796
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17797
+ * key is declared by no capability any more (a field a cap removed).
17798
+ */
17799
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17800
+ /** Rows held per stored tier. */
17801
+ var TierRowsSchema = object({
17802
+ raw: number().int(),
17803
+ "5m": number().int(),
17804
+ "1h": number().int(),
17805
+ "1d": number().int()
17806
+ });
17807
+ var OrphanSeriesSchema = object({
17808
+ seriesId: number().int(),
17809
+ deviceId: number().int(),
17810
+ key: string(),
17811
+ scope: string(),
17812
+ /** The metric's display name; `null` when its metric row is gone too. */
17813
+ displayName: string().nullable(),
17814
+ reason: DeviceHistoryOrphanReasonSchema,
17815
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17816
+ missingSince: number().nullable(),
17817
+ firstTs: number(),
17818
+ lastTs: number(),
17819
+ rows: TierRowsSchema
17820
+ });
17821
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17822
+ "not-found",
17823
+ "not-orphan",
17824
+ "failed"
17825
+ ]);
17826
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17827
+ seriesId: number().int(),
17828
+ ok: literal(true),
17829
+ deleted: TierRowsSchema
17830
+ }), object({
17831
+ seriesId: number().int(),
17832
+ ok: literal(false),
17833
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17834
+ })]);
17835
+ var OrphanListSchema = object({
17836
+ series: array(OrphanSeriesSchema).readonly(),
17837
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17838
+ truncated: boolean()
17839
+ });
17786
17840
  var DeviceHistoryStatusSchema = object({
17787
17841
  startedAt: number(),
17788
17842
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17880,7 +17934,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17880
17934
  }), object({ enabled: boolean() }), {
17881
17935
  kind: "mutation",
17882
17936
  auth: "admin"
17883
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17937
+ }), 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() }), {
17938
+ kind: "mutation",
17939
+ auth: "admin"
17940
+ });
17884
17941
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17885
17942
  object({ state: literal("absent") }),
17886
17943
  object({
@@ -48744,7 +48801,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
48744
48801
  modelId: string()
48745
48802
  }),
48746
48803
  object({ kind: literal("cpu-device") }),
48747
- object({ kind: literal("coral-untouched") }),
48748
48804
  object({ kind: literal("device-disabled") }),
48749
48805
  object({ kind: literal("device-unavailable") }),
48750
48806
  object({ kind: literal("node-offline") }),
@@ -48842,11 +48898,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
48842
48898
  kind: literal("detector-store-unreadable"),
48843
48899
  error: string()
48844
48900
  }),
48845
- object({
48846
- kind: literal("coral-enabled"),
48847
- nodeId: string(),
48848
- deviceKey: string()
48849
- }),
48850
48901
  object({
48851
48902
  kind: literal("custom-pin-kept"),
48852
48903
  nodeId: string(),
@@ -56404,17 +56455,69 @@ var connectivityCapability = {
56404
56455
  volatileStateFields: ["lastChangedAt"]
56405
56456
  };
56406
56457
  /**
56407
- * Generic device-consumables capability — surfaces a device's
56408
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
56409
- * descaling cycles, …) with their remaining life and an optional
56410
- * "Replaced" reset action. Device-agnostic: any provider that knows its
56411
- * device tracks consumables can register it; the cap declares no
56412
- * vocabulary of its own — the provider names each item verbatim.
56458
+ * Generic device-consumables capability — the ONE place a device reports what
56459
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
56460
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
56461
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
56462
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
56463
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
56464
+ * its device tracks consumables registers it; the provider names each item
56465
+ * verbatim and says which `kind` it is.
56466
+ *
56467
+ * The admin UI renders it as ONE collapsible section directly under the
56468
+ * device page's hero card (`placement: 'hero'`), for every device bound to
56469
+ * this cap — never drawn by a device type's hero card itself (D915).
56413
56470
  *
56414
56471
  * Like `childLayout`, the cap is INERT until a provider sets items: no
56415
56472
  * provider populates it by guessing (no HA inference). The UI renders a
56416
56473
  * "No consumables reported" placeholder when `items` is empty.
56417
56474
  */
56475
+ /**
56476
+ * What an item IS, which decides which direction is bad:
56477
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
56478
+ * - `supply` — something the device draws from (clean water, detergent,
56479
+ * salt, rinse aid); low or empty is bad.
56480
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
56481
+ * bad.
56482
+ * Absent = `wear`.
56483
+ */
56484
+ var ConsumableKindSchema = _enum([
56485
+ "wear",
56486
+ "supply",
56487
+ "waste"
56488
+ ]);
56489
+ /**
56490
+ * What an item LOOKS like, which decides how a client draws it — independent
56491
+ * of `kind`, which decides which direction is bad:
56492
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
56493
+ * remaining time and a reset.
56494
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
56495
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
56496
+ * a stepped level and "refill".
56497
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
56498
+ * that warns when full.
56499
+ * Absent = derived from the kind ({@link consumableFormOf}).
56500
+ */
56501
+ var ConsumableFormSchema = _enum([
56502
+ "part",
56503
+ "tank",
56504
+ "product",
56505
+ "bin"
56506
+ ]);
56507
+ /** The provider's own discrete verdict on an item. */
56508
+ var ConsumableStatusSchema = _enum([
56509
+ "ok",
56510
+ "low",
56511
+ "empty",
56512
+ "full",
56513
+ "replace"
56514
+ ]);
56515
+ _enum([
56516
+ "ok",
56517
+ "low",
56518
+ "empty",
56519
+ "full"
56520
+ ]);
56418
56521
  /** Units a remaining-life counter is reported in. Closed: the panel renders
56419
56522
  * each. */
56420
56523
  var ConsumableRemainingUnitSchema = _enum([
@@ -56429,18 +56532,23 @@ var ConsumableRemainingSchema = object({
56429
56532
  unit: ConsumableRemainingUnitSchema
56430
56533
  });
56431
56534
  /** A single consumable item. Either a continuous `level` (remaining
56432
- * life %) or a discrete `status` may be known — both may be null when a
56433
- * provider only knows the item exists. `level` and `status` are not
56434
- * mutually exclusive; a provider may report both. */
56535
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
56536
+ * may be known — both may be null when a provider only knows the item
56537
+ * exists. `level` and `status` are not mutually exclusive; a provider may
56538
+ * report both. */
56435
56539
  var ConsumableItemSchema = object({
56436
56540
  /** Stable id, e.g. 'main-brush'. */
56437
56541
  key: string().min(1),
56438
56542
  /** Display name. */
56439
56543
  label: string().min(1),
56440
- /** Remaining life % when known (0..100). */
56544
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
56441
56545
  level: number().min(0).max(100).nullable(),
56442
- /** Discrete state when known (binary mode). */
56443
- status: _enum(["ok", "replace"]).nullable(),
56546
+ /** The provider's discrete verdict when known (binary mode). */
56547
+ status: ConsumableStatusSchema.nullable(),
56548
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
56549
+ kind: ConsumableKindSchema.optional(),
56550
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
56551
+ form: ConsumableFormSchema.optional(),
56444
56552
  /** Ms epoch of the last replace, when known. */
56445
56553
  lastResetAt: number().nullable(),
56446
56554
  /** Whether `reset()` is meaningful for this item. */
@@ -56463,7 +56571,7 @@ var consumablesCapability = {
56463
56571
  kind: "widget",
56464
56572
  widgetId: "host/consumables-panel",
56465
56573
  tab: "consumables",
56466
- topTab: true,
56574
+ placement: "hero",
56467
56575
  label: "Consumables",
56468
56576
  order: 5
56469
56577
  } },
@@ -56524,9 +56632,37 @@ reset: method(object({
56524
56632
  */
56525
56633
  durability: "restored",
56526
56634
  /**
56527
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
56635
+ * History (D850, D917): one series per (item field, item `key`) — the item key
56636
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
56637
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
56638
+ * their provider reports them; an item that appears later gets its series.
56528
56639
  */
56529
- history: "none",
56640
+ history: {
56641
+ fields: {},
56642
+ items: {
56643
+ path: "items",
56644
+ key: "key",
56645
+ label: "label",
56646
+ fields: {
56647
+ level: {
56648
+ kind: "gauge",
56649
+ unit: "%",
56650
+ deadband: 2,
56651
+ displayName: "Level"
56652
+ },
56653
+ status: {
56654
+ kind: "enum",
56655
+ displayName: "Status"
56656
+ },
56657
+ "remaining.value": {
56658
+ kind: "gauge",
56659
+ unitFrom: "remaining.unit",
56660
+ deadband: 1,
56661
+ displayName: "Remaining"
56662
+ }
56663
+ }
56664
+ }
56665
+ },
56530
56666
  /** Clocks, not content: a re-read that changed no item costs no commit. */
56531
56667
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
56532
56668
  };
@@ -56941,8 +57077,9 @@ onStatusChanged: { data: object({
56941
57077
  volatileStateFields: ["lastChangedAt"]
56942
57078
  };
56943
57079
  /**
56944
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56945
- * consumable levels (salt, rinse aid) and common program options.
57080
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
57081
+ * common program options. Salt and rinse aid are NOT here: they are items of
57082
+ * the device's `consumables` cap, like every other device's (D915).
56946
57083
  *
56947
57084
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56948
57085
  * by any integration that exposes the same program / option surface.
@@ -56990,11 +57127,6 @@ var DishwasherAvailabilitySchema = _enum([
56990
57127
  "offline",
56991
57128
  "description-missing"
56992
57129
  ]);
56993
- var DishwasherConsumableLevelSchema = _enum([
56994
- "ok",
56995
- "low",
56996
- "empty"
56997
- ]);
56998
57130
  var DishwasherStatusSchema = object({
56999
57131
  availability: DishwasherAvailabilitySchema,
57000
57132
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -57027,8 +57159,6 @@ var DishwasherStatusSchema = object({
57027
57159
  powerOn: boolean().nullable(),
57028
57160
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
57029
57161
  powerState: string().nullable(),
57030
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
57031
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
57032
57162
  /**
57033
57163
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
57034
57164
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -66414,60 +66544,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
66414
66544
  auth: "admin",
66415
66545
  access: "delete"
66416
66546
  });
66417
- /**
66418
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
66419
- * cleaning lifecycle plus a return-to-base / locate surface and an
66420
- * optional fan-speed selector.
66421
- *
66422
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
66423
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
66424
- * (0..100) is nullable — some vacuums don't report a battery
66425
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
66426
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
66427
- * tokens the hardware accepts so the UI renders only supported choices.
66428
- *
66429
- * The `setFanSpeed` method takes the bare `speed` token — the provider
66430
- * validates it against the vacuum's own list. `locate` triggers the
66431
- * find-me chirp; `returnToBase` sends it home.
66432
- *
66433
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
66434
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
66435
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
66436
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
66437
- * only when the device has no such tank at all, and use a `TankStatus`
66438
- * with both inner fields `null` when the tank exists but its level is
66439
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
66440
- * so the HA provider leaves all four `null`.
66441
- */
66442
- var VacuumStateSchema = _enum([
66443
- "idle",
66444
- "cleaning",
66445
- "paused",
66446
- "returning",
66447
- "docked",
66448
- "drying",
66449
- "error"
66450
- ]);
66451
- /**
66452
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
66453
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
66454
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
66455
- * level is currently unknown; the OWNING field being `null` means the
66456
- * hardware has no such tank at all.
66457
- */
66458
- var TankStatusSchema = object({
66459
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
66460
- level: number().min(0).max(100).nullable(),
66461
- /** Discrete state when the hardware is binary-mode; null otherwise. */
66462
- status: _enum([
66463
- "ok",
66464
- "low",
66465
- "full"
66466
- ]).nullable()
66467
- });
66468
66547
  var VacuumControlStatusSchema = object({
66469
66548
  /** Lifecycle state of the vacuum. */
66470
- state: VacuumStateSchema,
66549
+ state: _enum([
66550
+ "idle",
66551
+ "cleaning",
66552
+ "paused",
66553
+ "returning",
66554
+ "docked",
66555
+ "drying",
66556
+ "error"
66557
+ ]),
66471
66558
  /** 0..100 battery percentage. Null when the device has no battery
66472
66559
  * reading. */
66473
66560
  batteryLevel: number().min(0).max(100).nullable(),
@@ -66476,14 +66563,6 @@ var VacuumControlStatusSchema = object({
66476
66563
  fanSpeed: string().nullable(),
66477
66564
  /** Speed tokens the hardware accepts — drives the UI selector. */
66478
66565
  availableFanSpeeds: array(string()),
66479
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
66480
- cleanWater: TankStatusSchema.nullable(),
66481
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
66482
- dirtyWater: TankStatusSchema.nullable(),
66483
- /** Detergent tank. Null when the hardware has no detergent tank. */
66484
- detergent: TankStatusSchema.nullable(),
66485
- /** Dust bin. Null when the hardware has no dust bin. */
66486
- dustBin: TankStatusSchema.nullable(),
66487
66566
  /** 0..100 cleaning-completion percentage of the current task, or null. */
66488
66567
  progressPercent: number().min(0).max(100).nullable(),
66489
66568
  /** Current error code (0 / null = no error). */
@@ -66545,35 +66624,14 @@ var vacuumControlCapability = {
66545
66624
  */
66546
66625
  durability: "session",
66547
66626
  /**
66548
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
66627
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
66628
+ * items are keyed by runtime ids and record no history.
66549
66629
  */
66550
- history: { fields: {
66551
- batteryLevel: {
66552
- kind: "gauge",
66553
- unit: "%",
66554
- deadband: 2
66555
- },
66556
- "cleanWater.level": {
66557
- kind: "gauge",
66558
- unit: "%",
66559
- deadband: 2
66560
- },
66561
- "dirtyWater.level": {
66562
- kind: "gauge",
66563
- unit: "%",
66564
- deadband: 2
66565
- },
66566
- "detergent.level": {
66567
- kind: "gauge",
66568
- unit: "%",
66569
- deadband: 2
66570
- },
66571
- "dustBin.level": {
66572
- kind: "gauge",
66573
- unit: "%",
66574
- deadband: 2
66575
- }
66576
- } }
66630
+ history: { fields: { batteryLevel: {
66631
+ kind: "gauge",
66632
+ unit: "%",
66633
+ deadband: 2
66634
+ } } }
66577
66635
  };
66578
66636
  var ValveStatusSchema = object({
66579
66637
  /** Lifecycle state of the valve. */
@@ -70982,6 +71040,12 @@ Object.freeze({
70982
71040
  addonId: null,
70983
71041
  access: "create"
70984
71042
  },
71043
+ "deviceHistory.deleteOrphanSeries": {
71044
+ capName: "device-history",
71045
+ capScope: "system",
71046
+ addonId: null,
71047
+ access: "delete"
71048
+ },
70985
71049
  "deviceHistory.getDeviceEnabled": {
70986
71050
  capName: "device-history",
70987
71051
  capScope: "system",
@@ -71000,6 +71064,12 @@ Object.freeze({
71000
71064
  addonId: null,
71001
71065
  access: "view"
71002
71066
  },
71067
+ "deviceHistory.listOrphanSeries": {
71068
+ capName: "device-history",
71069
+ capScope: "system",
71070
+ addonId: null,
71071
+ access: "view"
71072
+ },
71003
71073
  "deviceHistory.listSeries": {
71004
71074
  capName: "device-history",
71005
71075
  capScope: "system",
@@ -81157,7 +81227,7 @@ var STATE_SUMMARY_VARS = [
81157
81227
  ([...RULE_TEXT], [...COMBINED_ALARM]),
81158
81228
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
81159
81229
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
81160
- ([...RULE_TEXT], [...CONSUMABLE]),
81230
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
81161
81231
  ([...RULE_TEXT], [...TANK]),
81162
81232
  [...RULE_TEXT],
81163
81233
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.203",
3
+ "version": "1.2.205",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",