@camstack/addon-provider-homeassistant 1.2.141 → 1.2.143

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.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-DdU8yrnj.js");
6
+ const require_dist = require("../dist-BQE3XuD4.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -2756,6 +2756,10 @@ function capEntitySpecs(capName) {
2756
2756
  return specs;
2757
2757
  }
2758
2758
  var CAPS_NOT_EXPORTED = [
2759
+ {
2760
+ cap: "recording-onboard",
2761
+ reason: "An EDITOR of the CAMERA’s own recorder: a weekly schedule of windows per trigger, plus the facts about the card it writes to. The schedule is a document an operator authors, not a reading — an entity would publish 168 slots as a state and nothing in Home Assistant could act on it. The storage side is a reading, but it belongs to the camera’s own health rather than to this cap’s editor surface, and publishing capacity here would put the same number in two places the day a health cap carries it. ONE thing here is arguably a real binary sensor: `recordingToNowhere` — scheduled to record with no usable card. It is deliberately NOT exported yet, because exporting half a cap needs the split decided first, and the two cameras it fires on today are already a danger banner and a WARN."
2762
+ },
2759
2763
  {
2760
2764
  cap: "camera-grid-layout",
2761
2765
  reason: "An EDITOR, not a reading: it carries which camera sits in which cell of a composite grid, authored through a host widget in the device tab. Nothing about it is a measurement and nothing in Home Assistant can act on it — the grid itself already reaches HA as an ordinary camera entity, which is the thing an operator actually watches. An entity here would publish a layout document as a state and never carry a value anyone could use."
@@ -2868,6 +2872,10 @@ var CAPS_NOT_EXPORTED = [
2868
2872
  cap: "videoclips",
2869
2873
  reason: "Media retrieval by handle, not a state. Clips reach the operator through notifications and the viewer."
2870
2874
  },
2875
+ {
2876
+ cap: "recording",
2877
+ reason: "Since D625 this is the per-camera COVERAGE and PLAYBACK collection: which sources a camera has recordings in, what each covers over a window, and how to play an instant of it. Every method takes a window and a chosen source, so nothing here is a state a descriptor could publish — an entity would have to invent both. What an operator actually wants in Home Assistant is \"is this camera recording\", and that is `RecordingConfig.enabled` on `recording-archive`, which the camera-function switches already export as the ONE authority (D62). A second entity over this cap would be the second knob that decision forbids."
2878
+ },
2871
2879
  {
2872
2880
  cap: "webrtc-session",
2873
2881
  reason: "A session opener — the definition of transport."
@@ -4034,8 +4042,8 @@ async function applyCameraFunctionWrite(api, deviceId, write, sourceNodeId) {
4034
4042
  });
4035
4043
  return;
4036
4044
  case "recording-enabled": {
4037
- const config = await api.recording.getDeviceConfig.query({ deviceId });
4038
- await api.recording.setDeviceConfig.mutate({
4045
+ const config = await api.recordingArchive.getDeviceConfig.query({ deviceId });
4046
+ await api.recordingArchive.setDeviceConfig.mutate({
4039
4047
  deviceId,
4040
4048
  config: {
4041
4049
  ...config,
@@ -6854,7 +6862,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
6854
6862
  * that is not read stays `unknown` — unread, never failed.
6855
6863
  */
6856
6864
  async buildSyntheticNodes(topology) {
6857
- const usage = await this.ctx.api.recording.getStorageUsage.query({}).catch((err) => {
6865
+ const usage = await this.ctx.api.recordingArchive.getStorageUsage.query({}).catch((err) => {
6858
6866
  this.ctx.logger.warn("ha-export: could not read storage usage, the footage entities go unknown", { meta: { error: errMsg(err) } });
6859
6867
  return null;
6860
6868
  });
@@ -7198,7 +7206,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
7198
7206
  });
7199
7207
  return null;
7200
7208
  });
7201
- const recordingEnabled = await this.ctx.api.recording.getDeviceConfig.query({ deviceId }).then((config) => config.enabled).catch((err) => {
7209
+ const recordingEnabled = await this.ctx.api.recordingArchive.getDeviceConfig.query({ deviceId }).then((config) => config.enabled).catch((err) => {
7202
7210
  this.ctx.logger.warn("ha-export: could not read recording config, the recording function degrades", {
7203
7211
  tags: { deviceId },
7204
7212
  meta: { error: errMsg(err) }
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-R2qhuV_9.mjs";
1
+ import { C as buildAddonRouteProvider, F as deviceExportCapability, Nt as EventCategory, Q as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, gt as BaseAddon, i as CAMERA_SWITCH_ORDER, kt as string, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, xt as nodePin } from "../dist-CcnfBSQ5.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
@@ -2751,6 +2751,10 @@ function capEntitySpecs(capName) {
2751
2751
  return specs;
2752
2752
  }
2753
2753
  var CAPS_NOT_EXPORTED = [
2754
+ {
2755
+ cap: "recording-onboard",
2756
+ reason: "An EDITOR of the CAMERA’s own recorder: a weekly schedule of windows per trigger, plus the facts about the card it writes to. The schedule is a document an operator authors, not a reading — an entity would publish 168 slots as a state and nothing in Home Assistant could act on it. The storage side is a reading, but it belongs to the camera’s own health rather than to this cap’s editor surface, and publishing capacity here would put the same number in two places the day a health cap carries it. ONE thing here is arguably a real binary sensor: `recordingToNowhere` — scheduled to record with no usable card. It is deliberately NOT exported yet, because exporting half a cap needs the split decided first, and the two cameras it fires on today are already a danger banner and a WARN."
2757
+ },
2754
2758
  {
2755
2759
  cap: "camera-grid-layout",
2756
2760
  reason: "An EDITOR, not a reading: it carries which camera sits in which cell of a composite grid, authored through a host widget in the device tab. Nothing about it is a measurement and nothing in Home Assistant can act on it — the grid itself already reaches HA as an ordinary camera entity, which is the thing an operator actually watches. An entity here would publish a layout document as a state and never carry a value anyone could use."
@@ -2863,6 +2867,10 @@ var CAPS_NOT_EXPORTED = [
2863
2867
  cap: "videoclips",
2864
2868
  reason: "Media retrieval by handle, not a state. Clips reach the operator through notifications and the viewer."
2865
2869
  },
2870
+ {
2871
+ cap: "recording",
2872
+ reason: "Since D625 this is the per-camera COVERAGE and PLAYBACK collection: which sources a camera has recordings in, what each covers over a window, and how to play an instant of it. Every method takes a window and a chosen source, so nothing here is a state a descriptor could publish — an entity would have to invent both. What an operator actually wants in Home Assistant is \"is this camera recording\", and that is `RecordingConfig.enabled` on `recording-archive`, which the camera-function switches already export as the ONE authority (D62). A second entity over this cap would be the second knob that decision forbids."
2873
+ },
2866
2874
  {
2867
2875
  cap: "webrtc-session",
2868
2876
  reason: "A session opener — the definition of transport."
@@ -4029,8 +4037,8 @@ async function applyCameraFunctionWrite(api, deviceId, write, sourceNodeId) {
4029
4037
  });
4030
4038
  return;
4031
4039
  case "recording-enabled": {
4032
- const config = await api.recording.getDeviceConfig.query({ deviceId });
4033
- await api.recording.setDeviceConfig.mutate({
4040
+ const config = await api.recordingArchive.getDeviceConfig.query({ deviceId });
4041
+ await api.recordingArchive.setDeviceConfig.mutate({
4034
4042
  deviceId,
4035
4043
  config: {
4036
4044
  ...config,
@@ -6849,7 +6857,7 @@ var HaExportAddon = class extends BaseAddon {
6849
6857
  * that is not read stays `unknown` — unread, never failed.
6850
6858
  */
6851
6859
  async buildSyntheticNodes(topology) {
6852
- const usage = await this.ctx.api.recording.getStorageUsage.query({}).catch((err) => {
6860
+ const usage = await this.ctx.api.recordingArchive.getStorageUsage.query({}).catch((err) => {
6853
6861
  this.ctx.logger.warn("ha-export: could not read storage usage, the footage entities go unknown", { meta: { error: errMsg(err) } });
6854
6862
  return null;
6855
6863
  });
@@ -7193,7 +7201,7 @@ var HaExportAddon = class extends BaseAddon {
7193
7201
  });
7194
7202
  return null;
7195
7203
  });
7196
- const recordingEnabled = await this.ctx.api.recording.getDeviceConfig.query({ deviceId }).then((config) => config.enabled).catch((err) => {
7204
+ const recordingEnabled = await this.ctx.api.recordingArchive.getDeviceConfig.query({ deviceId }).then((config) => config.enabled).catch((err) => {
7197
7205
  this.ctx.logger.warn("ha-export: could not read recording config, the recording function degrades", {
7198
7206
  tags: { deviceId },
7199
7207
  meta: { error: errMsg(err) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.141",
3
+ "version": "1.2.143",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",