@camstack/addon-provider-homeassistant 1.2.651 → 1.2.653

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.
@@ -5975,7 +5975,7 @@ var ZodIssueCode = {
5975
5975
  var ZodFirstPartyTypeKind;
5976
5976
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5977
5977
  //#endregion
5978
- //#region ../types/dist/sleep-QsoHs66J.mjs
5978
+ //#region ../types/dist/sleep-C6LqREpb.mjs
5979
5979
  /**
5980
5980
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5981
5981
  * window to float samples (D455).
@@ -6054,6 +6054,22 @@ function buildAlawTable() {
6054
6054
  }
6055
6055
  buildUlawTable();
6056
6056
  buildAlawTable();
6057
+ /**
6058
+ * An addon whose own migrations did not apply refuses to initialise (D987). The error is typed
6059
+ * so a runner hosting several addons can tell "this addon is blocked" from a crash and keep its
6060
+ * co-located siblings running. Recognised by NAME and shape, never `instanceof`: a forked addon
6061
+ * bundles its own copy of this module, so the class the runner sees is not the one that threw.
6062
+ */
6063
+ var MIGRATIONS_BLOCKED_ERROR_NAME = "AddonMigrationsBlockedError";
6064
+ var AddonMigrationsBlockedError = class extends Error {
6065
+ /** The ledger ids that did not apply and block the owner. */
6066
+ migrationIds;
6067
+ constructor(migrationIds) {
6068
+ super(`migration(s) ${migrationIds.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
6069
+ this.name = MIGRATIONS_BLOCKED_ERROR_NAME;
6070
+ this.migrationIds = migrationIds;
6071
+ }
6072
+ };
6057
6073
  /** Is this field's stored value a credential? */
6058
6074
  function isSecretConfigField(field) {
6059
6075
  if (field.type === "password") return true;
@@ -7707,7 +7723,7 @@ var BaseAddon = class {
7707
7723
  startMigration: (input) => api.startMigration.mutate(input),
7708
7724
  finishMigration: (input) => api.finishMigration.mutate(input)
7709
7725
  }, migrations, this.ctx.logger);
7710
- if (report.blockOwner.length > 0) throw new Error(`migration(s) ${report.blockOwner.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
7726
+ if (report.blockOwner.length > 0) throw new AddonMigrationsBlockedError(report.blockOwner);
7711
7727
  return report;
7712
7728
  }
7713
7729
  /**
@@ -9764,6 +9780,7 @@ var CAP_NAMES = Object.freeze([
9764
9780
  "backup",
9765
9781
  "battery",
9766
9782
  "binary",
9783
+ "board-key-source",
9767
9784
  "brightness",
9768
9785
  "broker",
9769
9786
  "button",
@@ -9885,6 +9902,7 @@ var CAP_NAMES = Object.freeze([
9885
9902
  "privacy-mask",
9886
9903
  "ptz",
9887
9904
  "ptz-autotrack",
9905
+ "pump-cycle",
9888
9906
  "reboot",
9889
9907
  "record-entries",
9890
9908
  "recording",
@@ -11177,18 +11195,6 @@ Object.freeze({
11177
11195
  "path": "pumpRunning",
11178
11196
  "valueType": "boolean"
11179
11197
  },
11180
- {
11181
- "path": "pumpIntervalEnabled",
11182
- "valueType": "boolean"
11183
- },
11184
- {
11185
- "path": "pumpOnTime",
11186
- "valueType": "number"
11187
- },
11188
- {
11189
- "path": "pumpOffTime",
11190
- "valueType": "number"
11191
- },
11192
11198
  {
11193
11199
  "path": "lastDrink",
11194
11200
  "valueType": "number"
@@ -11312,6 +11318,20 @@ Object.freeze({
11312
11318
  "valueType": "number"
11313
11319
  }
11314
11320
  ],
11321
+ "pump-cycle": [
11322
+ {
11323
+ "path": "enabled",
11324
+ "valueType": "boolean"
11325
+ },
11326
+ {
11327
+ "path": "onTime",
11328
+ "valueType": "number"
11329
+ },
11330
+ {
11331
+ "path": "offTime",
11332
+ "valueType": "number"
11333
+ }
11334
+ ],
11315
11335
  "recording-archive": [
11316
11336
  {
11317
11337
  "path": "deviceId",
@@ -19468,24 +19488,52 @@ var APPLIANCE_CAP_VOCABULARY = {
19468
19488
  args: { on: false }
19469
19489
  },
19470
19490
  {
19471
- id: "petFountain.intervalOn",
19472
- method: "setPumpInterval",
19491
+ id: "petFountain.resetDailyConsumption",
19492
+ method: "resetDailyConsumption",
19493
+ label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
19494
+ phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
19495
+ icon: "rotate-ccw"
19496
+ }
19497
+ ],
19498
+ state: [{
19499
+ kind: "boolean",
19500
+ field: "empty",
19501
+ label: t("Tank empty", "Serbatoio vuoto"),
19502
+ whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
19503
+ whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
19504
+ icon: "droplet"
19505
+ }, {
19506
+ kind: "numeric",
19507
+ field: "waterLevel",
19508
+ quantity: t("the water level", "il livello dell’acqua"),
19509
+ label: t("Water level", "Livello dell’acqua"),
19510
+ unit: "%",
19511
+ icon: "droplets"
19512
+ }]
19513
+ },
19514
+ "pump-cycle": {
19515
+ scope: "device",
19516
+ noun: t("Pump cycle", "Ciclo della pompa"),
19517
+ actions: [
19518
+ {
19519
+ id: "pumpCycle.on",
19520
+ method: "setEnabled",
19473
19521
  label: t("Pump cycle on", "Ciclo pompa attivo"),
19474
19522
  phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
19475
19523
  icon: "timer",
19476
19524
  args: { on: true }
19477
19525
  },
19478
19526
  {
19479
- id: "petFountain.intervalOff",
19480
- method: "setPumpInterval",
19527
+ id: "pumpCycle.off",
19528
+ method: "setEnabled",
19481
19529
  label: t("Pump cycle off", "Ciclo pompa spento"),
19482
19530
  phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
19483
19531
  icon: "timer-off",
19484
19532
  args: { on: false }
19485
19533
  },
19486
19534
  {
19487
- id: "petFountain.pumpOnMinutes",
19488
- method: "setPumpOnMinutes",
19535
+ id: "pumpCycle.onMinutes",
19536
+ method: "setOnMinutes",
19489
19537
  label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
19490
19538
  phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
19491
19539
  icon: "timer",
@@ -19501,8 +19549,8 @@ var APPLIANCE_CAP_VOCABULARY = {
19501
19549
  }]
19502
19550
  },
19503
19551
  {
19504
- id: "petFountain.pumpOffMinutes",
19505
- method: "setPumpOffMinutes",
19552
+ id: "pumpCycle.offMinutes",
19553
+ method: "setOffMinutes",
19506
19554
  label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
19507
19555
  phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
19508
19556
  icon: "timer-off",
@@ -19516,29 +19564,15 @@ var APPLIANCE_CAP_VOCABULARY = {
19516
19564
  unit: "min"
19517
19565
  }
19518
19566
  }]
19519
- },
19520
- {
19521
- id: "petFountain.resetDailyConsumption",
19522
- method: "resetDailyConsumption",
19523
- label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
19524
- phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
19525
- icon: "rotate-ccw"
19526
19567
  }
19527
19568
  ],
19528
19569
  state: [{
19529
19570
  kind: "boolean",
19530
- field: "empty",
19531
- label: t("Tank empty", "Serbatoio vuoto"),
19532
- whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
19533
- whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
19534
- icon: "droplet"
19535
- }, {
19536
- kind: "numeric",
19537
- field: "waterLevel",
19538
- quantity: t("the water level", "il livello dell’acqua"),
19539
- label: t("Water level", "Livello dell’acqua"),
19540
- unit: "%",
19541
- icon: "droplets"
19571
+ field: "enabled",
19572
+ label: t("Pump cycle", "Ciclo pompa"),
19573
+ whenTrue: t("When {device} starts running its pump on a cycle", "Quando {device} inizia a far lavorare la pompa a ciclo"),
19574
+ whenFalse: t("When {device} runs its pump continuously", "Quando {device} fa lavorare la pompa in continuo"),
19575
+ icon: "timer"
19542
19576
  }]
19543
19577
  },
19544
19578
  "media-player": {
@@ -21431,6 +21465,7 @@ var SYSTEM_CAP_VOCABULARY = {
21431
21465
  "audio-analyzer": system(PIPELINE),
21432
21466
  "audio-codec": system(INTERNAL),
21433
21467
  "auth-provider": system(IDENTITY),
21468
+ "board-key-source": system(INTERNAL),
21434
21469
  backup: system("system backups — run and restored from the Backups page"),
21435
21470
  broker: system("message-broker connections — configured, not actuated"),
21436
21471
  "calendar-source": system(INTERNAL),
@@ -46685,6 +46720,63 @@ var binaryCapability = {
46685
46720
  volatileStateFields: ["lastChangedAt"]
46686
46721
  };
46687
46722
  /**
46723
+ * Why a board key could not be read. Typed so a caller reports the cause and
46724
+ * never treats "could not read" as "has no key" (D49).
46725
+ */
46726
+ var BoardKeyFailureReasonSchema = _enum([
46727
+ "unknown-source",
46728
+ "not-admin",
46729
+ "no-builder",
46730
+ "no-ingress-url",
46731
+ "unreachable",
46732
+ "unknown-board",
46733
+ "no-encryption-key",
46734
+ "unreadable-config"
46735
+ ]);
46736
+ var BoardKeySourceSchema = object({
46737
+ sourceId: string(),
46738
+ name: string()
46739
+ });
46740
+ var BoardKeyBoardSchema = object({
46741
+ /** The builder's file name, e.g. `kitchen.yaml`: the handle `getBoardKey` takes. */
46742
+ configuration: string(),
46743
+ /** The node name the builder gives the board. */
46744
+ name: string(),
46745
+ /** The address the builder knows the board by, when it has one. */
46746
+ address: string().nullable()
46747
+ });
46748
+ var BoardKeyFailureSchema = object({
46749
+ ok: literal(false),
46750
+ reason: BoardKeyFailureReasonSchema,
46751
+ detail: string().optional()
46752
+ });
46753
+ var ListBoardsResultSchema = discriminatedUnion("ok", [object({
46754
+ ok: literal(true),
46755
+ boards: array(BoardKeyBoardSchema).readonly()
46756
+ }), BoardKeyFailureSchema]);
46757
+ var GetBoardKeyResultSchema = discriminatedUnion("ok", [object({
46758
+ ok: literal(true),
46759
+ key: string()
46760
+ }), BoardKeyFailureSchema]);
46761
+ /**
46762
+ * Where a device board's API encryption key can be read from (the ESPHome
46763
+ * builder that runs beside a Home Assistant). Admin only: `getBoardKey`
46764
+ * returns a credential, and nothing else the source holds ever crosses.
46765
+ */
46766
+ var boardKeySourceCapability = {
46767
+ name: "board-key-source",
46768
+ scope: "system",
46769
+ mode: "collection",
46770
+ methods: {
46771
+ listSources: method(_void(), array(BoardKeySourceSchema).readonly(), { auth: "admin" }),
46772
+ listBoards: method(object({ sourceId: string().min(1) }), ListBoardsResultSchema, { auth: "admin" }),
46773
+ getBoardKey: method(object({
46774
+ sourceId: string().min(1),
46775
+ configuration: string().min(1)
46776
+ }), GetBoardKeyResultSchema, { auth: "admin" })
46777
+ }
46778
+ };
46779
+ /**
46688
46780
  * Dimmable-light brightness control. Co-exists with `switch` on the
46689
46781
  * same device — the switch toggles on/off, this cap sets the level
46690
46782
  * applied when the light is on. Drivers map their per-vendor dim
@@ -53428,7 +53520,7 @@ var DishwasherStatusSchema = object({
53428
53520
  /** Ms epoch of the last value received from the appliance; 0 = never. */
53429
53521
  lastFetchedAt: number()
53430
53522
  });
53431
- var DeviceIdSchema$1 = number().int().nonnegative();
53523
+ var DeviceIdSchema$2 = number().int().nonnegative();
53432
53524
  /** A value a program option or setting can take. */
53433
53525
  var DishwasherValueSchema = union([
53434
53526
  boolean(),
@@ -53503,77 +53595,77 @@ var dishwasherCapability = {
53503
53595
  * option feature keys; each is checked against the program's constraints.
53504
53596
  */
53505
53597
  start: method(object({
53506
- deviceId: DeviceIdSchema$1,
53598
+ deviceId: DeviceIdSchema$2,
53507
53599
  program: string().min(1).optional(),
53508
53600
  options: record(string(), DishwasherValueSchema).optional()
53509
53601
  }), _void(), {
53510
53602
  kind: "mutation",
53511
53603
  auth: "protected"
53512
53604
  }),
53513
- pause: method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
53605
+ pause: method(object({ deviceId: DeviceIdSchema$2 }), _void(), {
53514
53606
  kind: "mutation",
53515
53607
  auth: "protected"
53516
53608
  }),
53517
- resume: method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
53609
+ resume: method(object({ deviceId: DeviceIdSchema$2 }), _void(), {
53518
53610
  kind: "mutation",
53519
53611
  auth: "protected"
53520
53612
  }),
53521
- stop: method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
53613
+ stop: method(object({ deviceId: DeviceIdSchema$2 }), _void(), {
53522
53614
  kind: "mutation",
53523
53615
  auth: "protected"
53524
53616
  }),
53525
53617
  /** Select (not start) a program; refused when the appliance does not offer it. */
53526
53618
  setProgram: method(object({
53527
- deviceId: DeviceIdSchema$1,
53619
+ deviceId: DeviceIdSchema$2,
53528
53620
  program: string().min(1)
53529
53621
  }), _void(), {
53530
53622
  kind: "mutation",
53531
53623
  auth: "protected"
53532
53624
  }),
53533
53625
  setPower: method(object({
53534
- deviceId: DeviceIdSchema$1,
53626
+ deviceId: DeviceIdSchema$2,
53535
53627
  on: boolean()
53536
53628
  }), _void(), {
53537
53629
  kind: "mutation",
53538
53630
  auth: "protected"
53539
53631
  }),
53540
53632
  setHalfLoad: method(object({
53541
- deviceId: DeviceIdSchema$1,
53633
+ deviceId: DeviceIdSchema$2,
53542
53634
  on: boolean()
53543
53635
  }), _void(), {
53544
53636
  kind: "mutation",
53545
53637
  auth: "protected"
53546
53638
  }),
53547
53639
  setHygienePlus: method(object({
53548
- deviceId: DeviceIdSchema$1,
53640
+ deviceId: DeviceIdSchema$2,
53549
53641
  on: boolean()
53550
53642
  }), _void(), {
53551
53643
  kind: "mutation",
53552
53644
  auth: "protected"
53553
53645
  }),
53554
53646
  setExtraDry: method(object({
53555
- deviceId: DeviceIdSchema$1,
53647
+ deviceId: DeviceIdSchema$2,
53556
53648
  on: boolean()
53557
53649
  }), _void(), {
53558
53650
  kind: "mutation",
53559
53651
  auth: "protected"
53560
53652
  }),
53561
53653
  setIntensiveZone: method(object({
53562
- deviceId: DeviceIdSchema$1,
53654
+ deviceId: DeviceIdSchema$2,
53563
53655
  on: boolean()
53564
53656
  }), _void(), {
53565
53657
  kind: "mutation",
53566
53658
  auth: "protected"
53567
53659
  }),
53568
53660
  setVarioSpeedPlus: method(object({
53569
- deviceId: DeviceIdSchema$1,
53661
+ deviceId: DeviceIdSchema$2,
53570
53662
  on: boolean()
53571
53663
  }), _void(), {
53572
53664
  kind: "mutation",
53573
53665
  auth: "protected"
53574
53666
  }),
53575
53667
  setChildLock: method(object({
53576
- deviceId: DeviceIdSchema$1,
53668
+ deviceId: DeviceIdSchema$2,
53577
53669
  on: boolean()
53578
53670
  }), _void(), {
53579
53671
  kind: "mutation",
@@ -53585,7 +53677,7 @@ var dishwasherCapability = {
53585
53677
  * its declared range / members.
53586
53678
  */
53587
53679
  setOption: method(object({
53588
- deviceId: DeviceIdSchema$1,
53680
+ deviceId: DeviceIdSchema$2,
53589
53681
  key: string().min(1),
53590
53682
  value: DishwasherValueSchema
53591
53683
  }), _void(), {
@@ -53593,7 +53685,7 @@ var dishwasherCapability = {
53593
53685
  auth: "protected"
53594
53686
  }),
53595
53687
  /** What this appliance can do, from its own description — the UI is derived from it. */
53596
- getOptions: method(object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" })
53688
+ getOptions: method(object({ deviceId: DeviceIdSchema$2 }), DishwasherOptionsSchema, { auth: "protected" })
53597
53689
  },
53598
53690
  status: {
53599
53691
  schema: DishwasherStatusSchema,
@@ -67175,6 +67267,21 @@ var NcTemplateVarKindSchema = _enum([
67175
67267
  "sound",
67176
67268
  "system"
67177
67269
  ]);
67270
+ /**
67271
+ * The default title/body a rule of one SITUATION is delivered with when the
67272
+ * operator wrote no template — served so an editor can pre-fill it (and the
67273
+ * operator can rebuild it from placeholders) instead of starting from a blank
67274
+ * box that, once saved, silently replaces it. `id` names the situation inside
67275
+ * a rule `kind`: `appliance-cycle` is a `sensor` rule whose device is an
67276
+ * appliance finishing a cycle. Texts are raw templates (`{{var}}` intact), in
67277
+ * the hub's current language and with its overrides applied.
67278
+ */
67279
+ var NcTemplateDefaultSchema = object({
67280
+ id: _enum(["appliance-cycle"]),
67281
+ kind: NcRuleKindSchema,
67282
+ title: string(),
67283
+ body: string()
67284
+ });
67178
67285
  /** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
67179
67286
  var NcTemplateFamilySchema = _enum([
67180
67287
  "rule",
@@ -68030,7 +68137,11 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
68030
68137
  }), method(object({}), object({
68031
68138
  catalog: array(NcConditionDescriptorSchema),
68032
68139
  taxonomy: NcTaxonomySchema.optional()
68033
- })), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
68140
+ })), method(object({}), object({
68141
+ vars: array(NcTemplateVarDescriptorSchema),
68142
+ /** Per-situation default texts; absent on a hub that predates them. */
68143
+ defaults: array(NcTemplateDefaultSchema)
68144
+ })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
68034
68145
  kind: "mutation",
68035
68146
  access: "view"
68036
68147
  }), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({}), NcRuleLastRunsSchema, { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
@@ -68942,7 +69053,7 @@ var petFeederCapability = {
68942
69053
  /**
68943
69054
  * Pet water-fountain cap. Models the telemetry and the control surface of a
68944
69055
  * circulating drinking fountain: how much water is in the tank, how much the
68945
- * pet drank, whether the pump runs and on what duty cycle.
69056
+ * pet drank, whether the pump runs.
68946
69057
  *
68947
69058
  * It has no native vendor provider of its own: a fountain reaches CamStack as
68948
69059
  * a container of loose entities (a pump switch, two number boxes, a "filter
@@ -68958,8 +69069,10 @@ var petFeederCapability = {
68958
69069
  * never here. Every reading may be `null`: a source that is offline or does
68959
69070
  * not report is unknown, never zero.
68960
69071
  *
68961
- * The filter is not a field of this cap: it is an item of the `consumables`
68962
- * cap on the same device (kind `wear`), reset by the same forward mechanism.
69072
+ * The pump's on/off duty cycle is model-specific and lives in the optional
69073
+ * `pump-cycle` cap. The filter, the cleaning and the water change are not
69074
+ * fields of this cap: they are items of the `consumables` cap on the same
69075
+ * device (kind `wear`), reset by the same forward mechanism.
68963
69076
  */
68964
69077
  var PetFountainStatusSchema = object({
68965
69078
  /** Water in the tank, 0..100 (%). Null while the source has not reported. */
@@ -68970,27 +69083,20 @@ var PetFountainStatusSchema = object({
68970
69083
  empty: boolean().nullable(),
68971
69084
  /** True while the pump is running. Null while unknown. */
68972
69085
  pumpRunning: boolean().nullable(),
68973
- /** True when the pump works on an on/off duty cycle rather than continuously. */
68974
- pumpIntervalEnabled: boolean().nullable(),
68975
- /** How long the pump runs per cycle, in seconds. */
68976
- pumpOnTime: number().min(0).nullable().meta(readingMeta("duration")),
68977
- /** How long the pump rests per cycle, in seconds. */
68978
- pumpOffTime: number().min(0).nullable().meta(readingMeta("duration")),
68979
69086
  /** Water drunk in the last drink, in litres. */
68980
69087
  lastDrink: number().min(0).nullable().meta(readingMeta("volume")),
68981
69088
  /** Water drunk in the current hour, in litres. */
68982
69089
  currentHourDrink: number().min(0).nullable().meta(readingMeta("volume")),
68983
69090
  /** Water drunk over the last 24 hours (rolling), in litres. */
68984
69091
  last24hDrink: number().min(0).nullable().meta(readingMeta("volume")),
68985
- /** Water drunk since local midnight, in litres. */
69092
+ /** Water drunk since local midnight, in litres. Null when the fountain has no such sensor. */
68986
69093
  todayDrink: number().min(0).nullable().meta(readingMeta("volume")),
68987
69094
  /** Decoded fault message. Null means healthy; a non-null string is an active fault. */
68988
69095
  error: string().nullable(),
68989
69096
  /** Ms epoch when the slice was last refreshed. */
68990
69097
  lastFetchedAt: number()
68991
69098
  });
68992
- var DeviceIdSchema = number().int().nonnegative();
68993
- var MinutesSchema = number().int().min(0);
69099
+ var DeviceIdSchema$1 = number().int().nonnegative();
68994
69100
  var petFountainCapability = {
68995
69101
  name: "pet-fountain",
68996
69102
  scope: "device",
@@ -69000,38 +69106,14 @@ var petFountainCapability = {
69000
69106
  methods: {
69001
69107
  /** Start or stop the pump. */
69002
69108
  setPump: method(object({
69003
- deviceId: DeviceIdSchema,
69004
- on: boolean()
69005
- }), _void(), {
69006
- kind: "mutation",
69007
- auth: "protected"
69008
- }),
69009
- /** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
69010
- setPumpInterval: method(object({
69011
- deviceId: DeviceIdSchema,
69109
+ deviceId: DeviceIdSchema$1,
69012
69110
  on: boolean()
69013
69111
  }), _void(), {
69014
69112
  kind: "mutation",
69015
69113
  auth: "protected"
69016
69114
  }),
69017
- /** Set how many minutes the pump runs per cycle. */
69018
- setPumpOnMinutes: method(object({
69019
- deviceId: DeviceIdSchema,
69020
- minutes: MinutesSchema
69021
- }), _void(), {
69022
- kind: "mutation",
69023
- auth: "protected"
69024
- }),
69025
- /** Set how many minutes the pump rests per cycle. */
69026
- setPumpOffMinutes: method(object({
69027
- deviceId: DeviceIdSchema,
69028
- minutes: MinutesSchema
69029
- }), _void(), {
69030
- kind: "mutation",
69031
- auth: "protected"
69032
- }),
69033
69115
  /** Clear the rolling daily consumption counters on the device. */
69034
- resetDailyConsumption: method(object({ deviceId: DeviceIdSchema }), _void(), {
69116
+ resetDailyConsumption: method(object({ deviceId: DeviceIdSchema$1 }), _void(), {
69035
69117
  kind: "mutation",
69036
69118
  auth: "protected"
69037
69119
  })
@@ -71364,6 +71446,79 @@ var ptzAutotrackCapability = {
71364
71446
  */
71365
71447
  history: "none"
71366
71448
  };
71449
+ /**
71450
+ * The on/off duty cycle of a pet fountain's pump. Some models run the pump
71451
+ * continuously and have nothing to configure; others can alternate a run time
71452
+ * and a rest time. That is model-specific, so it is its own optional cap on the
71453
+ * fountain device: a fountain without cycle entities simply never composes it
71454
+ * (planning#366), and the `pet-fountain` cap stays the model-independent core.
71455
+ *
71456
+ * Like `pet-fountain` it has no native vendor provider: an operator BUILDS the
71457
+ * cycle from loose entities (a cycle switch and two number boxes) and every
71458
+ * method is a forward to one source entity (D659, D967). Durations are stored
71459
+ * in SECONDS (D944); a number box that cannot be read back leaves them `null`
71460
+ * — unknown, never zero (D393).
71461
+ */
71462
+ var PumpCycleStatusSchema = object({
71463
+ /** True when the pump works on the on/off cycle, false when it runs continuously. Null while unknown. */
71464
+ enabled: boolean().nullable(),
71465
+ /** How long the pump runs per cycle, in seconds. Null while unknown. */
71466
+ onTime: number().min(0).nullable().meta(readingMeta("duration")),
71467
+ /** How long the pump rests per cycle, in seconds. Null while unknown. */
71468
+ offTime: number().min(0).nullable().meta(readingMeta("duration")),
71469
+ /** Ms epoch when the slice was last refreshed. */
71470
+ lastFetchedAt: number()
71471
+ });
71472
+ var DeviceIdSchema = number().int().nonnegative();
71473
+ var MinutesSchema = number().int().min(0);
71474
+ var pumpCycleCapability = {
71475
+ name: "pump-cycle",
71476
+ scope: "device",
71477
+ deviceNative: true,
71478
+ mode: "singleton",
71479
+ deviceTypes: [DeviceType.PetFountain],
71480
+ methods: {
71481
+ /** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
71482
+ setEnabled: method(object({
71483
+ deviceId: DeviceIdSchema,
71484
+ on: boolean()
71485
+ }), _void(), {
71486
+ kind: "mutation",
71487
+ auth: "protected"
71488
+ }),
71489
+ /** Set how many minutes the pump runs per cycle. */
71490
+ setOnMinutes: method(object({
71491
+ deviceId: DeviceIdSchema,
71492
+ minutes: MinutesSchema
71493
+ }), _void(), {
71494
+ kind: "mutation",
71495
+ auth: "protected"
71496
+ }),
71497
+ /** Set how many minutes the pump rests per cycle. */
71498
+ setOffMinutes: method(object({
71499
+ deviceId: DeviceIdSchema,
71500
+ minutes: MinutesSchema
71501
+ }), _void(), {
71502
+ kind: "mutation",
71503
+ auth: "protected"
71504
+ })
71505
+ },
71506
+ status: {
71507
+ schema: PumpCycleStatusSchema,
71508
+ kind: "push"
71509
+ },
71510
+ /** Runtime-state slice — mirrored by the kernel; the hero card reads it whole. */
71511
+ runtimeState: PumpCycleStatusSchema,
71512
+ /**
71513
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
71514
+ *
71515
+ * See `RuntimeStateDurability`. Enforced by
71516
+ * `scripts/check-runtime-state-durability.ts`.
71517
+ */
71518
+ durability: "session",
71519
+ /** History (D850): a duty-cycle setting is not a series worth recording. */
71520
+ history: "none"
71521
+ };
71367
71522
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, DeviceType.Gateway, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
71368
71523
  kind: "mutation",
71369
71524
  auth: "admin"
@@ -80660,6 +80815,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
80660
80815
  pressureSensor: pressureSensorCapability,
80661
80816
  privacyMask: privacyMaskCapability,
80662
80817
  ptzAutotrack: ptzAutotrackCapability,
80818
+ pumpCycle: pumpCycleCapability,
80663
80819
  recordingOnboard: recordingOnboardCapability,
80664
80820
  recordingSignal: recordingSignalCapability,
80665
80821
  runningState: runningStateCapability,
@@ -82844,6 +83000,27 @@ Object.freeze({
82844
83000
  access: "view",
82845
83001
  role: "viewer"
82846
83002
  },
83003
+ "boardKeySource.getBoardKey": {
83004
+ capName: "board-key-source",
83005
+ capScope: "system",
83006
+ addonId: null,
83007
+ access: "view",
83008
+ role: "admin"
83009
+ },
83010
+ "boardKeySource.listBoards": {
83011
+ capName: "board-key-source",
83012
+ capScope: "system",
83013
+ addonId: null,
83014
+ access: "view",
83015
+ role: "admin"
83016
+ },
83017
+ "boardKeySource.listSources": {
83018
+ capName: "board-key-source",
83019
+ capScope: "system",
83020
+ addonId: null,
83021
+ access: "view",
83022
+ role: "admin"
83023
+ },
82847
83024
  "brightness.getStatus": {
82848
83025
  capName: "brightness",
82849
83026
  capScope: "device",
@@ -87667,27 +87844,6 @@ Object.freeze({
87667
87844
  access: "create",
87668
87845
  role: "viewer"
87669
87846
  },
87670
- "petFountain.setPumpInterval": {
87671
- capName: "pet-fountain",
87672
- capScope: "device",
87673
- addonId: null,
87674
- access: "create",
87675
- role: "viewer"
87676
- },
87677
- "petFountain.setPumpOffMinutes": {
87678
- capName: "pet-fountain",
87679
- capScope: "device",
87680
- addonId: null,
87681
- access: "create",
87682
- role: "viewer"
87683
- },
87684
- "petFountain.setPumpOnMinutes": {
87685
- capName: "pet-fountain",
87686
- capScope: "device",
87687
- addonId: null,
87688
- access: "create",
87689
- role: "viewer"
87690
- },
87691
87847
  "pipelineAnalytics.addRetrainFrameFromRecording": {
87692
87848
  capName: "pipeline-analytics",
87693
87849
  capScope: "device",
@@ -89466,6 +89622,34 @@ Object.freeze({
89466
89622
  access: "create",
89467
89623
  role: "admin"
89468
89624
  },
89625
+ "pumpCycle.getStatus": {
89626
+ capName: "pump-cycle",
89627
+ capScope: "device",
89628
+ addonId: null,
89629
+ access: "view",
89630
+ role: "viewer"
89631
+ },
89632
+ "pumpCycle.setEnabled": {
89633
+ capName: "pump-cycle",
89634
+ capScope: "device",
89635
+ addonId: null,
89636
+ access: "create",
89637
+ role: "viewer"
89638
+ },
89639
+ "pumpCycle.setOffMinutes": {
89640
+ capName: "pump-cycle",
89641
+ capScope: "device",
89642
+ addonId: null,
89643
+ access: "create",
89644
+ role: "viewer"
89645
+ },
89646
+ "pumpCycle.setOnMinutes": {
89647
+ capName: "pump-cycle",
89648
+ capScope: "device",
89649
+ addonId: null,
89650
+ access: "create",
89651
+ role: "viewer"
89652
+ },
89469
89653
  "reboot.reboot": {
89470
89654
  capName: "reboot",
89471
89655
  capScope: "device",
@@ -94021,21 +94205,6 @@ Object.freeze({
94021
94205
  form: "single",
94022
94206
  optional: false
94023
94207
  }],
94024
- "petFountain.setPumpInterval": [{
94025
- name: "deviceId",
94026
- form: "single",
94027
- optional: false
94028
- }],
94029
- "petFountain.setPumpOffMinutes": [{
94030
- name: "deviceId",
94031
- form: "single",
94032
- optional: false
94033
- }],
94034
- "petFountain.setPumpOnMinutes": [{
94035
- name: "deviceId",
94036
- form: "single",
94037
- optional: false
94038
- }],
94039
94208
  "pipelineAnalytics.addRetrainFrameFromRecording": [{
94040
94209
  name: "deviceId",
94041
94210
  form: "single",
@@ -94671,6 +94840,26 @@ Object.freeze({
94671
94840
  form: "single",
94672
94841
  optional: false
94673
94842
  }],
94843
+ "pumpCycle.getStatus": [{
94844
+ name: "deviceId",
94845
+ form: "single",
94846
+ optional: false
94847
+ }],
94848
+ "pumpCycle.setEnabled": [{
94849
+ name: "deviceId",
94850
+ form: "single",
94851
+ optional: false
94852
+ }],
94853
+ "pumpCycle.setOffMinutes": [{
94854
+ name: "deviceId",
94855
+ form: "single",
94856
+ optional: false
94857
+ }],
94858
+ "pumpCycle.setOnMinutes": [{
94859
+ name: "deviceId",
94860
+ form: "single",
94861
+ optional: false
94862
+ }],
94674
94863
  "reboot.reboot": [{
94675
94864
  name: "deviceId",
94676
94865
  form: "single",
@@ -96391,6 +96580,7 @@ var STATE_SUMMARY_VARS = [
96391
96580
  [...RULE_TEXT],
96392
96581
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
96393
96582
  ([...RULE_TEXT], [...COMBINED_ALARM]),
96583
+ ([...RULE_TEXT], [...COMBINED_ALARM]),
96394
96584
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
96395
96585
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
96396
96586
  ([...RULE_TEXT], [...CONSUMABLE]),
@@ -97525,6 +97715,12 @@ Object.defineProperty(exports, "binaryCapability", {
97525
97715
  return binaryCapability;
97526
97716
  }
97527
97717
  });
97718
+ Object.defineProperty(exports, "boardKeySourceCapability", {
97719
+ enumerable: true,
97720
+ get: function() {
97721
+ return boardKeySourceCapability;
97722
+ }
97723
+ });
97528
97724
  Object.defineProperty(exports, "boolean", {
97529
97725
  enumerable: true,
97530
97726
  get: function() {