@camstack/addon-provider-reolink 1.2.204 → 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 -117
  2. package/dist/addon.mjs +193 -117
  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({
@@ -56406,17 +56463,69 @@ var connectivityCapability = {
56406
56463
  volatileStateFields: ["lastChangedAt"]
56407
56464
  };
56408
56465
  /**
56409
- * Generic device-consumables capability — surfaces a device's
56410
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
56411
- * descaling cycles, …) with their remaining life and an optional
56412
- * "Replaced" reset action. Device-agnostic: any provider that knows its
56413
- * device tracks consumables can register it; the cap declares no
56414
- * 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).
56415
56478
  *
56416
56479
  * Like `childLayout`, the cap is INERT until a provider sets items: no
56417
56480
  * provider populates it by guessing (no HA inference). The UI renders a
56418
56481
  * "No consumables reported" placeholder when `items` is empty.
56419
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
+ ]);
56420
56529
  /** Units a remaining-life counter is reported in. Closed: the panel renders
56421
56530
  * each. */
56422
56531
  var ConsumableRemainingUnitSchema = _enum([
@@ -56431,18 +56540,23 @@ var ConsumableRemainingSchema = object({
56431
56540
  unit: ConsumableRemainingUnitSchema
56432
56541
  });
56433
56542
  /** A single consumable item. Either a continuous `level` (remaining
56434
- * life %) or a discrete `status` may be known — both may be null when a
56435
- * provider only knows the item exists. `level` and `status` are not
56436
- * 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. */
56437
56547
  var ConsumableItemSchema = object({
56438
56548
  /** Stable id, e.g. 'main-brush'. */
56439
56549
  key: string().min(1),
56440
56550
  /** Display name. */
56441
56551
  label: string().min(1),
56442
- /** Remaining life % when known (0..100). */
56552
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
56443
56553
  level: number().min(0).max(100).nullable(),
56444
- /** Discrete state when known (binary mode). */
56445
- 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(),
56446
56560
  /** Ms epoch of the last replace, when known. */
56447
56561
  lastResetAt: number().nullable(),
56448
56562
  /** Whether `reset()` is meaningful for this item. */
@@ -56465,7 +56579,7 @@ var consumablesCapability = {
56465
56579
  kind: "widget",
56466
56580
  widgetId: "host/consumables-panel",
56467
56581
  tab: "consumables",
56468
- topTab: true,
56582
+ placement: "hero",
56469
56583
  label: "Consumables",
56470
56584
  order: 5
56471
56585
  } },
@@ -56526,9 +56640,37 @@ reset: method(object({
56526
56640
  */
56527
56641
  durability: "restored",
56528
56642
  /**
56529
- * 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.
56530
56647
  */
56531
- 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
+ },
56532
56674
  /** Clocks, not content: a re-read that changed no item costs no commit. */
56533
56675
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
56534
56676
  };
@@ -56943,8 +57085,9 @@ onStatusChanged: { data: object({
56943
57085
  volatileStateFields: ["lastChangedAt"]
56944
57086
  };
56945
57087
  /**
56946
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56947
- * 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).
56948
57091
  *
56949
57092
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56950
57093
  * by any integration that exposes the same program / option surface.
@@ -56992,11 +57135,6 @@ var DishwasherAvailabilitySchema = _enum([
56992
57135
  "offline",
56993
57136
  "description-missing"
56994
57137
  ]);
56995
- var DishwasherConsumableLevelSchema = _enum([
56996
- "ok",
56997
- "low",
56998
- "empty"
56999
- ]);
57000
57138
  var DishwasherStatusSchema = object({
57001
57139
  availability: DishwasherAvailabilitySchema,
57002
57140
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -57029,8 +57167,6 @@ var DishwasherStatusSchema = object({
57029
57167
  powerOn: boolean().nullable(),
57030
57168
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
57031
57169
  powerState: string().nullable(),
57032
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
57033
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
57034
57170
  /**
57035
57171
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
57036
57172
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -66416,60 +66552,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
66416
66552
  auth: "admin",
66417
66553
  access: "delete"
66418
66554
  });
66419
- /**
66420
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
66421
- * cleaning lifecycle plus a return-to-base / locate surface and an
66422
- * optional fan-speed selector.
66423
- *
66424
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
66425
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
66426
- * (0..100) is nullable — some vacuums don't report a battery
66427
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
66428
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
66429
- * tokens the hardware accepts so the UI renders only supported choices.
66430
- *
66431
- * The `setFanSpeed` method takes the bare `speed` token — the provider
66432
- * validates it against the vacuum's own list. `locate` triggers the
66433
- * find-me chirp; `returnToBase` sends it home.
66434
- *
66435
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
66436
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
66437
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
66438
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
66439
- * only when the device has no such tank at all, and use a `TankStatus`
66440
- * with both inner fields `null` when the tank exists but its level is
66441
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
66442
- * so the HA provider leaves all four `null`.
66443
- */
66444
- var VacuumStateSchema = _enum([
66445
- "idle",
66446
- "cleaning",
66447
- "paused",
66448
- "returning",
66449
- "docked",
66450
- "drying",
66451
- "error"
66452
- ]);
66453
- /**
66454
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
66455
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
66456
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
66457
- * level is currently unknown; the OWNING field being `null` means the
66458
- * hardware has no such tank at all.
66459
- */
66460
- var TankStatusSchema = object({
66461
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
66462
- level: number().min(0).max(100).nullable(),
66463
- /** Discrete state when the hardware is binary-mode; null otherwise. */
66464
- status: _enum([
66465
- "ok",
66466
- "low",
66467
- "full"
66468
- ]).nullable()
66469
- });
66470
66555
  var VacuumControlStatusSchema = object({
66471
66556
  /** Lifecycle state of the vacuum. */
66472
- state: VacuumStateSchema,
66557
+ state: _enum([
66558
+ "idle",
66559
+ "cleaning",
66560
+ "paused",
66561
+ "returning",
66562
+ "docked",
66563
+ "drying",
66564
+ "error"
66565
+ ]),
66473
66566
  /** 0..100 battery percentage. Null when the device has no battery
66474
66567
  * reading. */
66475
66568
  batteryLevel: number().min(0).max(100).nullable(),
@@ -66478,14 +66571,6 @@ var VacuumControlStatusSchema = object({
66478
66571
  fanSpeed: string().nullable(),
66479
66572
  /** Speed tokens the hardware accepts — drives the UI selector. */
66480
66573
  availableFanSpeeds: array(string()),
66481
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
66482
- cleanWater: TankStatusSchema.nullable(),
66483
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
66484
- dirtyWater: TankStatusSchema.nullable(),
66485
- /** Detergent tank. Null when the hardware has no detergent tank. */
66486
- detergent: TankStatusSchema.nullable(),
66487
- /** Dust bin. Null when the hardware has no dust bin. */
66488
- dustBin: TankStatusSchema.nullable(),
66489
66574
  /** 0..100 cleaning-completion percentage of the current task, or null. */
66490
66575
  progressPercent: number().min(0).max(100).nullable(),
66491
66576
  /** Current error code (0 / null = no error). */
@@ -66547,35 +66632,14 @@ var vacuumControlCapability = {
66547
66632
  */
66548
66633
  durability: "session",
66549
66634
  /**
66550
- * 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.
66551
66637
  */
66552
- history: { fields: {
66553
- batteryLevel: {
66554
- kind: "gauge",
66555
- unit: "%",
66556
- deadband: 2
66557
- },
66558
- "cleanWater.level": {
66559
- kind: "gauge",
66560
- unit: "%",
66561
- deadband: 2
66562
- },
66563
- "dirtyWater.level": {
66564
- kind: "gauge",
66565
- unit: "%",
66566
- deadband: 2
66567
- },
66568
- "detergent.level": {
66569
- kind: "gauge",
66570
- unit: "%",
66571
- deadband: 2
66572
- },
66573
- "dustBin.level": {
66574
- kind: "gauge",
66575
- unit: "%",
66576
- deadband: 2
66577
- }
66578
- } }
66638
+ history: { fields: { batteryLevel: {
66639
+ kind: "gauge",
66640
+ unit: "%",
66641
+ deadband: 2
66642
+ } } }
66579
66643
  };
66580
66644
  var ValveStatusSchema = object({
66581
66645
  /** Lifecycle state of the valve. */
@@ -70984,6 +71048,12 @@ Object.freeze({
70984
71048
  addonId: null,
70985
71049
  access: "create"
70986
71050
  },
71051
+ "deviceHistory.deleteOrphanSeries": {
71052
+ capName: "device-history",
71053
+ capScope: "system",
71054
+ addonId: null,
71055
+ access: "delete"
71056
+ },
70987
71057
  "deviceHistory.getDeviceEnabled": {
70988
71058
  capName: "device-history",
70989
71059
  capScope: "system",
@@ -71002,6 +71072,12 @@ Object.freeze({
71002
71072
  addonId: null,
71003
71073
  access: "view"
71004
71074
  },
71075
+ "deviceHistory.listOrphanSeries": {
71076
+ capName: "device-history",
71077
+ capScope: "system",
71078
+ addonId: null,
71079
+ access: "view"
71080
+ },
71005
71081
  "deviceHistory.listSeries": {
71006
71082
  capName: "device-history",
71007
71083
  capScope: "system",
@@ -81159,7 +81235,7 @@ var STATE_SUMMARY_VARS = [
81159
81235
  ([...RULE_TEXT], [...COMBINED_ALARM]),
81160
81236
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
81161
81237
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
81162
- ([...RULE_TEXT], [...CONSUMABLE]),
81238
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
81163
81239
  ([...RULE_TEXT], [...TANK]),
81164
81240
  [...RULE_TEXT],
81165
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({
@@ -56398,17 +56455,69 @@ var connectivityCapability = {
56398
56455
  volatileStateFields: ["lastChangedAt"]
56399
56456
  };
56400
56457
  /**
56401
- * Generic device-consumables capability — surfaces a device's
56402
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
56403
- * descaling cycles, …) with their remaining life and an optional
56404
- * "Replaced" reset action. Device-agnostic: any provider that knows its
56405
- * device tracks consumables can register it; the cap declares no
56406
- * 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).
56407
56470
  *
56408
56471
  * Like `childLayout`, the cap is INERT until a provider sets items: no
56409
56472
  * provider populates it by guessing (no HA inference). The UI renders a
56410
56473
  * "No consumables reported" placeholder when `items` is empty.
56411
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
+ ]);
56412
56521
  /** Units a remaining-life counter is reported in. Closed: the panel renders
56413
56522
  * each. */
56414
56523
  var ConsumableRemainingUnitSchema = _enum([
@@ -56423,18 +56532,23 @@ var ConsumableRemainingSchema = object({
56423
56532
  unit: ConsumableRemainingUnitSchema
56424
56533
  });
56425
56534
  /** A single consumable item. Either a continuous `level` (remaining
56426
- * life %) or a discrete `status` may be known — both may be null when a
56427
- * provider only knows the item exists. `level` and `status` are not
56428
- * 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. */
56429
56539
  var ConsumableItemSchema = object({
56430
56540
  /** Stable id, e.g. 'main-brush'. */
56431
56541
  key: string().min(1),
56432
56542
  /** Display name. */
56433
56543
  label: string().min(1),
56434
- /** Remaining life % when known (0..100). */
56544
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
56435
56545
  level: number().min(0).max(100).nullable(),
56436
- /** Discrete state when known (binary mode). */
56437
- 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(),
56438
56552
  /** Ms epoch of the last replace, when known. */
56439
56553
  lastResetAt: number().nullable(),
56440
56554
  /** Whether `reset()` is meaningful for this item. */
@@ -56457,7 +56571,7 @@ var consumablesCapability = {
56457
56571
  kind: "widget",
56458
56572
  widgetId: "host/consumables-panel",
56459
56573
  tab: "consumables",
56460
- topTab: true,
56574
+ placement: "hero",
56461
56575
  label: "Consumables",
56462
56576
  order: 5
56463
56577
  } },
@@ -56518,9 +56632,37 @@ reset: method(object({
56518
56632
  */
56519
56633
  durability: "restored",
56520
56634
  /**
56521
- * 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.
56522
56639
  */
56523
- 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
+ },
56524
56666
  /** Clocks, not content: a re-read that changed no item costs no commit. */
56525
56667
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
56526
56668
  };
@@ -56935,8 +57077,9 @@ onStatusChanged: { data: object({
56935
57077
  volatileStateFields: ["lastChangedAt"]
56936
57078
  };
56937
57079
  /**
56938
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56939
- * 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).
56940
57083
  *
56941
57084
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56942
57085
  * by any integration that exposes the same program / option surface.
@@ -56984,11 +57127,6 @@ var DishwasherAvailabilitySchema = _enum([
56984
57127
  "offline",
56985
57128
  "description-missing"
56986
57129
  ]);
56987
- var DishwasherConsumableLevelSchema = _enum([
56988
- "ok",
56989
- "low",
56990
- "empty"
56991
- ]);
56992
57130
  var DishwasherStatusSchema = object({
56993
57131
  availability: DishwasherAvailabilitySchema,
56994
57132
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -57021,8 +57159,6 @@ var DishwasherStatusSchema = object({
57021
57159
  powerOn: boolean().nullable(),
57022
57160
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
57023
57161
  powerState: string().nullable(),
57024
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
57025
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
57026
57162
  /**
57027
57163
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
57028
57164
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -66408,60 +66544,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
66408
66544
  auth: "admin",
66409
66545
  access: "delete"
66410
66546
  });
66411
- /**
66412
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
66413
- * cleaning lifecycle plus a return-to-base / locate surface and an
66414
- * optional fan-speed selector.
66415
- *
66416
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
66417
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
66418
- * (0..100) is nullable — some vacuums don't report a battery
66419
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
66420
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
66421
- * tokens the hardware accepts so the UI renders only supported choices.
66422
- *
66423
- * The `setFanSpeed` method takes the bare `speed` token — the provider
66424
- * validates it against the vacuum's own list. `locate` triggers the
66425
- * find-me chirp; `returnToBase` sends it home.
66426
- *
66427
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
66428
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
66429
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
66430
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
66431
- * only when the device has no such tank at all, and use a `TankStatus`
66432
- * with both inner fields `null` when the tank exists but its level is
66433
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
66434
- * so the HA provider leaves all four `null`.
66435
- */
66436
- var VacuumStateSchema = _enum([
66437
- "idle",
66438
- "cleaning",
66439
- "paused",
66440
- "returning",
66441
- "docked",
66442
- "drying",
66443
- "error"
66444
- ]);
66445
- /**
66446
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
66447
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
66448
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
66449
- * level is currently unknown; the OWNING field being `null` means the
66450
- * hardware has no such tank at all.
66451
- */
66452
- var TankStatusSchema = object({
66453
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
66454
- level: number().min(0).max(100).nullable(),
66455
- /** Discrete state when the hardware is binary-mode; null otherwise. */
66456
- status: _enum([
66457
- "ok",
66458
- "low",
66459
- "full"
66460
- ]).nullable()
66461
- });
66462
66547
  var VacuumControlStatusSchema = object({
66463
66548
  /** Lifecycle state of the vacuum. */
66464
- state: VacuumStateSchema,
66549
+ state: _enum([
66550
+ "idle",
66551
+ "cleaning",
66552
+ "paused",
66553
+ "returning",
66554
+ "docked",
66555
+ "drying",
66556
+ "error"
66557
+ ]),
66465
66558
  /** 0..100 battery percentage. Null when the device has no battery
66466
66559
  * reading. */
66467
66560
  batteryLevel: number().min(0).max(100).nullable(),
@@ -66470,14 +66563,6 @@ var VacuumControlStatusSchema = object({
66470
66563
  fanSpeed: string().nullable(),
66471
66564
  /** Speed tokens the hardware accepts — drives the UI selector. */
66472
66565
  availableFanSpeeds: array(string()),
66473
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
66474
- cleanWater: TankStatusSchema.nullable(),
66475
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
66476
- dirtyWater: TankStatusSchema.nullable(),
66477
- /** Detergent tank. Null when the hardware has no detergent tank. */
66478
- detergent: TankStatusSchema.nullable(),
66479
- /** Dust bin. Null when the hardware has no dust bin. */
66480
- dustBin: TankStatusSchema.nullable(),
66481
66566
  /** 0..100 cleaning-completion percentage of the current task, or null. */
66482
66567
  progressPercent: number().min(0).max(100).nullable(),
66483
66568
  /** Current error code (0 / null = no error). */
@@ -66539,35 +66624,14 @@ var vacuumControlCapability = {
66539
66624
  */
66540
66625
  durability: "session",
66541
66626
  /**
66542
- * 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.
66543
66629
  */
66544
- history: { fields: {
66545
- batteryLevel: {
66546
- kind: "gauge",
66547
- unit: "%",
66548
- deadband: 2
66549
- },
66550
- "cleanWater.level": {
66551
- kind: "gauge",
66552
- unit: "%",
66553
- deadband: 2
66554
- },
66555
- "dirtyWater.level": {
66556
- kind: "gauge",
66557
- unit: "%",
66558
- deadband: 2
66559
- },
66560
- "detergent.level": {
66561
- kind: "gauge",
66562
- unit: "%",
66563
- deadband: 2
66564
- },
66565
- "dustBin.level": {
66566
- kind: "gauge",
66567
- unit: "%",
66568
- deadband: 2
66569
- }
66570
- } }
66630
+ history: { fields: { batteryLevel: {
66631
+ kind: "gauge",
66632
+ unit: "%",
66633
+ deadband: 2
66634
+ } } }
66571
66635
  };
66572
66636
  var ValveStatusSchema = object({
66573
66637
  /** Lifecycle state of the valve. */
@@ -70976,6 +71040,12 @@ Object.freeze({
70976
71040
  addonId: null,
70977
71041
  access: "create"
70978
71042
  },
71043
+ "deviceHistory.deleteOrphanSeries": {
71044
+ capName: "device-history",
71045
+ capScope: "system",
71046
+ addonId: null,
71047
+ access: "delete"
71048
+ },
70979
71049
  "deviceHistory.getDeviceEnabled": {
70980
71050
  capName: "device-history",
70981
71051
  capScope: "system",
@@ -70994,6 +71064,12 @@ Object.freeze({
70994
71064
  addonId: null,
70995
71065
  access: "view"
70996
71066
  },
71067
+ "deviceHistory.listOrphanSeries": {
71068
+ capName: "device-history",
71069
+ capScope: "system",
71070
+ addonId: null,
71071
+ access: "view"
71072
+ },
70997
71073
  "deviceHistory.listSeries": {
70998
71074
  capName: "device-history",
70999
71075
  capScope: "system",
@@ -81151,7 +81227,7 @@ var STATE_SUMMARY_VARS = [
81151
81227
  ([...RULE_TEXT], [...COMBINED_ALARM]),
81152
81228
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
81153
81229
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
81154
- ([...RULE_TEXT], [...CONSUMABLE]),
81230
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
81155
81231
  ([...RULE_TEXT], [...TANK]),
81156
81232
  [...RULE_TEXT],
81157
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.204",
3
+ "version": "1.2.205",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",