@camstack/addon-provider-homeassistant 1.2.64 → 1.2.65

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-Cm6-aUVi.js");
2
+ const require_dist = require("./dist-hXonkb3t.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-Cu_caOlV.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-Ddc6B6iE.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
@@ -19579,6 +19579,34 @@ var KeyEventsForDeviceSchema = object({
19579
19579
  deviceId: number(),
19580
19580
  events: array(KeyEventSchema).readonly()
19581
19581
  });
19582
+ /** One non-empty bucket of the timeline histogram. */
19583
+ var EventDensityBucketSchema = object({
19584
+ bucketStart: number(),
19585
+ motion: number().int(),
19586
+ object: number().int(),
19587
+ audio: number().int()
19588
+ });
19589
+ /**
19590
+ * One camera's row in a `getEventDensityBatch` answer.
19591
+ *
19592
+ * TWO facts, and the timeline draws them differently:
19593
+ *
19594
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
19595
+ * claim: read, and nothing happened in the window.
19596
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
19597
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
19598
+ * not quiet.
19599
+ *
19600
+ * Fanned out per camera the difference was free — one query rejected while the
19601
+ * others resolved — and collapsing to a batch is the exact moment it is lost
19602
+ * silently. Every requested id gets a row: a caller that asked for twelve and
19603
+ * got eleven cannot tell which one is missing, or that any is.
19604
+ */
19605
+ var EventDensityForDeviceSchema = object({
19606
+ deviceId: number(),
19607
+ read: _enum(["read", "unreadable"]),
19608
+ buckets: array(EventDensityBucketSchema).readonly()
19609
+ });
19582
19610
  object({
19583
19611
  trackId: string(),
19584
19612
  className: string(),
@@ -19889,12 +19917,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19889
19917
  since: number(),
19890
19918
  until: number(),
19891
19919
  bucketMs: number().int().positive()
19892
- }), array(object({
19893
- bucketStart: number(),
19894
- motion: number().int(),
19895
- object: number().int(),
19896
- audio: number().int()
19897
- })).readonly()), method(object({
19920
+ }), array(EventDensityBucketSchema).readonly()), method(object({
19921
+ deviceIds: array(number()).min(1).max(200),
19922
+ since: number(),
19923
+ until: number(),
19924
+ bucketMs: number().int().positive()
19925
+ }), array(EventDensityForDeviceSchema).readonly()), method(object({
19898
19926
  deviceId: number(),
19899
19927
  cutoffMs: number()
19900
19928
  }), object({
@@ -29008,6 +29036,39 @@ var RecordingDaysSchema = object({
29008
29036
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29009
29037
  days: array(number())
29010
29038
  });
29039
+ /**
29040
+ * One camera's row in a `getAvailabilityBatch` answer.
29041
+ *
29042
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
29043
+ * batch collapses the transport, not the work — plus the one thing the singular
29044
+ * method never had to say:
29045
+ *
29046
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
29047
+ * no footage in the window", which is a real claim.
29048
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
29049
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
29050
+ * that emptiness means NOTHING.
29051
+ *
29052
+ * A timeline that renders the second as the first tells an operator there is no
29053
+ * footage when the truth is that nobody looked.
29054
+ */
29055
+ var RecordingAvailabilityForDeviceSchema = object({
29056
+ deviceId: number(),
29057
+ read: _enum(["read", "unreadable"]),
29058
+ ranges: array(RecordingRangeSchema).readonly()
29059
+ });
29060
+ /**
29061
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
29062
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
29063
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
29064
+ * the date-picker's day dots must not spell them the same.
29065
+ */
29066
+ var RecordingDaysForDeviceSchema = object({
29067
+ deviceId: number(),
29068
+ read: _enum(["read", "unreadable"]),
29069
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29070
+ days: array(number()).readonly()
29071
+ });
29011
29072
  var RecordingManifestSchema = object({
29012
29073
  deviceId: number(),
29013
29074
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -29242,6 +29303,13 @@ method(object({
29242
29303
  }), RecordingAvailabilitySchema, {
29243
29304
  kind: "query",
29244
29305
  auth: "protected"
29306
+ }), method(object({
29307
+ deviceIds: array(number()).min(1).max(200),
29308
+ fromMs: number(),
29309
+ toMs: number()
29310
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
29311
+ kind: "query",
29312
+ auth: "protected"
29245
29313
  }), method(object({
29246
29314
  deviceId: number(),
29247
29315
  fromMs: number(),
@@ -29250,6 +29318,14 @@ method(object({
29250
29318
  }), RecordingDaysSchema, {
29251
29319
  kind: "query",
29252
29320
  auth: "protected"
29321
+ }), method(object({
29322
+ deviceIds: array(number()).min(1).max(200),
29323
+ fromMs: number(),
29324
+ toMs: number(),
29325
+ tzOffsetMinutes: number()
29326
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
29327
+ kind: "query",
29328
+ auth: "protected"
29253
29329
  }), method(object({
29254
29330
  deviceId: number(),
29255
29331
  fromMs: number(),
@@ -36146,6 +36222,12 @@ Object.freeze({
36146
36222
  addonId: null,
36147
36223
  access: "view"
36148
36224
  },
36225
+ "pipelineAnalytics.getEventDensityBatch": {
36226
+ capName: "pipeline-analytics",
36227
+ capScope: "device",
36228
+ addonId: null,
36229
+ access: "view"
36230
+ },
36149
36231
  "pipelineAnalytics.getEventMedia": {
36150
36232
  capName: "pipeline-analytics",
36151
36233
  capScope: "device",
@@ -37268,12 +37350,24 @@ Object.freeze({
37268
37350
  addonId: null,
37269
37351
  access: "view"
37270
37352
  },
37353
+ "recording.getAvailabilityBatch": {
37354
+ capName: "recording",
37355
+ capScope: "system",
37356
+ addonId: null,
37357
+ access: "view"
37358
+ },
37271
37359
  "recording.getDaysWithRecordings": {
37272
37360
  capName: "recording",
37273
37361
  capScope: "system",
37274
37362
  addonId: null,
37275
37363
  access: "view"
37276
37364
  },
37365
+ "recording.getDaysWithRecordingsBatch": {
37366
+ capName: "recording",
37367
+ capScope: "system",
37368
+ addonId: null,
37369
+ access: "view"
37370
+ },
37277
37371
  "recording.getDeviceConfig": {
37278
37372
  capName: "recording",
37279
37373
  capScope: "system",
@@ -39878,6 +39972,11 @@ Object.freeze({
39878
39972
  form: "single",
39879
39973
  optional: false
39880
39974
  }],
39975
+ "pipelineAnalytics.getEventDensityBatch": [{
39976
+ name: "deviceIds",
39977
+ form: "array",
39978
+ optional: false
39979
+ }],
39881
39980
  "pipelineAnalytics.getEventMedia": [{
39882
39981
  name: "deviceId",
39883
39982
  form: "single",
@@ -40293,11 +40392,21 @@ Object.freeze({
40293
40392
  form: "single",
40294
40393
  optional: false
40295
40394
  }],
40395
+ "recording.getAvailabilityBatch": [{
40396
+ name: "deviceIds",
40397
+ form: "array",
40398
+ optional: false
40399
+ }],
40296
40400
  "recording.getDaysWithRecordings": [{
40297
40401
  name: "deviceId",
40298
40402
  form: "single",
40299
40403
  optional: false
40300
40404
  }],
40405
+ "recording.getDaysWithRecordingsBatch": [{
40406
+ name: "deviceIds",
40407
+ form: "array",
40408
+ optional: false
40409
+ }],
40301
40410
  "recording.getDeviceConfig": [{
40302
40411
  name: "deviceId",
40303
40412
  form: "single",
@@ -19579,6 +19579,34 @@ var KeyEventsForDeviceSchema = object({
19579
19579
  deviceId: number(),
19580
19580
  events: array(KeyEventSchema).readonly()
19581
19581
  });
19582
+ /** One non-empty bucket of the timeline histogram. */
19583
+ var EventDensityBucketSchema = object({
19584
+ bucketStart: number(),
19585
+ motion: number().int(),
19586
+ object: number().int(),
19587
+ audio: number().int()
19588
+ });
19589
+ /**
19590
+ * One camera's row in a `getEventDensityBatch` answer.
19591
+ *
19592
+ * TWO facts, and the timeline draws them differently:
19593
+ *
19594
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
19595
+ * claim: read, and nothing happened in the window.
19596
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
19597
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
19598
+ * not quiet.
19599
+ *
19600
+ * Fanned out per camera the difference was free — one query rejected while the
19601
+ * others resolved — and collapsing to a batch is the exact moment it is lost
19602
+ * silently. Every requested id gets a row: a caller that asked for twelve and
19603
+ * got eleven cannot tell which one is missing, or that any is.
19604
+ */
19605
+ var EventDensityForDeviceSchema = object({
19606
+ deviceId: number(),
19607
+ read: _enum(["read", "unreadable"]),
19608
+ buckets: array(EventDensityBucketSchema).readonly()
19609
+ });
19582
19610
  object({
19583
19611
  trackId: string(),
19584
19612
  className: string(),
@@ -19889,12 +19917,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19889
19917
  since: number(),
19890
19918
  until: number(),
19891
19919
  bucketMs: number().int().positive()
19892
- }), array(object({
19893
- bucketStart: number(),
19894
- motion: number().int(),
19895
- object: number().int(),
19896
- audio: number().int()
19897
- })).readonly()), method(object({
19920
+ }), array(EventDensityBucketSchema).readonly()), method(object({
19921
+ deviceIds: array(number()).min(1).max(200),
19922
+ since: number(),
19923
+ until: number(),
19924
+ bucketMs: number().int().positive()
19925
+ }), array(EventDensityForDeviceSchema).readonly()), method(object({
19898
19926
  deviceId: number(),
19899
19927
  cutoffMs: number()
19900
19928
  }), object({
@@ -29008,6 +29036,39 @@ var RecordingDaysSchema = object({
29008
29036
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29009
29037
  days: array(number())
29010
29038
  });
29039
+ /**
29040
+ * One camera's row in a `getAvailabilityBatch` answer.
29041
+ *
29042
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
29043
+ * batch collapses the transport, not the work — plus the one thing the singular
29044
+ * method never had to say:
29045
+ *
29046
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
29047
+ * no footage in the window", which is a real claim.
29048
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
29049
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
29050
+ * that emptiness means NOTHING.
29051
+ *
29052
+ * A timeline that renders the second as the first tells an operator there is no
29053
+ * footage when the truth is that nobody looked.
29054
+ */
29055
+ var RecordingAvailabilityForDeviceSchema = object({
29056
+ deviceId: number(),
29057
+ read: _enum(["read", "unreadable"]),
29058
+ ranges: array(RecordingRangeSchema).readonly()
29059
+ });
29060
+ /**
29061
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
29062
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
29063
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
29064
+ * the date-picker's day dots must not spell them the same.
29065
+ */
29066
+ var RecordingDaysForDeviceSchema = object({
29067
+ deviceId: number(),
29068
+ read: _enum(["read", "unreadable"]),
29069
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29070
+ days: array(number()).readonly()
29071
+ });
29011
29072
  var RecordingManifestSchema = object({
29012
29073
  deviceId: number(),
29013
29074
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -29242,6 +29303,13 @@ method(object({
29242
29303
  }), RecordingAvailabilitySchema, {
29243
29304
  kind: "query",
29244
29305
  auth: "protected"
29306
+ }), method(object({
29307
+ deviceIds: array(number()).min(1).max(200),
29308
+ fromMs: number(),
29309
+ toMs: number()
29310
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
29311
+ kind: "query",
29312
+ auth: "protected"
29245
29313
  }), method(object({
29246
29314
  deviceId: number(),
29247
29315
  fromMs: number(),
@@ -29250,6 +29318,14 @@ method(object({
29250
29318
  }), RecordingDaysSchema, {
29251
29319
  kind: "query",
29252
29320
  auth: "protected"
29321
+ }), method(object({
29322
+ deviceIds: array(number()).min(1).max(200),
29323
+ fromMs: number(),
29324
+ toMs: number(),
29325
+ tzOffsetMinutes: number()
29326
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
29327
+ kind: "query",
29328
+ auth: "protected"
29253
29329
  }), method(object({
29254
29330
  deviceId: number(),
29255
29331
  fromMs: number(),
@@ -36146,6 +36222,12 @@ Object.freeze({
36146
36222
  addonId: null,
36147
36223
  access: "view"
36148
36224
  },
36225
+ "pipelineAnalytics.getEventDensityBatch": {
36226
+ capName: "pipeline-analytics",
36227
+ capScope: "device",
36228
+ addonId: null,
36229
+ access: "view"
36230
+ },
36149
36231
  "pipelineAnalytics.getEventMedia": {
36150
36232
  capName: "pipeline-analytics",
36151
36233
  capScope: "device",
@@ -37268,12 +37350,24 @@ Object.freeze({
37268
37350
  addonId: null,
37269
37351
  access: "view"
37270
37352
  },
37353
+ "recording.getAvailabilityBatch": {
37354
+ capName: "recording",
37355
+ capScope: "system",
37356
+ addonId: null,
37357
+ access: "view"
37358
+ },
37271
37359
  "recording.getDaysWithRecordings": {
37272
37360
  capName: "recording",
37273
37361
  capScope: "system",
37274
37362
  addonId: null,
37275
37363
  access: "view"
37276
37364
  },
37365
+ "recording.getDaysWithRecordingsBatch": {
37366
+ capName: "recording",
37367
+ capScope: "system",
37368
+ addonId: null,
37369
+ access: "view"
37370
+ },
37277
37371
  "recording.getDeviceConfig": {
37278
37372
  capName: "recording",
37279
37373
  capScope: "system",
@@ -39878,6 +39972,11 @@ Object.freeze({
39878
39972
  form: "single",
39879
39973
  optional: false
39880
39974
  }],
39975
+ "pipelineAnalytics.getEventDensityBatch": [{
39976
+ name: "deviceIds",
39977
+ form: "array",
39978
+ optional: false
39979
+ }],
39881
39980
  "pipelineAnalytics.getEventMedia": [{
39882
39981
  name: "deviceId",
39883
39982
  form: "single",
@@ -40293,11 +40392,21 @@ Object.freeze({
40293
40392
  form: "single",
40294
40393
  optional: false
40295
40394
  }],
40395
+ "recording.getAvailabilityBatch": [{
40396
+ name: "deviceIds",
40397
+ form: "array",
40398
+ optional: false
40399
+ }],
40296
40400
  "recording.getDaysWithRecordings": [{
40297
40401
  name: "deviceId",
40298
40402
  form: "single",
40299
40403
  optional: false
40300
40404
  }],
40405
+ "recording.getDaysWithRecordingsBatch": [{
40406
+ name: "deviceIds",
40407
+ form: "array",
40408
+ optional: false
40409
+ }],
40301
40410
  "recording.getDeviceConfig": [{
40302
40411
  name: "deviceId",
40303
40412
  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-Cm6-aUVi.js");
6
+ const require_dist = require("../dist-hXonkb3t.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 { 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-Cu_caOlV.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-Ddc6B6iE.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.64",
3
+ "version": "1.2.65",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",