@camstack/addon-provider-homeassistant 1.2.652 → 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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.653] - 2026-11-02
11
+
12
+ ### Changed
13
+
14
+ - Rebuilt against updated dependencies.
15
+
10
16
  ## [1.2.652] - 2026-11-02
11
17
 
12
18
  ### Changed
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ha_broker_source = require("./ha-broker-source-D3ScsO0T.js");
2
+ const require_ha_broker_source = require("./ha-broker-source-DnSL-mbs.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-admin-link.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as humidifierCapability, $t as boolean, A as brightnessCapability, At as switchCapability, Bt as weatherCapability, C as alarmPanelCapability, Ct as runningFromLawnMower, D as bestLocationMatch, Dt as scriptRunnerCapability, E as batteryCapability, Et as runningStateCapability, F as calendarSourceCapability, Ft as updateCapability, G as deviceAdminLinkCapability, H as contactCapability, Ht as RecordSecretUnavailableError, I as carbonMonoxideCapability, It as vacuumControlCapability, J as enumSensorCapability, Jt as entryBody, K as deviceAdoptionCapability, Kt as defineEntryKind, L as climateControlCapability, Lt as valveCapability, M as buildAddonRouteProvider, Mt as temperatureSensorCapability, N as buildDeviceAdminUrl, Nt as tryConvertDelta, O as binaryCapability, P as buttonCapability, Pt as tryConvertUnit, Q as gasCapability, Qt as array, R as colorCapability, Rt as vibrationCapability, S as airQualitySensorCapability, T as automationControlCapability, Tt as runningFromVacuumState, U as controlCapability, Ut as baseUnitOf, W as coverCapability, Wt as createEvent, X as fanControlCapability, Y as eventEmitterCapability, Z as floodCapability, Zt as _enum, _t as pressureSensorCapability, a as BaseDevice, an as string, at as mediaPlayerCapability, b as accessoriesCapability, bt as quantityFromUnit, cn as url, ct as notificationOutputCapability, dn as DeviceType, en as discriminatedUnion, et as humiditySensorCapability, fn as errMsg, ft as parseAdminBase, gt as presenceCapability, ht as prepareNotification, in as record, it as lockControlCapability, j as brokerCapability, jt as tamperCapability, k as boardKeySourceCapability, kt as smokeCapability, ln as DeviceFeature, lt as notifierCapability, nn as number, nt as ingestReading, o as BaseDeviceProvider, on as union, ot as motionCapability, p as EnumSensorDateTimeFormatSchema, pn as EventCategory, pt as powerMeterCapability, qt as defineRecordKinds, rn as object, rt as lawnMowerControlCapability, sn as unknown, st as normalizeUnit, t as HA_BROKER_KIND, tn as literal, tt as imageCapability, un as DeviceRole, ut as numericSensorCapability, v as RUNNING_STATE_COLD, w as ambientLightSensorCapability, wt as runningFromMediaPlayer, x as addonRoutesCapability, xt as resolveAttachmentUrls, y as TargetSchema, yt as publicEndpointReaderFrom, z as connectivityCapability, zt as waterHeaterCapability } from "./ha-broker-source-CBWl6Wat.mjs";
1
+ import { $ as humidifierCapability, $t as boolean, A as brightnessCapability, At as switchCapability, Bt as weatherCapability, C as alarmPanelCapability, Ct as runningFromLawnMower, D as bestLocationMatch, Dt as scriptRunnerCapability, E as batteryCapability, Et as runningStateCapability, F as calendarSourceCapability, Ft as updateCapability, G as deviceAdminLinkCapability, H as contactCapability, Ht as RecordSecretUnavailableError, I as carbonMonoxideCapability, It as vacuumControlCapability, J as enumSensorCapability, Jt as entryBody, K as deviceAdoptionCapability, Kt as defineEntryKind, L as climateControlCapability, Lt as valveCapability, M as buildAddonRouteProvider, Mt as temperatureSensorCapability, N as buildDeviceAdminUrl, Nt as tryConvertDelta, O as binaryCapability, P as buttonCapability, Pt as tryConvertUnit, Q as gasCapability, Qt as array, R as colorCapability, Rt as vibrationCapability, S as airQualitySensorCapability, T as automationControlCapability, Tt as runningFromVacuumState, U as controlCapability, Ut as baseUnitOf, W as coverCapability, Wt as createEvent, X as fanControlCapability, Y as eventEmitterCapability, Z as floodCapability, Zt as _enum, _t as pressureSensorCapability, a as BaseDevice, an as string, at as mediaPlayerCapability, b as accessoriesCapability, bt as quantityFromUnit, cn as url, ct as notificationOutputCapability, dn as DeviceType, en as discriminatedUnion, et as humiditySensorCapability, fn as errMsg, ft as parseAdminBase, gt as presenceCapability, ht as prepareNotification, in as record, it as lockControlCapability, j as brokerCapability, jt as tamperCapability, k as boardKeySourceCapability, kt as smokeCapability, ln as DeviceFeature, lt as notifierCapability, nn as number, nt as ingestReading, o as BaseDeviceProvider, on as union, ot as motionCapability, p as EnumSensorDateTimeFormatSchema, pn as EventCategory, pt as powerMeterCapability, qt as defineRecordKinds, rn as object, rt as lawnMowerControlCapability, sn as unknown, st as normalizeUnit, t as HA_BROKER_KIND, tn as literal, tt as imageCapability, un as DeviceRole, ut as numericSensorCapability, v as RUNNING_STATE_COLD, w as ambientLightSensorCapability, wt as runningFromMediaPlayer, x as addonRoutesCapability, xt as resolveAttachmentUrls, y as TargetSchema, yt as publicEndpointReaderFrom, z as connectivityCapability, zt as waterHeaterCapability } from "./ha-broker-source-CKdH9XHn.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-admin-link.ts
@@ -5974,7 +5974,7 @@ var ZodIssueCode = {
5974
5974
  var ZodFirstPartyTypeKind;
5975
5975
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5976
5976
  //#endregion
5977
- //#region ../types/dist/sleep-hmSP-eJt.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
  /**
@@ -67250,6 +67266,21 @@ var NcTemplateVarKindSchema = _enum([
67250
67266
  "sound",
67251
67267
  "system"
67252
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
+ });
67253
67284
  /** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
67254
67285
  var NcTemplateFamilySchema = _enum([
67255
67286
  "rule",
@@ -68105,7 +68136,11 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
68105
68136
  }), method(object({}), object({
68106
68137
  catalog: array(NcConditionDescriptorSchema),
68107
68138
  taxonomy: NcTaxonomySchema.optional()
68108
- })), 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, {
68109
68144
  kind: "mutation",
68110
68145
  access: "view"
68111
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 }), {
@@ -96544,6 +96579,7 @@ var STATE_SUMMARY_VARS = [
96544
96579
  [...RULE_TEXT],
96545
96580
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
96546
96581
  ([...RULE_TEXT], [...COMBINED_ALARM]),
96582
+ ([...RULE_TEXT], [...COMBINED_ALARM]),
96547
96583
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
96548
96584
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
96549
96585
  ([...RULE_TEXT], [...CONSUMABLE]),
@@ -5975,7 +5975,7 @@ var ZodIssueCode = {
5975
5975
  var ZodFirstPartyTypeKind;
5976
5976
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5977
5977
  //#endregion
5978
- //#region ../types/dist/sleep-hmSP-eJt.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
  /**
@@ -67251,6 +67267,21 @@ var NcTemplateVarKindSchema = _enum([
67251
67267
  "sound",
67252
67268
  "system"
67253
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
+ });
67254
67285
  /** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
67255
67286
  var NcTemplateFamilySchema = _enum([
67256
67287
  "rule",
@@ -68106,7 +68137,11 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
68106
68137
  }), method(object({}), object({
68107
68138
  catalog: array(NcConditionDescriptorSchema),
68108
68139
  taxonomy: NcTaxonomySchema.optional()
68109
- })), 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, {
68110
68145
  kind: "mutation",
68111
68146
  access: "view"
68112
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 }), {
@@ -96545,6 +96580,7 @@ var STATE_SUMMARY_VARS = [
96545
96580
  [...RULE_TEXT],
96546
96581
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
96547
96582
  ([...RULE_TEXT], [...COMBINED_ALARM]),
96583
+ ([...RULE_TEXT], [...COMBINED_ALARM]),
96548
96584
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
96549
96585
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
96550
96586
  ([...RULE_TEXT], [...CONSUMABLE]),
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_ha_broker_source = require("../ha-broker-source-D3ScsO0T.js");
27
+ const require_ha_broker_source = require("../ha-broker-source-DnSL-mbs.js");
28
28
  let node_crypto = require("node:crypto");
29
29
  require("node:zlib");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { B as consumableFormOf, Gt as defineAddonMigrations, M as buildAddonRouteProvider, Ot as sendToExportedTarget, Qt as array, St as runExportedAction, Ut as baseUnitOf, V as consumableKindOf, Vt as BaseAddon, Xt as nodePin, Yt as isReadingQuantity, _ as PLUG_APPLIANCE_TYPES, an as string, c as COCO_TO_MACRO, d as ConsumableItemSchema, dt as oauthIntegrationCapability, f as ConsumableStatusSchema, g as MediaPlayerRepeatSchema, h as HvacModeSchema, i as AlarmArmModeSchema, l as CameraSwitchIdSchema, m as FanDirectionSchema, mt as preconditionOf, pn as EventCategory, q as deviceExportCapability, r as listHomeAssistantBrokers, rn as object, s as CAMERA_SWITCH_ORDER, sn as unknown, u as ConsumableFormSchema, vt as pruneDeletedEntities, x as addonRoutesCapability } from "../ha-broker-source-CBWl6Wat.mjs";
1
+ import { B as consumableFormOf, Gt as defineAddonMigrations, M as buildAddonRouteProvider, Ot as sendToExportedTarget, Qt as array, St as runExportedAction, Ut as baseUnitOf, V as consumableKindOf, Vt as BaseAddon, Xt as nodePin, Yt as isReadingQuantity, _ as PLUG_APPLIANCE_TYPES, an as string, c as COCO_TO_MACRO, d as ConsumableItemSchema, dt as oauthIntegrationCapability, f as ConsumableStatusSchema, g as MediaPlayerRepeatSchema, h as HvacModeSchema, i as AlarmArmModeSchema, l as CameraSwitchIdSchema, m as FanDirectionSchema, mt as preconditionOf, pn as EventCategory, q as deviceExportCapability, r as listHomeAssistantBrokers, rn as object, s as CAMERA_SWITCH_ORDER, sn as unknown, u as ConsumableFormSchema, vt as pruneDeletedEntities, x as addonRoutesCapability } from "../ha-broker-source-CKdH9XHn.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  import "node:zlib";
4
4
  import "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.652",
3
+ "version": "1.2.653",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",
@@ -130,7 +130,7 @@
130
130
  "description": "Device provider (import) + native entity export (push). Two addons, one bundle, separate processes."
131
131
  },
132
132
  "requires": {
133
- "server": ">=1.2.742"
133
+ "server": ">=1.2.746"
134
134
  }
135
135
  },
136
136
  "files": [