@camstack/addon-provider-velux 0.2.142 → 0.2.144

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
@@ -5431,7 +5431,7 @@ var ZodIssueCode = {
5431
5431
  var ZodFirstPartyTypeKind;
5432
5432
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5433
5433
  //#endregion
5434
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5434
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5435
5435
  /**
5436
5436
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5437
5437
  * window to float samples (D455).
@@ -8323,7 +8323,11 @@ var ContributionSectionSchema = object({
8323
8323
  literal(4)
8324
8324
  ]).optional(),
8325
8325
  tab: string().optional(),
8326
- location: _enum(["settings", "top-tab"]).optional(),
8326
+ location: _enum([
8327
+ "settings",
8328
+ "top-tab",
8329
+ "hero"
8330
+ ]).optional(),
8327
8331
  order: number().optional(),
8328
8332
  fields: array(any())
8329
8333
  });
@@ -13270,7 +13274,11 @@ var ConfigSectionWithValuesSchema = object({
13270
13274
  literal(4)
13271
13275
  ]).optional(),
13272
13276
  tab: string().optional(),
13273
- location: _enum(["settings", "top-tab"]).optional(),
13277
+ location: _enum([
13278
+ "settings",
13279
+ "top-tab",
13280
+ "hero"
13281
+ ]).optional(),
13274
13282
  order: number().optional(),
13275
13283
  fields: array(any())
13276
13284
  });
@@ -17150,6 +17158,52 @@ var TierStatusSchema = object({
17150
17158
  countedAt: number().nullable()
17151
17159
  });
17152
17160
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17161
+ /**
17162
+ * Why a series is orphan. `device-gone`: its device is absent from the
17163
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17164
+ * key is declared by no capability any more (a field a cap removed).
17165
+ */
17166
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17167
+ /** Rows held per stored tier. */
17168
+ var TierRowsSchema = object({
17169
+ raw: number().int(),
17170
+ "5m": number().int(),
17171
+ "1h": number().int(),
17172
+ "1d": number().int()
17173
+ });
17174
+ var OrphanSeriesSchema = object({
17175
+ seriesId: number().int(),
17176
+ deviceId: number().int(),
17177
+ key: string(),
17178
+ scope: string(),
17179
+ /** The metric's display name; `null` when its metric row is gone too. */
17180
+ displayName: string().nullable(),
17181
+ reason: DeviceHistoryOrphanReasonSchema,
17182
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17183
+ missingSince: number().nullable(),
17184
+ firstTs: number(),
17185
+ lastTs: number(),
17186
+ rows: TierRowsSchema
17187
+ });
17188
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17189
+ "not-found",
17190
+ "not-orphan",
17191
+ "failed"
17192
+ ]);
17193
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17194
+ seriesId: number().int(),
17195
+ ok: literal(true),
17196
+ deleted: TierRowsSchema
17197
+ }), object({
17198
+ seriesId: number().int(),
17199
+ ok: literal(false),
17200
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17201
+ })]);
17202
+ var OrphanListSchema = object({
17203
+ series: array(OrphanSeriesSchema).readonly(),
17204
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17205
+ truncated: boolean()
17206
+ });
17153
17207
  var DeviceHistoryStatusSchema = object({
17154
17208
  startedAt: number(),
17155
17209
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17247,7 +17301,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17247
17301
  }), object({ enabled: boolean() }), {
17248
17302
  kind: "mutation",
17249
17303
  auth: "admin"
17250
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17304
+ }), 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() }), {
17305
+ kind: "mutation",
17306
+ auth: "admin"
17307
+ });
17251
17308
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17252
17309
  object({ state: literal("absent") }),
17253
17310
  object({
@@ -48071,7 +48128,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
48071
48128
  modelId: string()
48072
48129
  }),
48073
48130
  object({ kind: literal("cpu-device") }),
48074
- object({ kind: literal("coral-untouched") }),
48075
48131
  object({ kind: literal("device-disabled") }),
48076
48132
  object({ kind: literal("device-unavailable") }),
48077
48133
  object({ kind: literal("node-offline") }),
@@ -48169,11 +48225,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
48169
48225
  kind: literal("detector-store-unreadable"),
48170
48226
  error: string()
48171
48227
  }),
