@camstack/addon-provider-homeassistant 1.2.142 → 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-1gj-XZ-R.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
  /**
@@ -2872,6 +2872,10 @@ var CAPS_NOT_EXPORTED = [
2872
2872
  cap: "videoclips",
2873
2873
  reason: "Media retrieval by handle, not a state. Clips reach the operator through notifications and the viewer."
2874
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
+ },
2875
2879
  {
2876
2880
  cap: "webrtc-session",
2877
2881
  reason: "A session opener — the definition of transport."
@@ -4038,8 +4042,8 @@ async function applyCameraFunctionWrite(api, deviceId, write, sourceNodeId) {
4038
4042
  });
4039
4043
  return;
4040
4044
  case "recording-enabled": {
4041
- const config = await api.recording.getDeviceConfig.query({ deviceId });
4042
- await api.recording.setDeviceConfig.mutate({
4045
+ const config = await api.recordingArchive.getDeviceConfig.query({ deviceId });
4046
+ await api.recordingArchive.setDeviceConfig.mutate({
4043
4047
  deviceId,
4044
4048
  config: {
4045
4049
  ...config,
@@ -6858,7 +6862,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
6858
6862
  * that is not read stays `unknown` — unread, never failed.
6859
6863
  */
6860
6864
  async buildSyntheticNodes(topology) {
6861
- const usage = await this.ctx.api.recording.getStorageUsage.query({}).catch((err) => {
6865
+ const usage = await this.ctx.api.recordingArchive.getStorageUsage.query({}).catch((err) => {
6862
6866
  this.ctx.logger.warn("ha-export: could not read storage usage, the footage entities go unknown", { meta: { error: errMsg(err) } });
6863
6867
  return null;
6864
6868
  });
@@ -7202,7 +7206,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
7202
7206
  });
7203
7207
  return null;
7204
7208
  });
7205
- 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) => {
7206
7210
  this.ctx.logger.warn("ha-export: could not read recording config, the recording function degrades", {
7207
7211
  tags: { deviceId },
7208
7212
  meta: { error: errMsg(err) }
@@ -1,4 +1,4 @@
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-DbcraPOl.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
  /**
@@ -2867,6 +2867,10 @@ var CAPS_NOT_EXPORTED = [
2867
2867
  cap: "videoclips",
2868
2868
  reason: "Media retrieval by handle, not a state. Clips reach the operator through notifications and the viewer."
2869
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
+ },
2870
2874
  {
2871
2875
  cap: "webrtc-session",
2872
2876
  reason: "A session opener — the definition of transport."
@@ -4033,8 +4037,8 @@ async function applyCameraFunctionWrite(api, deviceId, write, sourceNodeId) {
4033
4037
  });
4034
4038
  return;
4035
4039
  case "recording-enabled": {
4036
- const config = await api.recording.getDeviceConfig.query({ deviceId });
4037
- await api.recording.setDeviceConfig.mutate({
4040
+ const config = await api.recordingArchive.getDeviceConfig.query({ deviceId });
4041
+ await api.recordingArchive.setDeviceConfig.mutate({
4038
4042
  deviceId,
4039
4043
  config: {
4040
4044
  ...config,
@@ -6853,7 +6857,7 @@ var HaExportAddon = class extends BaseAddon {
6853
6857
  * that is not read stays `unknown` — unread, never failed.
6854
6858
  */
6855
6859
  async buildSyntheticNodes(topology) {
6856
- const usage = await this.ctx.api.recording.getStorageUsage.query({}).catch((err) => {
6860
+ const usage = await this.ctx.api.recordingArchive.getStorageUsage.query({}).catch((err) => {
6857
6861
  this.ctx.logger.warn("ha-export: could not read storage usage, the footage entities go unknown", { meta: { error: errMsg(err) } });
6858
6862
  return null;
6859
6863
  });
@@ -7197,7 +7201,7 @@ var HaExportAddon = class extends BaseAddon {
7197
7201
  });
7198
7202
  return null;
7199
7203
  });
7200
- 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) => {
7201
7205
  this.ctx.logger.warn("ha-export: could not read recording config, the recording function degrades", {
7202
7206
  tags: { deviceId },
7203
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.142",
3
+ "version": "1.2.143",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",