@camstack/addon-provider-homeassistant 1.2.27 → 1.2.28

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/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-BgL1llIq.js");
2
+ const require_dist = require("./dist-D_Zn5oFS.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
@@ -6507,6 +6507,7 @@ var HA_ACTION_ICONS = {
6507
6507
  acknowledge: "mdi:check",
6508
6508
  dismiss: "mdi:close",
6509
6509
  silence: "mdi:bell-off",
6510
+ snooze: "mdi:bell-sleep",
6510
6511
  view: "mdi:eye",
6511
6512
  play: "mdi:play",
6512
6513
  open: "mdi:door-open",
@@ -6514,9 +6515,13 @@ var HA_ACTION_ICONS = {
6514
6515
  lock: "mdi:lock",
6515
6516
  unlock: "mdi:lock-open",
6516
6517
  arm: "mdi:shield-check",
6518
+ "arm-home": "mdi:shield-home",
6519
+ "arm-away": "mdi:shield-lock",
6520
+ "arm-night": "mdi:shield-moon",
6517
6521
  disarm: "mdi:shield-off",
6518
6522
  light: "mdi:lightbulb",
6519
- alert: "mdi:alert"
6523
+ alert: "mdi:alert",
6524
+ camera: "mdi:cctv"
6520
6525
  };
6521
6526
  /**
6522
6527
  * Build the `notify.<service>` `service_data` from a prepared (degraded)
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as tamperCapability, A as eventEmitterCapability, B as motionCapability, C as connectivityCapability, Ct as url, D as deviceAdoptionCapability, E as coverCapability, F as humiditySensorCapability, H as notificationOutputCapability, I as imageCapability, J as presenceCapability, K as powerMeterCapability, L as lawnMowerControlCapability, M as floodCapability, N as gasCapability, P as humidifierCapability, Q as switchCapability, R as lockControlCapability, S as colorCapability, St as unknown, T as controlCapability, U as notifierCapability, V as normalizeUnit, W as numericSensorCapability, X as scriptRunnerCapability, Y as pressureSensorCapability, Z as smokeCapability, _ as brokerCapability, _t as number, a as EnumSensorDateTimeFormatSchema, at as waterHeaterCapability, b as carbonMonoxideCapability, bt as string, c as addonRoutesCapability, d as ambientLightSensorCapability, dt as DeviceType, et as temperatureSensorCapability, f as automationControlCapability, ft as createEvent, g as brightnessCapability, gt as literal, h as binaryCapability, ht as discriminatedUnion, it as vibrationCapability, j as fanControlCapability, k as enumSensorCapability, l as airQualitySensorCapability, lt as DeviceFeature, m as bestLocationMatch, mt as array, n as BaseDeviceProvider, nt as vacuumControlCapability, o as TargetSchema, ot as weatherCapability, p as batteryCapability, pt as _enum, q as prepareNotification, rt as valveCapability, s as accessoriesCapability, st as errMsg, t as BaseDevice, tt as updateCapability, u as alarmPanelCapability, ut as DeviceRole, v as buildAddonRouteProvider, vt as object, w as contactCapability, wt as EventCategory, x as climateControlCapability, xt as union, y as buttonCapability, yt as record, z as mediaPlayerCapability } from "./dist-DoKfqBg9.mjs";
1
+ import { $ as tamperCapability, A as eventEmitterCapability, B as motionCapability, C as connectivityCapability, Ct as url, D as deviceAdoptionCapability, E as coverCapability, F as humiditySensorCapability, H as notificationOutputCapability, I as imageCapability, J as presenceCapability, K as powerMeterCapability, L as lawnMowerControlCapability, M as floodCapability, N as gasCapability, P as humidifierCapability, Q as switchCapability, R as lockControlCapability, S as colorCapability, St as unknown, T as controlCapability, U as notifierCapability, V as normalizeUnit, W as numericSensorCapability, X as scriptRunnerCapability, Y as pressureSensorCapability, Z as smokeCapability, _ as brokerCapability, _t as number, a as EnumSensorDateTimeFormatSchema, at as waterHeaterCapability, b as carbonMonoxideCapability, bt as string, c as addonRoutesCapability, d as ambientLightSensorCapability, dt as DeviceType, et as temperatureSensorCapability, f as automationControlCapability, ft as createEvent, g as brightnessCapability, gt as literal, h as binaryCapability, ht as discriminatedUnion, it as vibrationCapability, j as fanControlCapability, k as enumSensorCapability, l as airQualitySensorCapability, lt as DeviceFeature, m as bestLocationMatch, mt as array, n as BaseDeviceProvider, nt as vacuumControlCapability, o as TargetSchema, ot as weatherCapability, p as batteryCapability, pt as _enum, q as prepareNotification, rt as valveCapability, s as accessoriesCapability, st as errMsg, t as BaseDevice, tt as updateCapability, u as alarmPanelCapability, ut as DeviceRole, v as buildAddonRouteProvider, vt as object, w as contactCapability, wt as EventCategory, x as climateControlCapability, xt as union, y as buttonCapability, yt as record, z as mediaPlayerCapability } from "./dist-BvkeiSOJ.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -6506,6 +6506,7 @@ var HA_ACTION_ICONS = {
6506
6506
  acknowledge: "mdi:check",
6507
6507
  dismiss: "mdi:close",
6508
6508
  silence: "mdi:bell-off",
6509
+ snooze: "mdi:bell-sleep",
6509
6510
  view: "mdi:eye",
6510
6511
  play: "mdi:play",
6511
6512
  open: "mdi:door-open",
@@ -6513,9 +6514,13 @@ var HA_ACTION_ICONS = {
6513
6514
  lock: "mdi:lock",
6514
6515
  unlock: "mdi:lock-open",
6515
6516
  arm: "mdi:shield-check",
6517
+ "arm-home": "mdi:shield-home",
6518
+ "arm-away": "mdi:shield-lock",
6519
+ "arm-night": "mdi:shield-moon",
6516
6520
  disarm: "mdi:shield-off",
6517
6521
  light: "mdi:lightbulb",
6518
- alert: "mdi:alert"
6522
+ alert: "mdi:alert",
6523
+ camera: "mdi:cctv"
6519
6524
  };
6520
6525
  /**
6521
6526
  * Build the `notify.<service>` `service_data` from a prepared (degraded)
@@ -13474,11 +13474,33 @@ var NotificationFormatSchema = _enum([
13474
13474
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13475
13475
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13476
13476
  * differently.
13477
+ *
13478
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13479
+ *
13480
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13481
+ * the whole set onto its own renderer's vocabulary through a
13482
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13483
+ * fallback, so adding a member here fails every adapter's build until someone
13484
+ * decides its glyph, which is the only place that decision can be made
13485
+ * honestly.
13486
+ *
13487
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13488
+ * `disarm` straight through; iOS feeds that string to
13489
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13490
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13491
+ * mapping, and "the field is documented" is not "the value renders".
13492
+ *
13493
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13494
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13495
+ * so an addon that emits a token the running hub does not know does not lose an
13496
+ * icon — its whole `send` fails Zod validation and the notification never
13497
+ * arrives. Never emit a new token from an addon before the train carrying it.
13477
13498
  */
13478
13499
  var NotificationActionIconSchema = _enum([
13479
13500
  "acknowledge",
13480
13501
  "dismiss",
13481
13502
  "silence",
13503
+ "snooze",
13482
13504
  "view",
13483
13505
  "play",
13484
13506
  "open",
@@ -13486,9 +13508,13 @@ var NotificationActionIconSchema = _enum([
13486
13508
  "lock",
13487
13509
  "unlock",
13488
13510
  "arm",
13511
+ "arm-home",
13512
+ "arm-away",
13513
+ "arm-night",
13489
13514
  "disarm",
13490
13515
  "light",
13491
- "alert"
13516
+ "alert",
13517
+ "camera"
13492
13518
  ]);
13493
13519
  /** A single tap-through action button. */
13494
13520
  var NotificationActionSchema = object({
@@ -13702,6 +13728,24 @@ var notificationOutputCapability = {
13702
13728
  }), _void(), { kind: "mutation" })
13703
13729
  }
13704
13730
  };
13731
+ new Set([
13732
+ {
13733
+ id: "person",
13734
+ name: "Person"
13735
+ },
13736
+ {
13737
+ id: "vehicle",
13738
+ name: "Vehicle"
13739
+ },
13740
+ {
13741
+ id: "animal",
13742
+ name: "Animal"
13743
+ },
13744
+ {
13745
+ id: "package",
13746
+ name: "Package"
13747
+ }
13748
+ ].map((l) => l.id));
13705
13749
  var COCO_TO_MACRO = {
13706
13750
  mapping: {
13707
13751
  person: "person",
@@ -14537,6 +14581,8 @@ var NcSystemEventKindSchema = _enum([
14537
14581
  "alarm-triggered",
14538
14582
  "alarm-armed",
14539
14583
  "alarm-disarmed",
14584
+ "alarm-arming",
14585
+ "alarm-arm-refused",
14540
14586
  "camera-online",
14541
14587
  "camera-offline",
14542
14588
  "camera-disabled",
@@ -17815,6 +17861,22 @@ var detectionFpsField = {
17815
17861
  default: 10,
17816
17862
  step: 1
17817
17863
  };
17864
+ /**
17865
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
17866
+ *
17867
+ * The recheck is now on by default (a parked car is invisible to occupancy
17868
+ * rules until the stationary registry has been rebuilt by motion, which after a
17869
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
17870
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
17871
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
17872
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
17873
+ *
17874
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
17875
+ * the host validates `attachCamera` against ITS copy of this schema, so a
17876
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
17877
+ * carrying the wider bound is installed everywhere. 300 is the widest value
17878
+ * that ships with an addon deploy.
17879
+ */
17818
17880
  var occupancyRecheckSecField = {
17819
17881
  min: 0,
17820
17882
  max: 300,
@@ -18016,15 +18078,21 @@ var RunnerCameraConfigSchema = object({
18016
18078
  */
18017
18079
  onboardMotionDrivesAnalyzer: boolean().default(true),
18018
18080
  /**
18019
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
18020
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec`
18021
- * this is off by default because the recheck re-subscribes a detection session
18022
- * every N seconds while `watching`, a major source of pull-decoder re-dial
18023
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18081
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18082
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
18024
18083
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
18025
18084
  * (and only render) when this is enabled.
18026
- */
18027
- occupancyRecheckEnabled: boolean().default(false),
18085
+ *
18086
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18087
+ * recheck re-subscribes a detection session every N seconds while `watching`
18088
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18089
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18090
+ * object is counted only while the stationary registry holds it, and the
18091
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18092
+ * to every occupancy rule until something moved in front of it. The churn is
18093
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
18094
+ */
18095
+ occupancyRecheckEnabled: boolean().default(true),
18028
18096
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
18029
18097
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
18030
18098
  /**
@@ -13474,11 +13474,33 @@ var NotificationFormatSchema = _enum([
13474
13474
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13475
13475
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13476
13476
  * differently.
13477
+ *
13478
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13479
+ *
13480
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13481
+ * the whole set onto its own renderer's vocabulary through a
13482
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13483
+ * fallback, so adding a member here fails every adapter's build until someone
13484
+ * decides its glyph, which is the only place that decision can be made
13485
+ * honestly.
13486
+ *
13487
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13488
+ * `disarm` straight through; iOS feeds that string to
13489
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13490
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13491
+ * mapping, and "the field is documented" is not "the value renders".
13492
+ *
13493
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13494
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13495
+ * so an addon that emits a token the running hub does not know does not lose an
13496
+ * icon — its whole `send` fails Zod validation and the notification never
13497
+ * arrives. Never emit a new token from an addon before the train carrying it.
13477
13498
  */
13478
13499
  var NotificationActionIconSchema = _enum([
13479
13500
  "acknowledge",
13480
13501
  "dismiss",
13481
13502
  "silence",
13503
+ "snooze",
13482
13504
  "view",
13483
13505
  "play",
13484
13506
  "open",
@@ -13486,9 +13508,13 @@ var NotificationActionIconSchema = _enum([
13486
13508
  "lock",
13487
13509
  "unlock",
13488
13510
  "arm",
13511
+ "arm-home",
13512
+ "arm-away",
13513
+ "arm-night",
13489
13514
  "disarm",
13490
13515
  "light",
13491
- "alert"
13516
+ "alert",
13517
+ "camera"
13492
13518
  ]);
13493
13519
  /** A single tap-through action button. */
13494
13520
  var NotificationActionSchema = object({
@@ -13702,6 +13728,24 @@ var notificationOutputCapability = {
13702
13728
  }), _void(), { kind: "mutation" })
13703
13729
  }
13704
13730
  };
13731
+ new Set([
13732
+ {
13733
+ id: "person",
13734
+ name: "Person"
13735
+ },
13736
+ {
13737
+ id: "vehicle",
13738
+ name: "Vehicle"
13739
+ },
13740
+ {
13741
+ id: "animal",
13742
+ name: "Animal"
13743
+ },
13744
+ {
13745
+ id: "package",
13746
+ name: "Package"
13747
+ }
13748
+ ].map((l) => l.id));
13705
13749
  var COCO_TO_MACRO = {
13706
13750
  mapping: {
13707
13751
  person: "person",
@@ -14537,6 +14581,8 @@ var NcSystemEventKindSchema = _enum([
14537
14581
  "alarm-triggered",
14538
14582
  "alarm-armed",
14539
14583
  "alarm-disarmed",
14584
+ "alarm-arming",
14585
+ "alarm-arm-refused",
14540
14586
  "camera-online",
14541
14587
  "camera-offline",
14542
14588
  "camera-disabled",
@@ -17815,6 +17861,22 @@ var detectionFpsField = {
17815
17861
  default: 10,
17816
17862
  step: 1
17817
17863
  };
17864
+ /**
17865
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
17866
+ *
17867
+ * The recheck is now on by default (a parked car is invisible to occupancy
17868
+ * rules until the stationary registry has been rebuilt by motion, which after a
17869
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
17870
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
17871
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
17872
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
17873
+ *
17874
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
17875
+ * the host validates `attachCamera` against ITS copy of this schema, so a
17876
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
17877
+ * carrying the wider bound is installed everywhere. 300 is the widest value
17878
+ * that ships with an addon deploy.
17879
+ */
17818
17880
  var occupancyRecheckSecField = {
17819
17881
  min: 0,
17820
17882
  max: 300,
@@ -18016,15 +18078,21 @@ var RunnerCameraConfigSchema = object({
18016
18078
  */
18017
18079
  onboardMotionDrivesAnalyzer: boolean().default(true),
18018
18080
  /**
18019
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
18020
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec`
18021
- * this is off by default because the recheck re-subscribes a detection session
18022
- * every N seconds while `watching`, a major source of pull-decoder re-dial
18023
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18081
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18082
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
18024
18083
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
18025
18084
  * (and only render) when this is enabled.
18026
- */
18027
- occupancyRecheckEnabled: boolean().default(false),
18085
+ *
18086
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18087
+ * recheck re-subscribes a detection session every N seconds while `watching`
18088
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18089
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18090
+ * object is counted only while the stationary registry holds it, and the
18091
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18092
+ * to every occupancy rule until something moved in front of it. The churn is
18093
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
18094
+ */
18095
+ occupancyRecheckEnabled: boolean().default(true),
18028
18096
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
18029
18097
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
18030
18098
  /**
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-BgL1llIq.js");
6
+ const require_dist = require("../dist-D_Zn5oFS.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { G as oauthIntegrationCapability, O as deviceExportCapability, bt as string, c as addonRoutesCapability, ct as BaseAddon, i as CameraSwitchIdSchema, r as COCO_TO_MACRO, v as buildAddonRouteProvider, wt as EventCategory } from "../dist-DoKfqBg9.mjs";
1
+ import { G as oauthIntegrationCapability, O as deviceExportCapability, bt as string, c as addonRoutesCapability, ct as BaseAddon, i as CameraSwitchIdSchema, r as COCO_TO_MACRO, v as buildAddonRouteProvider, wt as EventCategory } from "../dist-BvkeiSOJ.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.27",
3
+ "version": "1.2.28",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",