@camstack/addon-provider-homeassistant 1.2.129 → 1.2.130

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-B_k0RK2L.js");
2
+ const require_dist = require("./dist-ynceaZDr.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-DiwcPIg7.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-D_LRpYil.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
@@ -13872,6 +13872,70 @@ var LocationIconAssignmentSchema = object({
13872
13872
  locationKey: string(),
13873
13873
  icon: LocationIconIdSchema
13874
13874
  });
13875
+ /**
13876
+ * One (location, description) assignment as it travels.
13877
+ *
13878
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13879
+ * reason: this lived for a while in the post-analysis addon's own settings,
13880
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13881
+ * the Locations page carried the icon and silently orphaned the description —
13882
+ * two authorities for one thing, joined by two different rules. Now both hang
13883
+ * off the location itself, on `locationIconKey`.
13884
+ */
13885
+ var LocationDescriptionAssignmentSchema = object({
13886
+ locationKey: string(),
13887
+ description: string()
13888
+ });
13889
+ /**
13890
+ * A SITE ZONE — a named part of the property that several locations belong to.
13891
+ *
13892
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13893
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13894
+ * one zone, so a camera's zone is derived and never stored on the device: the
13895
+ * whole point of this entity is that grouping rooms touches no device row.
13896
+ *
13897
+ * ## Why not `zone`
13898
+ *
13899
+ * Because `zone` is already the most loaded word in this product: 612 source
13900
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13901
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13902
+ * set of rooms — and a reader who confuses them will look for a camera's
13903
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13904
+ * word by calling the drawn one what it actually is: a detection zone.
13905
+ *
13906
+ * ## The key
13907
+ *
13908
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13909
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13910
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13911
+ * silently-dropped location description.
13912
+ *
13913
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13914
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13915
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13916
+ */
13917
+ /**
13918
+ * One zone as it travels: its key, the label the operator typed, its icon and
13919
+ * the locations inside it.
13920
+ *
13921
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13922
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13923
+ * here, rather than left to a second call, because every consumer wants both
13924
+ * at once and a viewer that asked twice could render a zone whose membership
13925
+ * it has not fetched yet.
13926
+ *
13927
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13928
+ * of those two is a choice, and a picker has to draw them differently.
13929
+ */
13930
+ var SiteZoneSchema = object({
13931
+ zoneKey: string(),
13932
+ label: string(),
13933
+ icon: LocationIconIdSchema.nullable(),
13934
+ /** Folded location keys, sorted. A location listed here need not be
13935
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13936
+ * the ones that most want grouping. */
13937
+ locationKeys: array(string())
13938
+ });
13875
13939
  var ProviderStatusSchema = object({
13876
13940
  connected: boolean(),
13877
13941
  deviceCount: number(),
@@ -14470,6 +14534,33 @@ method(object({
14470
14534
  }), _void(), {
14471
14535
  kind: "mutation",
14472
14536
  auth: "admin"
14537
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14538
+ location: string(),
14539
+ description: string().max(400).nullable()
14540
+ }), _void(), {
14541
+ kind: "mutation",
14542
+ auth: "admin"
14543
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14544
+ name: string(),
14545
+ icon: LocationIconIdSchema.nullable().optional()
14546
+ }), _void(), {
14547
+ kind: "mutation",
14548
+ auth: "admin"
14549
+ }), method(object({ name: string() }), _void(), {
14550
+ kind: "mutation",
14551
+ auth: "admin"
14552
+ }), method(object({
14553
+ from: string(),
14554
+ to: string()
14555
+ }), _void(), {
14556
+ kind: "mutation",
14557
+ auth: "admin"
14558
+ }), method(object({
14559
+ location: string(),
14560
+ zone: string().nullable()
14561
+ }), _void(), {
14562
+ kind: "mutation",
14563
+ auth: "admin"
14473
14564
  }), method(object({
14474
14565
  deviceId: number(),
14475
14566
  disabled: boolean()
@@ -37499,6 +37590,12 @@ Object.freeze({
37499
37590
  addonId: null,
37500
37591
  access: "view"
37501
37592
  },
37593
+ "deviceManager.listLocationDescriptions": {
37594
+ capName: "device-manager",
37595
+ capScope: "system",
37596
+ addonId: null,
37597
+ access: "view"
37598
+ },
37502
37599
  "deviceManager.listLocationIcons": {
37503
37600
  capName: "device-manager",
37504
37601
  capScope: "system",
@@ -37517,6 +37614,12 @@ Object.freeze({
37517
37614
  addonId: null,
37518
37615
  access: "view"
37519
37616
  },
37617
+ "deviceManager.listSiteZones": {
37618
+ capName: "device-manager",
37619
+ capScope: "system",
37620
+ addonId: null,
37621
+ access: "view"
37622
+ },
37520
37623
  "deviceManager.listWrappersForCap": {
37521
37624
  capName: "device-manager",
37522
37625
  capScope: "system",
@@ -37601,12 +37704,24 @@ Object.freeze({
37601
37704
  addonId: null,
37602
37705
  access: "delete"
37603
37706
  },
37707
+ "deviceManager.removeSiteZone": {
37708
+ capName: "device-manager",
37709
+ capScope: "system",
37710
+ addonId: null,
37711
+ access: "delete"
37712
+ },
37604
37713
  "deviceManager.renameLocation": {
37605
37714
  capName: "device-manager",
37606
37715
  capScope: "system",
37607
37716
  addonId: null,
37608
37717
  access: "create"
37609
37718
  },
37719
+ "deviceManager.renameSiteZone": {
37720
+ capName: "device-manager",
37721
+ capScope: "system",
37722
+ addonId: null,
37723
+ access: "create"
37724
+ },
37610
37725
  "deviceManager.runDeviceAction": {
37611
37726
  capName: "device-manager",
37612
37727
  capScope: "system",
@@ -37649,12 +37764,24 @@ Object.freeze({
37649
37764
  addonId: null,
37650
37765
  access: "create"
37651
37766
  },
37767
+ "deviceManager.setLocationDescription": {
37768
+ capName: "device-manager",
37769
+ capScope: "system",
37770
+ addonId: null,
37771
+ access: "create"
37772
+ },
37652
37773
  "deviceManager.setLocationIcon": {
37653
37774
  capName: "device-manager",
37654
37775
  capScope: "system",
37655
37776
  addonId: null,
37656
37777
  access: "create"
37657
37778
  },
37779
+ "deviceManager.setLocationZone": {
37780
+ capName: "device-manager",
37781
+ capScope: "system",
37782
+ addonId: null,
37783
+ access: "create"
37784
+ },
37658
37785
  "deviceManager.setMetadata": {
37659
37786
  capName: "device-manager",
37660
37787
  capScope: "system",
@@ -37685,6 +37812,12 @@ Object.freeze({
37685
37812
  addonId: null,
37686
37813
  access: "create"
37687
37814
  },
37815
+ "deviceManager.setSiteZone": {
37816
+ capName: "device-manager",
37817
+ capScope: "system",
37818
+ addonId: null,
37819
+ access: "create"
37820
+ },
37688
37821
  "deviceManager.setStreamProfileMap": {
37689
37822
  capName: "device-manager",
37690
37823
  capScope: "system",
@@ -13872,6 +13872,70 @@ var LocationIconAssignmentSchema = object({
13872
13872
  locationKey: string(),
13873
13873
  icon: LocationIconIdSchema
13874
13874
  });
13875
+ /**
13876
+ * One (location, description) assignment as it travels.
13877
+ *
13878
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13879
+ * reason: this lived for a while in the post-analysis addon's own settings,
13880
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13881
+ * the Locations page carried the icon and silently orphaned the description —
13882
+ * two authorities for one thing, joined by two different rules. Now both hang
13883
+ * off the location itself, on `locationIconKey`.
13884
+ */
13885
+ var LocationDescriptionAssignmentSchema = object({
13886
+ locationKey: string(),
13887
+ description: string()
13888
+ });
13889
+ /**
13890
+ * A SITE ZONE — a named part of the property that several locations belong to.
13891
+ *
13892
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13893
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13894
+ * one zone, so a camera's zone is derived and never stored on the device: the
13895
+ * whole point of this entity is that grouping rooms touches no device row.
13896
+ *
13897
+ * ## Why not `zone`
13898
+ *
13899
+ * Because `zone` is already the most loaded word in this product: 612 source
13900
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13901
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13902
+ * set of rooms — and a reader who confuses them will look for a camera's
13903
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13904
+ * word by calling the drawn one what it actually is: a detection zone.
13905
+ *
13906
+ * ## The key
13907
+ *
13908
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13909
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13910
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13911
+ * silently-dropped location description.
13912
+ *
13913
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13914
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13915
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13916
+ */
13917
+ /**
13918
+ * One zone as it travels: its key, the label the operator typed, its icon and
13919
+ * the locations inside it.
13920
+ *
13921
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13922
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13923
+ * here, rather than left to a second call, because every consumer wants both
13924
+ * at once and a viewer that asked twice could render a zone whose membership
13925
+ * it has not fetched yet.
13926
+ *
13927
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13928
+ * of those two is a choice, and a picker has to draw them differently.
13929
+ */
13930
+ var SiteZoneSchema = object({
13931
+ zoneKey: string(),
13932
+ label: string(),
13933
+ icon: LocationIconIdSchema.nullable(),
13934
+ /** Folded location keys, sorted. A location listed here need not be
13935
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13936
+ * the ones that most want grouping. */
13937
+ locationKeys: array(string())
13938
+ });
13875
13939
  var ProviderStatusSchema = object({
13876
13940
  connected: boolean(),
13877
13941
  deviceCount: number(),
@@ -14470,6 +14534,33 @@ method(object({
14470
14534
  }), _void(), {
14471
14535
  kind: "mutation",
14472
14536
  auth: "admin"
14537
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14538
+ location: string(),
14539
+ description: string().max(400).nullable()
14540
+ }), _void(), {
14541
+ kind: "mutation",
14542
+ auth: "admin"
14543
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14544
+ name: string(),
14545
+ icon: LocationIconIdSchema.nullable().optional()
14546
+ }), _void(), {
14547
+ kind: "mutation",
14548
+ auth: "admin"
14549
+ }), method(object({ name: string() }), _void(), {
14550
+ kind: "mutation",
14551
+ auth: "admin"
14552
+ }), method(object({
14553
+ from: string(),
14554
+ to: string()
14555
+ }), _void(), {
14556
+ kind: "mutation",
14557
+ auth: "admin"
14558
+ }), method(object({
14559
+ location: string(),
14560
+ zone: string().nullable()
14561
+ }), _void(), {
14562
+ kind: "mutation",
14563
+ auth: "admin"
14473
14564
  }), method(object({
14474
14565
  deviceId: number(),
14475
14566
  disabled: boolean()
@@ -37499,6 +37590,12 @@ Object.freeze({
37499
37590
  addonId: null,
37500
37591
  access: "view"
37501
37592
  },
37593
+ "deviceManager.listLocationDescriptions": {
37594
+ capName: "device-manager",
37595
+ capScope: "system",
37596
+ addonId: null,
37597
+ access: "view"
37598
+ },
37502
37599
  "deviceManager.listLocationIcons": {
37503
37600
  capName: "device-manager",
37504
37601
  capScope: "system",
@@ -37517,6 +37614,12 @@ Object.freeze({
37517
37614
  addonId: null,
37518
37615
  access: "view"
37519
37616
  },
37617
+ "deviceManager.listSiteZones": {
37618
+ capName: "device-manager",
37619
+ capScope: "system",
37620
+ addonId: null,
37621
+ access: "view"
37622
+ },
37520
37623
  "deviceManager.listWrappersForCap": {
37521
37624
  capName: "device-manager",
37522
37625
  capScope: "system",
@@ -37601,12 +37704,24 @@ Object.freeze({
37601
37704
  addonId: null,
37602
37705
  access: "delete"
37603
37706
  },
37707
+ "deviceManager.removeSiteZone": {
37708
+ capName: "device-manager",
37709
+ capScope: "system",
37710
+ addonId: null,
37711
+ access: "delete"
37712
+ },
37604
37713
  "deviceManager.renameLocation": {
37605
37714
  capName: "device-manager",
37606
37715
  capScope: "system",
37607
37716
  addonId: null,
37608
37717
  access: "create"
37609
37718
  },
37719
+ "deviceManager.renameSiteZone": {
37720
+ capName: "device-manager",
37721
+ capScope: "system",
37722
+ addonId: null,
37723
+ access: "create"
37724
+ },
37610
37725
  "deviceManager.runDeviceAction": {
37611
37726
  capName: "device-manager",
37612
37727
  capScope: "system",
@@ -37649,12 +37764,24 @@ Object.freeze({
37649
37764
  addonId: null,
37650
37765
  access: "create"
37651
37766
  },
37767
+ "deviceManager.setLocationDescription": {
37768
+ capName: "device-manager",
37769
+ capScope: "system",
37770
+ addonId: null,
37771
+ access: "create"
37772
+ },
37652
37773
  "deviceManager.setLocationIcon": {
37653
37774
  capName: "device-manager",
37654
37775
  capScope: "system",
37655
37776
  addonId: null,
37656
37777
  access: "create"
37657
37778
  },
37779
+ "deviceManager.setLocationZone": {
37780
+ capName: "device-manager",
37781
+ capScope: "system",
37782
+ addonId: null,
37783
+ access: "create"
37784
+ },
37658
37785
  "deviceManager.setMetadata": {
37659
37786
  capName: "device-manager",
37660
37787
  capScope: "system",
@@ -37685,6 +37812,12 @@ Object.freeze({
37685
37812
  addonId: null,
37686
37813
  access: "create"
37687
37814
  },
37815
+ "deviceManager.setSiteZone": {
37816
+ capName: "device-manager",
37817
+ capScope: "system",
37818
+ addonId: null,
37819
+ access: "create"
37820
+ },
37688
37821
  "deviceManager.setStreamProfileMap": {
37689
37822
  capName: "device-manager",
37690
37823
  capScope: "system",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-B_k0RK2L.js");
6
+ const require_dist = require("../dist-ynceaZDr.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-DiwcPIg7.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-D_LRpYil.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.129",
3
+ "version": "1.2.130",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",