@camstack/addon-provider-homeassistant 1.2.118 → 1.2.121

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-CojINel_.js");
2
+ const require_dist = require("./dist-DzuqG-Il.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
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-9vbU-7ZX.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-Den3sG_f.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
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-DEuj7E3j.mjs
5362
+ //#region ../types/dist/sleep-BEyvfshj.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -29070,11 +29070,39 @@ var NativeObjectDetectionStatusSchema = object({
29070
29070
  supportedClasses: array(NativeObjectClassEnum).readonly(),
29071
29071
  /**
29072
29072
  * Whether forwarding of onboard AI detections is enabled for this device.
29073
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
29074
- * churn the tracker, so forwarding stays off until the operator enables it.
29073
+ *
29074
+ * The COLD-START default is the provider's, and it is not one value for
29075
+ * every camera: a mains camera carries the boxed side-channel and its
29076
+ * detections are usable subjects, so it defaults ON; a battery camera never
29077
+ * attaches that channel, so the same toggle would buy it nothing but a write
29078
+ * — it defaults OFF and an operator who wants it turns it on knowing what it
29079
+ * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
29080
+ * says which of the two a camera is.
29075
29081
  */
29076
29082
  enabled: boolean()
29077
29083
  });
29084
+ /**
29085
+ * What a camera's onboard detections actually CARRY.
29086
+ *
29087
+ * `boxed` — the firmware ships a bounding box with the class, so a detection is
29088
+ * a subject the pipeline can track, crop and score.
29089
+ * `flag-only` — the firmware ships the class and nothing else. The pipeline
29090
+ * needs geometry to make a subject out of it, so such a push reaches the
29091
+ * tracker as motion and no further. On Reolink this is every battery camera:
29092
+ * the boxes ride the BcMedia sub-stream, which a battery camera never attaches.
29093
+ *
29094
+ * Reported and not inferred, because the operator's question in front of the
29095
+ * toggle is "what do I get", and "a class with no box" and "a subject" are
29096
+ * different answers (D14: the derived form is only as honest as `getOptions`).
29097
+ */
29098
+ var NativeObjectGeometryEnum = _enum(["boxed", "flag-only"]);
29099
+ var NativeObjectDetectionOptionsSchema = object({
29100
+ /** Classes this firmware can detect — the same list the status reports. */
29101
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
29102
+ /** What a detection from this camera carries. */
29103
+ geometry: NativeObjectGeometryEnum
29104
+ });
29105
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
29078
29106
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
29079
29107
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
29080
29108
  lastFetchedAt: number() });