48172
- object({
48173
- kind: literal("coral-enabled"),
48174
- nodeId: string(),
48175
- deviceKey: string()
48176
- }),
48177
48228
  object({
48178
48229
  kind: literal("custom-pin-kept"),
48179
48230
  nodeId: string(),
@@ -55209,17 +55260,69 @@ var connectivityCapability = {
55209
55260
  volatileStateFields: ["lastChangedAt"]
55210
55261
  };
55211
55262
  /**
55212
- * Generic device-consumables capability — surfaces a device's
55213
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
55214
- * descaling cycles, …) with their remaining life and an optional
55215
- * "Replaced" reset action. Device-agnostic: any provider that knows its
55216
- * device tracks consumables can register it; the cap declares no
55217
- * vocabulary of its own — the provider names each item verbatim.
55263
+ * Generic device-consumables capability — the ONE place a device reports what
55264
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
55265
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
55266
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
55267
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
55268
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
55269
+ * its device tracks consumables registers it; the provider names each item
55270
+ * verbatim and says which `kind` it is.
55271
+ *
55272
+ * The admin UI renders it as ONE collapsible section directly under the
55273
+ * device page's hero card (`placement: 'hero'`), for every device bound to
55274
+ * this cap — never drawn by a device type's hero card itself (D915).
55218
55275
  *
55219
55276
  * Like `childLayout`, the cap is INERT until a provider sets items: no
55220
55277
  * provider populates it by guessing (no HA inference). The UI renders a
55221
55278
  * "No consumables reported" placeholder when `items` is empty.
55222
55279
  */
55280
+ /**
55281
+ * What an item IS, which decides which direction is bad:
55282
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
55283
+ * - `supply` — something the device draws from (clean water, detergent,
55284
+ * salt, rinse aid); low or empty is bad.
55285
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
55286
+ * bad.
55287
+ * Absent = `wear`.
55288
+ */
55289
+ var ConsumableKindSchema = _enum([
55290
+ "wear",
55291
+ "supply",
55292
+ "waste"
55293
+ ]);
55294
+ /**
55295
+ * What an item LOOKS like, which decides how a client draws it — independent
55296
+ * of `kind`, which decides which direction is bad:
55297
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
55298
+ * remaining time and a reset.
55299
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
55300
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
55301
+ * a stepped level and "refill".
55302
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
55303
+ * that warns when full.
55304
+ * Absent = derived from the kind ({@link consumableFormOf}).
55305
+ */
55306
+ var ConsumableFormSchema = _enum([
55307
+ "part",
55308
+ "tank",
55309
+ "product",
55310
+ "bin"
55311
+ ]);
55312
+ /** The provider's own discrete verdict on an item. */
55313
+ var ConsumableStatusSchema = _enum([
55314
+ "ok",
55315
+ "low",
55316
+ "empty",
55317
+ "full",
55318
+ "replace"
55319
+ ]);
55320
+ _enum([
55321
+ "ok",
55322
+ "low",
55323
+ "empty",
55324
+ "full"
55325
+ ]);
55223
55326
  /** Units a remaining-life counter is reported in. Closed: the panel renders
55224
55327
  * each. */
55225
55328
  var ConsumableRemainingUnitSchema = _enum([
@@ -55234,18 +55337,23 @@ var ConsumableRemainingSchema = object({
55234
55337
  unit: ConsumableRemainingUnitSchema
55235
55338
  });
55236
55339
  /** A single consumable item. Either a continuous `level` (remaining
55237
- * life %) or a discrete `status` may be known — both may be null when a
55238
- * provider only knows the item exists. `level` and `status` are not
55239
- * mutually exclusive; a provider may report both. */
55340
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
55341
+ * may be known — both may be null when a provider only knows the item
55342
+ * exists. `level` and `status` are not mutually exclusive; a provider may
55343
+ * report both. */
55240
55344
  var ConsumableItemSchema = object({
55241
55345
  /** Stable id, e.g. 'main-brush'. */
55242
55346
  key: string().min(1),
55243
55347
  /** Display name. */
55244
55348
  label: string().min(1),
55245
- /** Remaining life % when known (0..100). */
55349
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
55246
55350
  level: number().min(0).max(100).nullable(),
55247
- /** Discrete state when known (binary mode). */
55248
- status: _enum(["ok", "replace"]).nullable(),
55351
+ /** The provider's discrete verdict when known (binary mode). */
55352
+ status: ConsumableStatusSchema.nullable(),
55353
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
55354
+ kind: ConsumableKindSchema.optional(),
55355
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
55356
+ form: ConsumableFormSchema.optional(),
55249
55357
  /** Ms epoch of the last replace, when known. */
55250
55358
  lastResetAt: number().nullable(),
55251
55359
  /** Whether `reset()` is meaningful for this item. */
@@ -55268,7 +55376,7 @@ var consumablesCapability = {
55268
55376
  kind: "widget",
55269
55377
  widgetId: "host/consumables-panel",
55270
55378
  tab: "consumables",
55271
- topTab: true,
55379
+ placement: "hero",
55272
55380
  label: "Consumables",
55273
55381
  order: 5
55274
55382
  } },
@@ -55329,9 +55437,37 @@ reset: method(object({
55329
55437
  */
55330
55438
  durability: "restored",
55331
55439
  /**
55332
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
55440
+ * History (D850, D917): one series per (item field, item `key`) — the item key
55441
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
55442
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
55443
+ * their provider reports them; an item that appears later gets its series.
55333
55444
  */
55334
- history: "none",
55445
+ history: {
55446
+ fields: {},
55447
+ items: {
55448
+ path: "items",
55449
+ key: "key",
55450
+ label: "label",
55451
+ fields: {
55452
+ level: {
55453
+ kind: "gauge",
55454
+ unit: "%",
55455
+ deadband: 2,
55456
+ displayName: "Level"
55457
+ },
55458
+ status: {
55459
+ kind: "enum",
55460
+ displayName: "Status"
55461
+ },
55462
+ "remaining.value": {
55463
+ kind: "gauge",
55464
+ unitFrom: "remaining.unit",
55465
+ deadband: 1,
55466
+ displayName: "Remaining"
55467
+ }
55468
+ }
55469
+ }
55470
+ },
55335
55471
  /** Clocks, not content: a re-read that changed no item costs no commit. */
55336
55472
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
55337
55473
  };
@@ -55746,8 +55882,9 @@ onStatusChanged: { data: object({
55746
55882
  volatileStateFields: ["lastChangedAt"]
55747
55883
  };
55748
55884
  /**
55749
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55750
- * consumable levels (salt, rinse aid) and common program options.
55885
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
55886
+ * common program options. Salt and rinse aid are NOT here: they are items of
55887
+ * the device's `consumables` cap, like every other device's (D915).
55751
55888
  *
55752
55889
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55753
55890
  * by any integration that exposes the same program / option surface.
@@ -55795,11 +55932,6 @@ var DishwasherAvailabilitySchema = _enum([
55795
55932
  "offline",
55796
55933
  "description-missing"
55797
55934
  ]);
55798
- var DishwasherConsumableLevelSchema = _enum([
55799
- "ok",
55800
- "low",
55801
- "empty"
55802
- ]);
55803
55935
  var DishwasherStatusSchema = object({
55804
55936
  availability: DishwasherAvailabilitySchema,
55805
55937
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -55832,8 +55964,6 @@ var DishwasherStatusSchema = object({
55832
55964
  powerOn: boolean().nullable(),
55833
55965
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55834
55966
  powerState: string().nullable(),
55835
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
55836
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55837
55967
  /**
55838
55968
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55839
55969
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -64649,60 +64779,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64649
64779
  auth: "admin",
64650
64780
  access: "delete"
64651
64781
  });
64652
- /**
64653
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
64654
- * cleaning lifecycle plus a return-to-base / locate surface and an
64655
- * optional fan-speed selector.
64656
- *
64657
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
64658
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
64659
- * (0..100) is nullable — some vacuums don't report a battery
64660
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
64661
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
64662
- * tokens the hardware accepts so the UI renders only supported choices.
64663
- *
64664
- * The `setFanSpeed` method takes the bare `speed` token — the provider
64665
- * validates it against the vacuum's own list. `locate` triggers the
64666
- * find-me chirp; `returnToBase` sends it home.
64667
- *
64668
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
64669
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
64670
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
64671
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
64672
- * only when the device has no such tank at all, and use a `TankStatus`
64673
- * with both inner fields `null` when the tank exists but its level is
64674
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
64675
- * so the HA provider leaves all four `null`.
64676
- */
64677
- var VacuumStateSchema = _enum([
64678
- "idle",
64679
- "cleaning",
64680
- "paused",
64681
- "returning",
64682
- "docked",
64683
- "drying",
64684
- "error"
64685
- ]);
64686
- /**
64687
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
64688
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
64689
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
64690
- * level is currently unknown; the OWNING field being `null` means the
64691
- * hardware has no such tank at all.
64692
- */
64693
- var TankStatusSchema = object({
64694
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
64695
- level: number().min(0).max(100).nullable(),
64696
- /** Discrete state when the hardware is binary-mode; null otherwise. */
64697
- status: _enum([
64698
- "ok",
64699
- "low",
64700
- "full"
64701
- ]).nullable()
64702
- });
64703
64782
  var VacuumControlStatusSchema = object({
64704
64783
  /** Lifecycle state of the vacuum. */
64705
- state: VacuumStateSchema,
64784
+ state: _enum([
64785
+ "idle",
64786
+ "cleaning",
64787
+ "paused",
64788
+ "returning",
64789
+ "docked",
64790
+ "drying",
64791
+ "error"
64792
+ ]),
64706
64793
  /** 0..100 battery percentage. Null when the device has no battery
64707
64794
  * reading. */
64708
64795
  batteryLevel: number().min(0).max(100).nullable(),
@@ -64711,14 +64798,6 @@ var VacuumControlStatusSchema = object({
64711
64798
  fanSpeed: string().nullable(),
64712
64799
  /** Speed tokens the hardware accepts — drives the UI selector. */
64713
64800
  availableFanSpeeds: array(string()),
64714
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
64715
- cleanWater: TankStatusSchema.nullable(),
64716
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
64717
- dirtyWater: TankStatusSchema.nullable(),
64718
- /** Detergent tank. Null when the hardware has no detergent tank. */
64719
- detergent: TankStatusSchema.nullable(),
64720
- /** Dust bin. Null when the hardware has no dust bin. */
64721
- dustBin: TankStatusSchema.nullable(),
64722
64801
  /** 0..100 cleaning-completion percentage of the current task, or null. */
64723
64802
  progressPercent: number().min(0).max(100).nullable(),
64724
64803
  /** Current error code (0 / null = no error). */
@@ -64780,35 +64859,14 @@ var vacuumControlCapability = {
64780
64859
  */
64781
64860
  durability: "session",
64782
64861
  /**
64783
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
64862
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
64863
+ * items are keyed by runtime ids and record no history.
64784
64864
  */
64785
- history: { fields: {
64786
- batteryLevel: {
64787
- kind: "gauge",
64788
- unit: "%",
64789
- deadband: 2
64790
- },
64791
- "cleanWater.level": {
64792
- kind: "gauge",
64793
- unit: "%",
64794
- deadband: 2
64795
- },
64796
- "dirtyWater.level": {
64797
- kind: "gauge",
64798
- unit: "%",
64799
- deadband: 2
64800
- },
64801
- "detergent.level": {
64802
- kind: "gauge",
64803
- unit: "%",
64804
- deadband: 2
64805
- },
64806
- "dustBin.level": {
64807
- kind: "gauge",
64808
- unit: "%",
64809
- deadband: 2
64810
- }
64811
- } }
64865
+ history: { fields: { batteryLevel: {
64866
+ kind: "gauge",
64867
+ unit: "%",
64868
+ deadband: 2
64869
+ } } }
64812
64870
  };
64813
64871
  var ValveStatusSchema = object({
64814
64872
  /** Lifecycle state of the valve. */
@@ -69202,6 +69260,12 @@ Object.freeze({
69202
69260
  addonId: null,
69203
69261
  access: "create"
69204
69262
  },
69263
+ "deviceHistory.deleteOrphanSeries": {
69264
+ capName: "device-history",
69265
+ capScope: "system",
69266
+ addonId: null,
69267
+ access: "delete"
69268
+ },
69205
69269
  "deviceHistory.getDeviceEnabled": {
69206
69270
  capName: "device-history",
69207
69271
  capScope: "system",
@@ -69220,6 +69284,12 @@ Object.freeze({
69220
69284
  addonId: null,
69221
69285
  access: "view"
69222
69286
  },
69287
+ "deviceHistory.listOrphanSeries": {
69288
+ capName: "device-history",
69289
+ capScope: "system",
69290
+ addonId: null,
69291
+ access: "view"
69292
+ },
69223
69293
  "deviceHistory.listSeries": {
69224
69294
  capName: "device-history",
69225
69295
  capScope: "system",
@@ -79225,7 +79295,7 @@ var STATE_SUMMARY_VARS = [
79225
79295
  ([...RULE_TEXT], [...COMBINED_ALARM]),
79226
79296
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
79227
79297
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
79228
- ([...RULE_TEXT], [...CONSUMABLE]),
79298
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
79229
79299
  ([...RULE_TEXT], [...TANK]),
79230
79300
  [...RULE_TEXT],
79231
79301
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
package/dist/addon.mjs CHANGED
@@ -5430,7 +5430,7 @@ var ZodIssueCode = {
5430
5430
  var ZodFirstPartyTypeKind;
5431
5431
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5432
5432
  //#endregion
5433
- //#region ../types/dist/sleep-DJFUfKvA.mjs
5433
+ //#region ../types/dist/sleep-CUp20JkO.mjs
5434
5434
  /**
5435
5435
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5436
5436
  * window to float samples (D455).
@@ -8322,7 +8322,11 @@ var ContributionSectionSchema = object({
8322
8322
  literal(4)
8323
8323
  ]).optional(),
8324
8324
  tab: string().optional(),
8325
- location: _enum(["settings", "top-tab"]).optional(),
8325
+ location: _enum([
8326
+ "settings",
8327
+ "top-tab",
8328
+ "hero"
8329
+ ]).optional(),
8326
8330
  order: number().optional(),
8327
8331
  fields: array(any())
8328
8332
  });
@@ -13269,7 +13273,11 @@ var ConfigSectionWithValuesSchema = object({
13269
13273
  literal(4)
13270
13274
  ]).optional(),
13271
13275
  tab: string().optional(),
13272
- location: _enum(["settings", "top-tab"]).optional(),
13276
+ location: _enum([
13277
+ "settings",
13278
+ "top-tab",
13279
+ "hero"
13280
+ ]).optional(),
13273
13281
  order: number().optional(),
13274
13282
  fields: array(any())
13275
13283
  });
@@ -17149,6 +17157,52 @@ var TierStatusSchema = object({
17149
17157
  countedAt: number().nullable()
17150
17158
  });
17151
17159
  /** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
17160
+ /**
17161
+ * Why a series is orphan. `device-gone`: its device is absent from the
17162
+ * successful device listings (the departure clock). `undeclared`: its `cap:`
17163
+ * key is declared by no capability any more (a field a cap removed).
17164
+ */
17165
+ var DeviceHistoryOrphanReasonSchema = _enum(["device-gone", "undeclared"]);
17166
+ /** Rows held per stored tier. */
17167
+ var TierRowsSchema = object({
17168
+ raw: number().int(),
17169
+ "5m": number().int(),
17170
+ "1h": number().int(),
17171
+ "1d": number().int()
17172
+ });
17173
+ var OrphanSeriesSchema = object({
17174
+ seriesId: number().int(),
17175
+ deviceId: number().int(),
17176
+ key: string(),
17177
+ scope: string(),
17178
+ /** The metric's display name; `null` when its metric row is gone too. */
17179
+ displayName: string().nullable(),
17180
+ reason: DeviceHistoryOrphanReasonSchema,
17181
+ /** `device-gone`: since when the device has been absent; `null` otherwise. */
17182
+ missingSince: number().nullable(),
17183
+ firstTs: number(),
17184
+ lastTs: number(),
17185
+ rows: TierRowsSchema
17186
+ });
17187
+ var DeviceHistoryOrphanDeleteRefusalSchema = _enum([
17188
+ "not-found",
17189
+ "not-orphan",
17190
+ "failed"
17191
+ ]);
17192
+ var OrphanDeleteEntrySchema = discriminatedUnion("ok", [object({
17193
+ seriesId: number().int(),
17194
+ ok: literal(true),
17195
+ deleted: TierRowsSchema
17196
+ }), object({
17197
+ seriesId: number().int(),
17198
+ ok: literal(false),
17199
+ reason: DeviceHistoryOrphanDeleteRefusalSchema
17200
+ })]);
17201
+ var OrphanListSchema = object({
17202
+ series: array(OrphanSeriesSchema).readonly(),
17203
+ /** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
17204
+ truncated: boolean()
17205
+ });
17152
17206
  var DeviceHistoryStatusSchema = object({
17153
17207
  startedAt: number(),
17154
17208
  /** The store is declared, series loaded and the first reconcile has answered. */
@@ -17246,7 +17300,10 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
17246
17300
  }), object({ enabled: boolean() }), {
17247
17301
  kind: "mutation",
17248
17302
  auth: "admin"
17249
- }), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
17303
+ }), 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() }), {
17304
+ kind: "mutation",
17305
+ auth: "admin"
17306
+ });
17250
17307
  var DeviceCaStatusSchema = discriminatedUnion("state", [
17251
17308
  object({ state: literal("absent") }),
17252
17309
  object({
@@ -48070,7 +48127,6 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
48070
48127
  modelId: string()
48071
48128
  }),
48072
48129
  object({ kind: literal("cpu-device") }),
48073
- object({ kind: literal("coral-untouched") }),
48074
48130
  object({ kind: literal("device-disabled") }),
48075
48131
  object({ kind: literal("device-unavailable") }),
48076
48132
  object({ kind: literal("node-offline") }),
@@ -48168,11 +48224,6 @@ var AutoTuneWarningSchema = discriminatedUnion("kind", [
48168
48224
  kind: literal("detector-store-unreadable"),
48169
48225
  error: string()
48170
48226
  }),
48171
- object({
48172
- kind: literal("coral-enabled"),
48173
- nodeId: string(),
48174
- deviceKey: string()
48175
- }),
48176
48227
  object({
48177
48228
  kind: literal("custom-pin-kept"),
48178
48229
  nodeId: string(),
@@ -55208,17 +55259,69 @@ var connectivityCapability = {
55208
55259
  volatileStateFields: ["lastChangedAt"]
55209
55260
  };
55210
55261
  /**
55211
- * Generic device-consumables capability — surfaces a device's
55212
- * maintenance items (vacuum filters/brushes, replaceable cartridges,
55213
- * descaling cycles, …) with their remaining life and an optional
55214
- * "Replaced" reset action. Device-agnostic: any provider that knows its
55215
- * device tracks consumables can register it; the cap declares no
55216
- * vocabulary of its own — the provider names each item verbatim.
55262
+ * Generic device-consumables capability — the ONE place a device reports what
55263
+ * it uses up or fills: wear parts (vacuum filters/brushes, cartridges,
55264
+ * descaling cycles), supplies it draws from (a vacuum's clean-water tank and
55265
+ * detergent, a dishwasher's salt and rinse aid) and waste it collects (a dirty
55266
+ * water tank, a dust bin). Each item carries its remaining life or fill and an
55267
+ * optional "Replaced" reset action. Device-agnostic: any provider that knows
55268
+ * its device tracks consumables registers it; the provider names each item
55269
+ * verbatim and says which `kind` it is.
55270
+ *
55271
+ * The admin UI renders it as ONE collapsible section directly under the
55272
+ * device page's hero card (`placement: 'hero'`), for every device bound to
55273
+ * this cap — never drawn by a device type's hero card itself (D915).
55217
55274
  *
55218
55275
  * Like `childLayout`, the cap is INERT until a provider sets items: no
55219
55276
  * provider populates it by guessing (no HA inference). The UI renders a
55220
55277
  * "No consumables reported" placeholder when `items` is empty.
55221
55278
  */
55279
+ /**
55280
+ * What an item IS, which decides which direction is bad:
55281
+ * - `wear` — a part that wears out (a brush, a filter); low life is bad.
55282
+ * - `supply` — something the device draws from (clean water, detergent,
55283
+ * salt, rinse aid); low or empty is bad.
55284
+ * - `waste` — something the device fills (dirty water, a dust bin); full is
55285
+ * bad.
55286
+ * Absent = `wear`.
55287
+ */
55288
+ var ConsumableKindSchema = _enum([
55289
+ "wear",
55290
+ "supply",
55291
+ "waste"
55292
+ ]);
55293
+ /**
55294
+ * What an item LOOKS like, which decides how a client draws it — independent
55295
+ * of `kind`, which decides which direction is bad:
55296
+ * - `part` — a part that wears (a brush, a filter, a mop pad): a wear bar,
55297
+ * remaining time and a reset.
55298
+ * - `tank` — a container of liquid (clean water, dirty water): a fill gauge.
55299
+ * - `product` — something bought and refilled (detergent, salt, rinse aid):
55300
+ * a stepped level and "refill".
55301
+ * - `bin` — a container that collects waste (a dust bin): a fill gauge
55302
+ * that warns when full.
55303
+ * Absent = derived from the kind ({@link consumableFormOf}).
55304
+ */
55305
+ var ConsumableFormSchema = _enum([
55306
+ "part",
55307
+ "tank",
55308
+ "product",
55309
+ "bin"
55310
+ ]);
55311
+ /** The provider's own discrete verdict on an item. */
55312
+ var ConsumableStatusSchema = _enum([
55313
+ "ok",
55314
+ "low",
55315
+ "empty",
55316
+ "full",
55317
+ "replace"
55318
+ ]);
55319
+ _enum([
55320
+ "ok",
55321
+ "low",
55322
+ "empty",
55323
+ "full"
55324
+ ]);
55222
55325
  /** Units a remaining-life counter is reported in. Closed: the panel renders
55223
55326
  * each. */
55224
55327
  var ConsumableRemainingUnitSchema = _enum([
@@ -55233,18 +55336,23 @@ var ConsumableRemainingSchema = object({
55233
55336
  unit: ConsumableRemainingUnitSchema
55234
55337
  });
55235
55338
  /** A single consumable item. Either a continuous `level` (remaining
55236
- * life %) or a discrete `status` may be known — both may be null when a
55237
- * provider only knows the item exists. `level` and `status` are not
55238
- * mutually exclusive; a provider may report both. */
55339
+ * life %, or fill % for a `supply` / `waste` item) or a discrete `status`
55340
+ * may be known — both may be null when a provider only knows the item
55341
+ * exists. `level` and `status` are not mutually exclusive; a provider may
55342
+ * report both. */
55239
55343
  var ConsumableItemSchema = object({
55240
55344
  /** Stable id, e.g. 'main-brush'. */
55241
55345
  key: string().min(1),
55242
55346
  /** Display name. */
55243
55347
  label: string().min(1),
55244
- /** Remaining life % when known (0..100). */
55348
+ /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
55245
55349
  level: number().min(0).max(100).nullable(),
55246
- /** Discrete state when known (binary mode). */
55247
- status: _enum(["ok", "replace"]).nullable(),
55350
+ /** The provider's discrete verdict when known (binary mode). */
55351
+ status: ConsumableStatusSchema.nullable(),
55352
+ /** What the item is — decides whether low or full is bad. Absent = `wear`. */
55353
+ kind: ConsumableKindSchema.optional(),
55354
+ /** How the item is drawn (part, tank, product, bin). Absent = derived from `kind`. */
55355
+ form: ConsumableFormSchema.optional(),
55248
55356
  /** Ms epoch of the last replace, when known. */
55249
55357
  lastResetAt: number().nullable(),
55250
55358
  /** Whether `reset()` is meaningful for this item. */
@@ -55267,7 +55375,7 @@ var consumablesCapability = {
55267
55375
  kind: "widget",
55268
55376
  widgetId: "host/consumables-panel",
55269
55377
  tab: "consumables",
55270
- topTab: true,
55378
+ placement: "hero",
55271
55379
  label: "Consumables",
55272
55380
  order: 5
55273
55381
  } },
@@ -55328,9 +55436,37 @@ reset: method(object({
55328
55436
  */
55329
55437
  durability: "restored",
55330
55438
  /**
55331
- * History (D850): none — `items` is an array keyed by runtime ids; a history path never enters it.
55439
+ * History (D850, D917): one series per (item field, item `key`) — the item key
55440
+ * is the series scope, the item `label` names it. A vacuum tank's fill, a
55441
+ * brush's remaining life and a dishwasher's salt are each recorded the moment
55442
+ * their provider reports them; an item that appears later gets its series.
55332
55443
  */
55333
- history: "none",
55444
+ history: {
55445
+ fields: {},
55446
+ items: {
55447
+ path: "items",
55448
+ key: "key",
55449
+ label: "label",
55450
+ fields: {
55451
+ level: {
55452
+ kind: "gauge",
55453
+ unit: "%",
55454
+ deadband: 2,
55455
+ displayName: "Level"
55456
+ },
55457
+ status: {
55458
+ kind: "enum",
55459
+ displayName: "Status"
55460
+ },
55461
+ "remaining.value": {
55462
+ kind: "gauge",
55463
+ unitFrom: "remaining.unit",
55464
+ deadband: 1,
55465
+ displayName: "Remaining"
55466
+ }
55467
+ }
55468
+ }
55469
+ },
55334
55470
  /** Clocks, not content: a re-read that changed no item costs no commit. */
55335
55471
  volatileStateFields: ["lastChangedAt", "lastFetchedAt"]
55336
55472
  };
@@ -55745,8 +55881,9 @@ onStatusChanged: { data: object({
55745
55881
  volatileStateFields: ["lastChangedAt"]
55746
55882
  };
55747
55883
  /**
55748
- * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55749
- * consumable levels (salt, rinse aid) and common program options.
55884
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates and
55885
+ * common program options. Salt and rinse aid are NOT here: they are items of
55886
+ * the device's `consumables` cap, like every other device's (D915).
55750
55887
  *
55751
55888
  * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55752
55889
  * by any integration that exposes the same program / option surface.
@@ -55794,11 +55931,6 @@ var DishwasherAvailabilitySchema = _enum([
55794
55931
  "offline",
55795
55932
  "description-missing"
55796
55933
  ]);
55797
- var DishwasherConsumableLevelSchema = _enum([
55798
- "ok",
55799
- "low",
55800
- "empty"
55801
- ]);
55802
55934
  var DishwasherStatusSchema = object({
55803
55935
  availability: DishwasherAvailabilitySchema,
55804
55936
  /** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
@@ -55831,8 +55963,6 @@ var DishwasherStatusSchema = object({
55831
55963
  powerOn: boolean().nullable(),
55832
55964
  /** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
55833
55965
  powerState: string().nullable(),
55834
- saltLevel: DishwasherConsumableLevelSchema.nullable(),
55835
- rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55836
55966
  /**
55837
55967
  * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55838
55968
  * combined care-and-filter reminder raised); false when every such reminder reads clear; null
@@ -64648,60 +64778,17 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64648
64778
  auth: "admin",
64649
64779
  access: "delete"
64650
64780
  });
64651
- /**
64652
- * Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
64653
- * cleaning lifecycle plus a return-to-base / locate surface and an
64654
- * optional fan-speed selector.
64655
- *
64656
- * State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
64657
- * `paused` / `returning` / `docked` / `error`. `batteryLevel`
64658
- * (0..100) is nullable — some vacuums don't report a battery
64659
- * percentage. `fanSpeed` is the current speed token (provider-verbatim,
64660
- * e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
64661
- * tokens the hardware accepts so the UI renders only supported choices.
64662
- *
64663
- * The `setFanSpeed` method takes the bare `speed` token — the provider
64664
- * validates it against the vacuum's own list. `locate` triggers the
64665
- * find-me chirp; `returnToBase` sends it home.
64666
- *
64667
- * Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
64668
- * `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
64669
- * 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
64670
- * SHOULD populate whichever tanks the hardware has — leave a field `null`
64671
- * only when the device has no such tank at all, and use a `TankStatus`
64672
- * with both inner fields `null` when the tank exists but its level is
64673
- * currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
64674
- * so the HA provider leaves all four `null`.
64675
- */
64676
- var VacuumStateSchema = _enum([
64677
- "idle",
64678
- "cleaning",
64679
- "paused",
64680
- "returning",
64681
- "docked",
64682
- "drying",
64683
- "error"
64684
- ]);
64685
- /**
64686
- * One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
64687
- * detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
64688
- * a discrete `status` (binary-style hardware), or both. Both `null` means the
64689
- * level is currently unknown; the OWNING field being `null` means the
64690
- * hardware has no such tank at all.
64691
- */
64692
- var TankStatusSchema = object({
64693
- /** Numeric fill 0..100 when the hardware reports a percentage; null otherwise. */
64694
- level: number().min(0).max(100).nullable(),
64695
- /** Discrete state when the hardware is binary-mode; null otherwise. */
64696
- status: _enum([
64697
- "ok",
64698
- "low",
64699
- "full"
64700
- ]).nullable()
64701
- });
64702
64781
  var VacuumControlStatusSchema = object({
64703
64782
  /** Lifecycle state of the vacuum. */
64704
- state: VacuumStateSchema,
64783
+ state: _enum([
64784
+ "idle",
64785
+ "cleaning",
64786
+ "paused",
64787
+ "returning",
64788
+ "docked",
64789
+ "drying",
64790
+ "error"
64791
+ ]),
64705
64792
  /** 0..100 battery percentage. Null when the device has no battery
64706
64793
  * reading. */
64707
64794
  batteryLevel: number().min(0).max(100).nullable(),
@@ -64710,14 +64797,6 @@ var VacuumControlStatusSchema = object({
64710
64797
  fanSpeed: string().nullable(),
64711
64798
  /** Speed tokens the hardware accepts — drives the UI selector. */
64712
64799
  availableFanSpeeds: array(string()),
64713
- /** Clean-water (mop) tank. Null when the hardware has no clean-water tank. */
64714
- cleanWater: TankStatusSchema.nullable(),
64715
- /** Dirty-water (recovery) tank. Null when the hardware has no dirty-water tank. */
64716
- dirtyWater: TankStatusSchema.nullable(),
64717
- /** Detergent tank. Null when the hardware has no detergent tank. */
64718
- detergent: TankStatusSchema.nullable(),
64719
- /** Dust bin. Null when the hardware has no dust bin. */
64720
- dustBin: TankStatusSchema.nullable(),
64721
64800
  /** 0..100 cleaning-completion percentage of the current task, or null. */
64722
64801
  progressPercent: number().min(0).max(100).nullable(),
64723
64802
  /** Current error code (0 / null = no error). */
@@ -64779,35 +64858,14 @@ var vacuumControlCapability = {
64779
64858
  */
64780
64859
  durability: "session",
64781
64860
  /**
64782
- * History (D850): recorded series. Tank levels are fixed-object paths (`cleanWater.level`, ...).
64861
+ * History (D850): recorded series. The tanks moved to `consumables` (D915), whose
64862
+ * items are keyed by runtime ids and record no history.
64783
64863
  */
64784
- history: { fields: {
64785
- batteryLevel: {
64786
- kind: "gauge",
64787
- unit: "%",
64788
- deadband: 2
64789
- },
64790
- "cleanWater.level": {
64791
- kind: "gauge",
64792
- unit: "%",
64793
- deadband: 2
64794
- },
64795
- "dirtyWater.level": {
64796
- kind: "gauge",
64797
- unit: "%",
64798
- deadband: 2
64799
- },
64800
- "detergent.level": {
64801
- kind: "gauge",
64802
- unit: "%",
64803
- deadband: 2
64804
- },
64805
- "dustBin.level": {
64806
- kind: "gauge",
64807
- unit: "%",
64808
- deadband: 2
64809
- }
64810
- } }
64864
+ history: { fields: { batteryLevel: {
64865
+ kind: "gauge",
64866
+ unit: "%",
64867
+ deadband: 2
64868
+ } } }
64811
64869
  };
64812
64870
  var ValveStatusSchema = object({
64813
64871
  /** Lifecycle state of the valve. */
@@ -69201,6 +69259,12 @@ Object.freeze({
69201
69259
  addonId: null,
69202
69260
  access: "create"
69203
69261
  },
69262
+ "deviceHistory.deleteOrphanSeries": {
69263
+ capName: "device-history",
69264
+ capScope: "system",
69265
+ addonId: null,
69266
+ access: "delete"
69267
+ },
69204
69268
  "deviceHistory.getDeviceEnabled": {
69205
69269
  capName: "device-history",
69206
69270
  capScope: "system",
@@ -69219,6 +69283,12 @@ Object.freeze({
69219
69283
  addonId: null,
69220
69284
  access: "view"
69221
69285
  },
69286
+ "deviceHistory.listOrphanSeries": {
69287
+ capName: "device-history",
69288
+ capScope: "system",
69289
+ addonId: null,
69290
+ access: "view"
69291
+ },
69222
69292
  "deviceHistory.listSeries": {
69223
69293
  capName: "device-history",
69224
69294
  capScope: "system",
@@ -79224,7 +79294,7 @@ var STATE_SUMMARY_VARS = [
79224
79294
  ([...RULE_TEXT], [...COMBINED_ALARM]),
79225
79295
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
79226
79296
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
79227
- ([...RULE_TEXT], [...CONSUMABLE]),
79297
+ ([...RULE_TEXT], [...CONSUMABLE, ...TANK]),
79228
79298
  ([...RULE_TEXT], [...TANK]),
79229
79299
  [...RULE_TEXT],
79230
79300
  ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.142",
3
+ "version": "0.2.144",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",