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