@@ -29084,13 +29112,28 @@ var nativeObjectDetectionCapability = {
29084
29112
  deviceNative: true,
29085
29113
  mode: "singleton",
29086
29114
  deviceTypes: [DeviceType.Camera],
29087
- methods: { setEnabled: method(object({
29088
- deviceId: number(),
29089
- enabled: boolean()
29090
- }), _void(), {
29091
- kind: "mutation",
29092
- auth: "admin"
29093
- }) },
29115
+ deviceConfig: { ui: {
29116
+ kind: "derived-form",
29117
+ builderId: "native-object-detection",
29118
+ tab: "motion"
29119
+ } },
29120
+ methods: {
29121
+ getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
29122
+ setSettings: method(object({
29123
+ deviceId: number(),
29124
+ settings: NativeObjectDetectionSettingsPatchSchema
29125
+ }), _void(), {
29126
+ kind: "mutation",
29127
+ auth: "admin"
29128
+ }),
29129
+ setEnabled: method(object({
29130
+ deviceId: number(),
29131
+ enabled: boolean()
29132
+ }), _void(), {
29133
+ kind: "mutation",
29134
+ auth: "admin"
29135
+ })
29136
+ },
29094
29137
  events: { onDetected: { data: object({
29095
29138
  deviceId: number(),
29096
29139
  detection: NativeDetectionSchema
@@ -38460,12 +38503,24 @@ Object.freeze({
38460
38503
  addonId: null,
38461
38504
  access: "create"
38462
38505
  },
38506
+ "nativeObjectDetection.getOptions": {
38507
+ capName: "native-object-detection",
38508
+ capScope: "device",
38509
+ addonId: null,
38510
+ access: "view"
38511
+ },
38463
38512
  "nativeObjectDetection.setEnabled": {
38464
38513
  capName: "native-object-detection",
38465
38514
  capScope: "device",
38466
38515
  addonId: null,
38467
38516
  access: "create"
38468
38517
  },
38518
+ "nativeObjectDetection.setSettings": {
38519
+ capName: "native-object-detection",
38520
+ capScope: "device",
38521
+ addonId: null,
38522
+ access: "create"
38523
+ },
38469
38524
  "navigation.getFeatures": {
38470
38525
  capName: "navigation",
38471
38526
  capScope: "device",
@@ -42692,11 +42747,21 @@ Object.freeze({
42692
42747
  form: "single",
42693
42748
  optional: false
42694
42749
  }],
42750
+ "nativeObjectDetection.getOptions": [{
42751
+ name: "deviceId",
42752
+ form: "single",
42753
+ optional: false
42754
+ }],
42695
42755
  "nativeObjectDetection.setEnabled": [{
42696
42756
  name: "deviceId",
42697
42757
  form: "single",
42698
42758
  optional: false
42699
42759
  }],
42760
+ "nativeObjectDetection.setSettings": [{
42761
+ name: "deviceId",
42762
+ form: "single",
42763
+ optional: false
42764
+ }],
42700
42765
  "navigation.getFeatures": [{
42701
42766
  name: "deviceId",
42702
42767
  form: "single",
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-DEuj7E3j.mjs
5362
+ //#region ../types/dist/sleep-BEyvfshj.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -29070,11 +29070,39 @@ var NativeObjectDetectionStatusSchema = object({
29070
29070
  supportedClasses: array(NativeObjectClassEnum).readonly(),
29071
29071
  /**
29072
29072
  * Whether forwarding of onboard AI detections is enabled for this device.
29073
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
29074
- * churn the tracker, so forwarding stays off until the operator enables it.
29073
+ *
29074
+ * The COLD-START default is the provider's, and it is not one value for
29075
+ * every camera: a mains camera carries the boxed side-channel and its
29076
+ * detections are usable subjects, so it defaults ON; a battery camera never
29077
+ * attaches that channel, so the same toggle would buy it nothing but a write
29078
+ * — it defaults OFF and an operator who wants it turns it on knowing what it
29079
+ * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
29080
+ * says which of the two a camera is.
29075
29081
  */
29076
29082
  enabled: boolean()
29077
29083
  });
29084
+ /**
29085
+ * What a camera's onboard detections actually CARRY.
29086
+ *
29087
+ * `boxed` — the firmware ships a bounding box with the class, so a detection is
29088
+ * a subject the pipeline can track, crop and score.
29089
+ * `flag-only` — the firmware ships the class and nothing else. The pipeline
29090
+ * needs geometry to make a subject out of it, so such a push reaches the
29091
+ * tracker as motion and no further. On Reolink this is every battery camera:
29092
+ * the boxes ride the BcMedia sub-stream, which a battery camera never attaches.
29093
+ *
29094
+ * Reported and not inferred, because the operator's question in front of the
29095
+ * toggle is "what do I get", and "a class with no box" and "a subject" are
29096
+ * different answers (D14: the derived form is only as honest as `getOptions`).
29097
+ */
29098
+ var NativeObjectGeometryEnum = _enum(["boxed", "flag-only"]);
29099
+ var NativeObjectDetectionOptionsSchema = object({
29100
+ /** Classes this firmware can detect — the same list the status reports. */
29101
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
29102
+ /** What a detection from this camera carries. */
29103
+ geometry: NativeObjectGeometryEnum
29104
+ });
29105
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
29078
29106
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
29079
29107
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
29080
29108
  lastFetchedAt: number() });
@@ -29084,13 +29112,28 @@ var nativeObjectDetectionCapability = {
29084
29112
  deviceNative: true,
29085
29113
  mode: "singleton",
29086
29114
  deviceTypes: [DeviceType.Camera],
29087
- methods: { setEnabled: method(object({
29088
- deviceId: number(),
29089
- enabled: boolean()
29090
- }), _void(), {
29091
- kind: "mutation",
29092
- auth: "admin"
29093
- }) },
29115
+ deviceConfig: { ui: {
29116
+ kind: "derived-form",
29117
+ builderId: "native-object-detection",
29118
+ tab: "motion"
29119
+ } },
29120
+ methods: {
29121
+ getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
29122
+ setSettings: method(object({
29123
+ deviceId: number(),
29124
+ settings: NativeObjectDetectionSettingsPatchSchema
29125
+ }), _void(), {
29126
+ kind: "mutation",
29127
+ auth: "admin"
29128
+ }),
29129
+ setEnabled: method(object({
29130
+ deviceId: number(),
29131
+ enabled: boolean()
29132
+ }), _void(), {
29133
+ kind: "mutation",
29134
+ auth: "admin"
29135
+ })
29136
+ },
29094
29137
  events: { onDetected: { data: object({
29095
29138
  deviceId: number(),
29096
29139
  detection: NativeDetectionSchema
@@ -38460,12 +38503,24 @@ Object.freeze({
38460
38503
  addonId: null,
38461
38504
  access: "create"
38462
38505
  },
38506
+ "nativeObjectDetection.getOptions": {
38507
+ capName: "native-object-detection",
38508
+ capScope: "device",
38509
+ addonId: null,
38510
+ access: "view"
38511
+ },
38463
38512
  "nativeObjectDetection.setEnabled": {
38464
38513
  capName: "native-object-detection",
38465
38514
  capScope: "device",
38466
38515
  addonId: null,
38467
38516
  access: "create"
38468
38517
  },
38518
+ "nativeObjectDetection.setSettings": {
38519
+ capName: "native-object-detection",
38520
+ capScope: "device",
38521
+ addonId: null,
38522
+ access: "create"
38523
+ },
38469
38524
  "navigation.getFeatures": {
38470
38525
  capName: "navigation",
38471
38526
  capScope: "device",
@@ -42692,11 +42747,21 @@ Object.freeze({
42692
42747
  form: "single",
42693
42748
  optional: false
42694
42749
  }],
42750
+ "nativeObjectDetection.getOptions": [{
42751
+ name: "deviceId",
42752
+ form: "single",
42753
+ optional: false
42754
+ }],
42695
42755
  "nativeObjectDetection.setEnabled": [{
42696
42756
  name: "deviceId",
42697
42757
  form: "single",
42698
42758
  optional: false
42699
42759
  }],
42760
+ "nativeObjectDetection.setSettings": [{
42761
+ name: "deviceId",
42762
+ form: "single",
42763
+ optional: false
42764
+ }],
42700
42765
  "navigation.getFeatures": [{
42701
42766
  name: "deviceId",
42702
42767
  form: "single",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-CojINel_.js");
6
+ const require_dist = require("../dist-DzuqG-Il.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: "stream-signals",
2761
+ reason: "A DECLARATION, not a state: it lists the signals a camera can emit to wake its own stream, so the broker can offer them as wake sources. Nothing about it changes over time and nothing about it is a reading — an entity here would show a constant list forever. The signals themselves already reach Home Assistant where they mean something: motion as the motion sensor, a camera-native detection as its own binary sensor."
2762
+ },
2759
2763
  {
2760
2764
  cap: "network-link",
2761
2765
  reason: "Already exported, imperatively: the device catalog pushes a `Network link` sensor and a `Signal` percentage sensor for any device carrying the slice. A CAP_ENTITY_MAP row would produce a THIRD entity from the same slice, and the cap needs two entities from one slice (a link type and a percentage that is null on a wired link) which a single mapping row cannot express."
@@ -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-9vbU-7ZX.mjs";
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-Den3sG_f.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: "stream-signals",
2756
+ reason: "A DECLARATION, not a state: it lists the signals a camera can emit to wake its own stream, so the broker can offer them as wake sources. Nothing about it changes over time and nothing about it is a reading — an entity here would show a constant list forever. The signals themselves already reach Home Assistant where they mean something: motion as the motion sensor, a camera-native detection as its own binary sensor."
2757
+ },
2754
2758
  {
2755
2759
  cap: "network-link",
2756
2760
  reason: "Already exported, imperatively: the device catalog pushes a `Network link` sensor and a `Signal` percentage sensor for any device carrying the slice. A CAP_ENTITY_MAP row would produce a THIRD entity from the same slice, and the cap needs two entities from one slice (a link type and a percentage that is null on a wired link) which a single mapping row cannot express."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.118",
3
+ "version": "1.2.121",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",