@camstack/addon-provider-homeassistant 1.2.129 → 1.2.131
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-DiwcPIg7.mjs → dist-BEWasBMp.mjs} +187 -2
- package/dist/{dist-B_k0RK2L.js → dist-BsxXcblv.js} +187 -2
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BsxXcblv.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-
|
|
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-BEWasBMp.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
|
|
@@ -12561,7 +12561,23 @@ var PickStreamRequirementsSchema = object({
|
|
|
12561
12561
|
* This is what lets one picker serve both the bypass and the full source
|
|
12562
12562
|
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12563
12563
|
*/
|
|
12564
|
-
allowTranscode: boolean().optional()
|
|
12564
|
+
allowTranscode: boolean().optional(),
|
|
12565
|
+
/**
|
|
12566
|
+
* Consider ONLY streams the broker has bound to a profile slot.
|
|
12567
|
+
*
|
|
12568
|
+
* A consumer that dials the broker — which is every exporter, since none
|
|
12569
|
+
* of them may open the camera's own URL — can do nothing with a source
|
|
12570
|
+
* that has no slot: there is no restream to dial. Without this the picker
|
|
12571
|
+
* can name such a stream, and each consumer discovers the dead end for
|
|
12572
|
+
* itself: Alexa's `profileForCamStream` returns `null` and it quietly
|
|
12573
|
+
* falls back, and HomeKit would have had to grow the same function again.
|
|
12574
|
+
*
|
|
12575
|
+
* Default `false`, and deliberately so: the BROKER itself picks through
|
|
12576
|
+
* here when it decides which source to BIND to a slot
|
|
12577
|
+
* (`computeInitialAssignment`), and it must see the unbound ones or it
|
|
12578
|
+
* could never bind them.
|
|
12579
|
+
*/
|
|
12580
|
+
requireProfileBound: boolean().optional()
|
|
12565
12581
|
}).readonly();
|
|
12566
12582
|
var PickStreamPreferencesSchema = object({
|
|
12567
12583
|
/**
|
|
@@ -12602,7 +12618,43 @@ var PickedCamStreamSchema = object({
|
|
|
12602
12618
|
*/
|
|
12603
12619
|
transcodes: boolean(),
|
|
12604
12620
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12605
|
-
reason: string()
|
|
12621
|
+
reason: string(),
|
|
12622
|
+
/**
|
|
12623
|
+
* The broker profile slot this source is bound to, when it is bound.
|
|
12624
|
+
*
|
|
12625
|
+
* Answered HERE because every consumer needs it and none of them can get it
|
|
12626
|
+
* from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
|
|
12627
|
+
* a second cap read plus a `null` branch — and HomeKit was about to write
|
|
12628
|
+
* the same function a second time.
|
|
12629
|
+
*
|
|
12630
|
+
* Absent when the source has no slot, which a caller passing
|
|
12631
|
+
* `requireProfileBound` can never see.
|
|
12632
|
+
*/
|
|
12633
|
+
profile: CamProfileSchema.optional(),
|
|
12634
|
+
/** The broker id of that slot, for logs that must name what was dialled. */
|
|
12635
|
+
brokerId: string().optional(),
|
|
12636
|
+
/**
|
|
12637
|
+
* The broker restream URL to dial for this stream.
|
|
12638
|
+
*
|
|
12639
|
+
* An exporter must never open the camera's own URL — the broker is the one
|
|
12640
|
+
* that dials the camera, and every consumer goes through its restream. So
|
|
12641
|
+
* the picker answers with the thing a consumer may actually use, instead of
|
|
12642
|
+
* naming a source and leaving each caller to look the URL up.
|
|
12643
|
+
*/
|
|
12644
|
+
url: string().optional(),
|
|
12645
|
+
/**
|
|
12646
|
+
* Frames per second this stream really delivers, and where the number came
|
|
12647
|
+
* from.
|
|
12648
|
+
*
|
|
12649
|
+
* It is here because getting it wrong is expensive and silent: a HomeKit
|
|
12650
|
+
* accessory advertised 720p at 24 fps while the slot serving it ran at 9,
|
|
12651
|
+
* and the controller rendered nothing at all. The source is carried with the
|
|
12652
|
+
* value for the same reason the bitrate evidence is: `published` is what the
|
|
12653
|
+
* publisher declares and `measured` is what the broker observed, and they
|
|
12654
|
+
* are not interchangeable.
|
|
12655
|
+
*/
|
|
12656
|
+
fps: number().positive().optional(),
|
|
12657
|
+
fpsSource: _enum(["published", "measured"]).optional()
|
|
12606
12658
|
});
|
|
12607
12659
|
/**
|
|
12608
12660
|
* Camera streams — device-scoped facade over the system `stream-broker`.
|
|
@@ -13872,6 +13924,70 @@ var LocationIconAssignmentSchema = object({
|
|
|
13872
13924
|
locationKey: string(),
|
|
13873
13925
|
icon: LocationIconIdSchema
|
|
13874
13926
|
});
|
|
13927
|
+
/**
|
|
13928
|
+
* One (location, description) assignment as it travels.
|
|
13929
|
+
*
|
|
13930
|
+
* Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
|
|
13931
|
+
* reason: this lived for a while in the post-analysis addon's own settings,
|
|
13932
|
+
* keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
|
|
13933
|
+
* the Locations page carried the icon and silently orphaned the description —
|
|
13934
|
+
* two authorities for one thing, joined by two different rules. Now both hang
|
|
13935
|
+
* off the location itself, on `locationIconKey`.
|
|
13936
|
+
*/
|
|
13937
|
+
var LocationDescriptionAssignmentSchema = object({
|
|
13938
|
+
locationKey: string(),
|
|
13939
|
+
description: string()
|
|
13940
|
+
});
|
|
13941
|
+
/**
|
|
13942
|
+
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
13943
|
+
*
|
|
13944
|
+
* "Zona notte" holds every bedroom; "Zona giorno" the living room and the
|
|
13945
|
+
* kitchen. A camera belongs to exactly one location, and a location to at most
|
|
13946
|
+
* one zone, so a camera's zone is derived and never stored on the device: the
|
|
13947
|
+
* whole point of this entity is that grouping rooms touches no device row.
|
|
13948
|
+
*
|
|
13949
|
+
* ## Why not `zone`
|
|
13950
|
+
*
|
|
13951
|
+
* Because `zone` is already the most loaded word in this product: 612 source
|
|
13952
|
+
* files and 24 Italian strings where it means a DETECTION zone drawn on a
|
|
13953
|
+
* camera. The two are unrelated — one is a polygon in a frame, the other is a
|
|
13954
|
+
* set of rooms — and a reader who confuses them will look for a camera's
|
|
13955
|
+
* bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
|
|
13956
|
+
* word by calling the drawn one what it actually is: a detection zone.
|
|
13957
|
+
*
|
|
13958
|
+
* ## The key
|
|
13959
|
+
*
|
|
13960
|
+
* `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
|
|
13961
|
+
* use (`locationIconKey`). Membership and the icon both hang off it, so a
|
|
13962
|
+
* case-only rename keeps them, which is exactly the orphaning that cost us a
|
|
13963
|
+
* silently-dropped location description.
|
|
13964
|
+
*
|
|
13965
|
+
* The icon vocabulary is the location one, unchanged: a zone is drawn on the
|
|
13966
|
+
* same two surfaces by the same glyph map, so a second vocabulary would be a
|
|
13967
|
+
* second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
|
|
13968
|
+
*/
|
|
13969
|
+
/**
|
|
13970
|
+
* One zone as it travels: its key, the label the operator typed, its icon and
|
|
13971
|
+
* the locations inside it.
|
|
13972
|
+
*
|
|
13973
|
+
* The LABEL is carried alongside the key because the key is lossy on purpose —
|
|
13974
|
+
* a surface must show "Zona notte", not "zona notte". Locations are carried
|
|
13975
|
+
* here, rather than left to a second call, because every consumer wants both
|
|
13976
|
+
* at once and a viewer that asked twice could render a zone whose membership
|
|
13977
|
+
* it has not fetched yet.
|
|
13978
|
+
*
|
|
13979
|
+
* `icon: null` means nobody chose one, which is NOT the fallback pin: only one
|
|
13980
|
+
* of those two is a choice, and a picker has to draw them differently.
|
|
13981
|
+
*/
|
|
13982
|
+
var SiteZoneSchema = object({
|
|
13983
|
+
zoneKey: string(),
|
|
13984
|
+
label: string(),
|
|
13985
|
+
icon: LocationIconIdSchema.nullable(),
|
|
13986
|
+
/** Folded location keys, sorted. A location listed here need not be
|
|
13987
|
+
* REGISTERED — devices carry labels nobody registered, and those rooms are
|
|
13988
|
+
* the ones that most want grouping. */
|
|
13989
|
+
locationKeys: array(string())
|
|
13990
|
+
});
|
|
13875
13991
|
var ProviderStatusSchema = object({
|
|
13876
13992
|
connected: boolean(),
|
|
13877
13993
|
deviceCount: number(),
|
|
@@ -14470,6 +14586,33 @@ method(object({
|
|
|
14470
14586
|
}), _void(), {
|
|
14471
14587
|
kind: "mutation",
|
|
14472
14588
|
auth: "admin"
|
|
14589
|
+
}), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
|
|
14590
|
+
location: string(),
|
|
14591
|
+
description: string().max(400).nullable()
|
|
14592
|
+
}), _void(), {
|
|
14593
|
+
kind: "mutation",
|
|
14594
|
+
auth: "admin"
|
|
14595
|
+
}), method(_void(), array(SiteZoneSchema)), method(object({
|
|
14596
|
+
name: string(),
|
|
14597
|
+
icon: LocationIconIdSchema.nullable().optional()
|
|
14598
|
+
}), _void(), {
|
|
14599
|
+
kind: "mutation",
|
|
14600
|
+
auth: "admin"
|
|
14601
|
+
}), method(object({ name: string() }), _void(), {
|
|
14602
|
+
kind: "mutation",
|
|
14603
|
+
auth: "admin"
|
|
14604
|
+
}), method(object({
|
|
14605
|
+
from: string(),
|
|
14606
|
+
to: string()
|
|
14607
|
+
}), _void(), {
|
|
14608
|
+
kind: "mutation",
|
|
14609
|
+
auth: "admin"
|
|
14610
|
+
}), method(object({
|
|
14611
|
+
location: string(),
|
|
14612
|
+
zone: string().nullable()
|
|
14613
|
+
}), _void(), {
|
|
14614
|
+
kind: "mutation",
|
|
14615
|
+
auth: "admin"
|
|
14473
14616
|
}), method(object({
|
|
14474
14617
|
deviceId: number(),
|
|
14475
14618
|
disabled: boolean()
|
|
@@ -37499,6 +37642,12 @@ Object.freeze({
|
|
|
37499
37642
|
addonId: null,
|
|
37500
37643
|
access: "view"
|
|
37501
37644
|
},
|
|
37645
|
+
"deviceManager.listLocationDescriptions": {
|
|
37646
|
+
capName: "device-manager",
|
|
37647
|
+
capScope: "system",
|
|
37648
|
+
addonId: null,
|
|
37649
|
+
access: "view"
|
|
37650
|
+
},
|
|
37502
37651
|
"deviceManager.listLocationIcons": {
|
|
37503
37652
|
capName: "device-manager",
|
|
37504
37653
|
capScope: "system",
|
|
@@ -37517,6 +37666,12 @@ Object.freeze({
|
|
|
37517
37666
|
addonId: null,
|
|
37518
37667
|
access: "view"
|
|
37519
37668
|
},
|
|
37669
|
+
"deviceManager.listSiteZones": {
|
|
37670
|
+
capName: "device-manager",
|
|
37671
|
+
capScope: "system",
|
|
37672
|
+
addonId: null,
|
|
37673
|
+
access: "view"
|
|
37674
|
+
},
|
|
37520
37675
|
"deviceManager.listWrappersForCap": {
|
|
37521
37676
|
capName: "device-manager",
|
|
37522
37677
|
capScope: "system",
|
|
@@ -37601,12 +37756,24 @@ Object.freeze({
|
|
|
37601
37756
|
addonId: null,
|
|
37602
37757
|
access: "delete"
|
|
37603
37758
|
},
|
|
37759
|
+
"deviceManager.removeSiteZone": {
|
|
37760
|
+
capName: "device-manager",
|
|
37761
|
+
capScope: "system",
|
|
37762
|
+
addonId: null,
|
|
37763
|
+
access: "delete"
|
|
37764
|
+
},
|
|
37604
37765
|
"deviceManager.renameLocation": {
|
|
37605
37766
|
capName: "device-manager",
|
|
37606
37767
|
capScope: "system",
|
|
37607
37768
|
addonId: null,
|
|
37608
37769
|
access: "create"
|
|
37609
37770
|
},
|
|
37771
|
+
"deviceManager.renameSiteZone": {
|
|
37772
|
+
capName: "device-manager",
|
|
37773
|
+
capScope: "system",
|
|
37774
|
+
addonId: null,
|
|
37775
|
+
access: "create"
|
|
37776
|
+
},
|
|
37610
37777
|
"deviceManager.runDeviceAction": {
|
|
37611
37778
|
capName: "device-manager",
|
|
37612
37779
|
capScope: "system",
|
|
@@ -37649,12 +37816,24 @@ Object.freeze({
|
|
|
37649
37816
|
addonId: null,
|
|
37650
37817
|
access: "create"
|
|
37651
37818
|
},
|
|
37819
|
+
"deviceManager.setLocationDescription": {
|
|
37820
|
+
capName: "device-manager",
|
|
37821
|
+
capScope: "system",
|
|
37822
|
+
addonId: null,
|
|
37823
|
+
access: "create"
|
|
37824
|
+
},
|
|
37652
37825
|
"deviceManager.setLocationIcon": {
|
|
37653
37826
|
capName: "device-manager",
|
|
37654
37827
|
capScope: "system",
|
|
37655
37828
|
addonId: null,
|
|
37656
37829
|
access: "create"
|
|
37657
37830
|
},
|
|
37831
|
+
"deviceManager.setLocationZone": {
|
|
37832
|
+
capName: "device-manager",
|
|
37833
|
+
capScope: "system",
|
|
37834
|
+
addonId: null,
|
|
37835
|
+
access: "create"
|
|
37836
|
+
},
|
|
37658
37837
|
"deviceManager.setMetadata": {
|
|
37659
37838
|
capName: "device-manager",
|
|
37660
37839
|
capScope: "system",
|
|
@@ -37685,6 +37864,12 @@ Object.freeze({
|
|
|
37685
37864
|
addonId: null,
|
|
37686
37865
|
access: "create"
|
|
37687
37866
|
},
|
|
37867
|
+
"deviceManager.setSiteZone": {
|
|
37868
|
+
capName: "device-manager",
|
|
37869
|
+
capScope: "system",
|
|
37870
|
+
addonId: null,
|
|
37871
|
+
access: "create"
|
|
37872
|
+
},
|
|
37688
37873
|
"deviceManager.setStreamProfileMap": {
|
|
37689
37874
|
capName: "device-manager",
|
|
37690
37875
|
capScope: "system",
|
|
@@ -12561,7 +12561,23 @@ var PickStreamRequirementsSchema = object({
|
|
|
12561
12561
|
* This is what lets one picker serve both the bypass and the full source
|
|
12562
12562
|
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12563
12563
|
*/
|
|
12564
|
-
allowTranscode: boolean().optional()
|
|
12564
|
+
allowTranscode: boolean().optional(),
|
|
12565
|
+
/**
|
|
12566
|
+
* Consider ONLY streams the broker has bound to a profile slot.
|
|
12567
|
+
*
|
|
12568
|
+
* A consumer that dials the broker — which is every exporter, since none
|
|
12569
|
+
* of them may open the camera's own URL — can do nothing with a source
|
|
12570
|
+
* that has no slot: there is no restream to dial. Without this the picker
|
|
12571
|
+
* can name such a stream, and each consumer discovers the dead end for
|
|
12572
|
+
* itself: Alexa's `profileForCamStream` returns `null` and it quietly
|
|
12573
|
+
* falls back, and HomeKit would have had to grow the same function again.
|
|
12574
|
+
*
|
|
12575
|
+
* Default `false`, and deliberately so: the BROKER itself picks through
|
|
12576
|
+
* here when it decides which source to BIND to a slot
|
|
12577
|
+
* (`computeInitialAssignment`), and it must see the unbound ones or it
|
|
12578
|
+
* could never bind them.
|
|
12579
|
+
*/
|
|
12580
|
+
requireProfileBound: boolean().optional()
|
|
12565
12581
|
}).readonly();
|
|
12566
12582
|
var PickStreamPreferencesSchema = object({
|
|
12567
12583
|
/**
|
|
@@ -12602,7 +12618,43 @@ var PickedCamStreamSchema = object({
|
|
|
12602
12618
|
*/
|
|
12603
12619
|
transcodes: boolean(),
|
|
12604
12620
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12605
|
-
reason: string()
|
|
12621
|
+
reason: string(),
|
|
12622
|
+
/**
|
|
12623
|
+
* The broker profile slot this source is bound to, when it is bound.
|
|
12624
|
+
*
|
|
12625
|
+
* Answered HERE because every consumer needs it and none of them can get it
|
|
12626
|
+
* from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
|
|
12627
|
+
* a second cap read plus a `null` branch — and HomeKit was about to write
|
|
12628
|
+
* the same function a second time.
|
|
12629
|
+
*
|
|
12630
|
+
* Absent when the source has no slot, which a caller passing
|
|
12631
|
+
* `requireProfileBound` can never see.
|
|
12632
|
+
*/
|
|
12633
|
+
profile: CamProfileSchema.optional(),
|
|
12634
|
+
/** The broker id of that slot, for logs that must name what was dialled. */
|
|
12635
|
+
brokerId: string().optional(),
|
|
12636
|
+
/**
|
|
12637
|
+
* The broker restream URL to dial for this stream.
|
|
12638
|
+
*
|
|
12639
|
+
* An exporter must never open the camera's own URL — the broker is the one
|
|
12640
|
+
* that dials the camera, and every consumer goes through its restream. So
|
|
12641
|
+
* the picker answers with the thing a consumer may actually use, instead of
|
|
12642
|
+
* naming a source and leaving each caller to look the URL up.
|
|
12643
|
+
*/
|
|
12644
|
+
url: string().optional(),
|
|
12645
|
+
/**
|
|
12646
|
+
* Frames per second this stream really delivers, and where the number came
|
|
12647
|
+
* from.
|
|
12648
|
+
*
|
|
12649
|
+
* It is here because getting it wrong is expensive and silent: a HomeKit
|
|
12650
|
+
* accessory advertised 720p at 24 fps while the slot serving it ran at 9,
|
|
12651
|
+
* and the controller rendered nothing at all. The source is carried with the
|
|
12652
|
+
* value for the same reason the bitrate evidence is: `published` is what the
|
|
12653
|
+
* publisher declares and `measured` is what the broker observed, and they
|
|
12654
|
+
* are not interchangeable.
|
|
12655
|
+
*/
|
|
12656
|
+
fps: number().positive().optional(),
|
|
12657
|
+
fpsSource: _enum(["published", "measured"]).optional()
|
|
12606
12658
|
});
|
|
12607
12659
|
/**
|
|
12608
12660
|
* Camera streams — device-scoped facade over the system `stream-broker`.
|
|
@@ -13872,6 +13924,70 @@ var LocationIconAssignmentSchema = object({
|
|
|
13872
13924
|
locationKey: string(),
|
|
13873
13925
|
icon: LocationIconIdSchema
|
|
13874
13926
|
});
|
|
13927
|
+
/**
|
|
13928
|
+
* One (location, description) assignment as it travels.
|
|
13929
|
+
*
|
|
13930
|
+
* Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
|
|
13931
|
+
* reason: this lived for a while in the post-analysis addon's own settings,
|
|
13932
|
+
* keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
|
|
13933
|
+
* the Locations page carried the icon and silently orphaned the description —
|
|
13934
|
+
* two authorities for one thing, joined by two different rules. Now both hang
|
|
13935
|
+
* off the location itself, on `locationIconKey`.
|
|
13936
|
+
*/
|
|
13937
|
+
var LocationDescriptionAssignmentSchema = object({
|
|
13938
|
+
locationKey: string(),
|
|
13939
|
+
description: string()
|
|
13940
|
+
});
|
|
13941
|
+
/**
|
|
13942
|
+
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
13943
|
+
*
|
|
13944
|
+
* "Zona notte" holds every bedroom; "Zona giorno" the living room and the
|
|
13945
|
+
* kitchen. A camera belongs to exactly one location, and a location to at most
|
|
13946
|
+
* one zone, so a camera's zone is derived and never stored on the device: the
|
|
13947
|
+
* whole point of this entity is that grouping rooms touches no device row.
|
|
13948
|
+
*
|
|
13949
|
+
* ## Why not `zone`
|
|
13950
|
+
*
|
|
13951
|
+
* Because `zone` is already the most loaded word in this product: 612 source
|
|
13952
|
+
* files and 24 Italian strings where it means a DETECTION zone drawn on a
|
|
13953
|
+
* camera. The two are unrelated — one is a polygon in a frame, the other is a
|
|
13954
|
+
* set of rooms — and a reader who confuses them will look for a camera's
|
|
13955
|
+
* bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
|
|
13956
|
+
* word by calling the drawn one what it actually is: a detection zone.
|
|
13957
|
+
*
|
|
13958
|
+
* ## The key
|
|
13959
|
+
*
|
|
13960
|
+
* `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
|
|
13961
|
+
* use (`locationIconKey`). Membership and the icon both hang off it, so a
|
|
13962
|
+
* case-only rename keeps them, which is exactly the orphaning that cost us a
|
|
13963
|
+
* silently-dropped location description.
|
|
13964
|
+
*
|
|
13965
|
+
* The icon vocabulary is the location one, unchanged: a zone is drawn on the
|
|
13966
|
+
* same two surfaces by the same glyph map, so a second vocabulary would be a
|
|
13967
|
+
* second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
|
|
13968
|
+
*/
|
|
13969
|
+
/**
|
|
13970
|
+
* One zone as it travels: its key, the label the operator typed, its icon and
|
|
13971
|
+
* the locations inside it.
|
|
13972
|
+
*
|
|
13973
|
+
* The LABEL is carried alongside the key because the key is lossy on purpose —
|
|
13974
|
+
* a surface must show "Zona notte", not "zona notte". Locations are carried
|
|
13975
|
+
* here, rather than left to a second call, because every consumer wants both
|
|
13976
|
+
* at once and a viewer that asked twice could render a zone whose membership
|
|
13977
|
+
* it has not fetched yet.
|
|
13978
|
+
*
|
|
13979
|
+
* `icon: null` means nobody chose one, which is NOT the fallback pin: only one
|
|
13980
|
+
* of those two is a choice, and a picker has to draw them differently.
|
|
13981
|
+
*/
|
|
13982
|
+
var SiteZoneSchema = object({
|
|
13983
|
+
zoneKey: string(),
|
|
13984
|
+
label: string(),
|
|
13985
|
+
icon: LocationIconIdSchema.nullable(),
|
|
13986
|
+
/** Folded location keys, sorted. A location listed here need not be
|
|
13987
|
+
* REGISTERED — devices carry labels nobody registered, and those rooms are
|
|
13988
|
+
* the ones that most want grouping. */
|
|
13989
|
+
locationKeys: array(string())
|
|
13990
|
+
});
|
|
13875
13991
|
var ProviderStatusSchema = object({
|
|
13876
13992
|
connected: boolean(),
|
|
13877
13993
|
deviceCount: number(),
|
|
@@ -14470,6 +14586,33 @@ method(object({
|
|
|
14470
14586
|
}), _void(), {
|
|
14471
14587
|
kind: "mutation",
|
|
14472
14588
|
auth: "admin"
|
|
14589
|
+
}), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
|
|
14590
|
+
location: string(),
|
|
14591
|
+
description: string().max(400).nullable()
|
|
14592
|
+
}), _void(), {
|
|
14593
|
+
kind: "mutation",
|
|
14594
|
+
auth: "admin"
|
|
14595
|
+
}), method(_void(), array(SiteZoneSchema)), method(object({
|
|
14596
|
+
name: string(),
|
|
14597
|
+
icon: LocationIconIdSchema.nullable().optional()
|
|
14598
|
+
}), _void(), {
|
|
14599
|
+
kind: "mutation",
|
|
14600
|
+
auth: "admin"
|
|
14601
|
+
}), method(object({ name: string() }), _void(), {
|
|
14602
|
+
kind: "mutation",
|
|
14603
|
+
auth: "admin"
|
|
14604
|
+
}), method(object({
|
|
14605
|
+
from: string(),
|
|
14606
|
+
to: string()
|
|
14607
|
+
}), _void(), {
|
|
14608
|
+
kind: "mutation",
|
|
14609
|
+
auth: "admin"
|
|
14610
|
+
}), method(object({
|
|
14611
|
+
location: string(),
|
|
14612
|
+
zone: string().nullable()
|
|
14613
|
+
}), _void(), {
|
|
14614
|
+
kind: "mutation",
|
|
14615
|
+
auth: "admin"
|
|
14473
14616
|
}), method(object({
|
|
14474
14617
|
deviceId: number(),
|
|
14475
14618
|
disabled: boolean()
|
|
@@ -37499,6 +37642,12 @@ Object.freeze({
|
|
|
37499
37642
|
addonId: null,
|
|
37500
37643
|
access: "view"
|
|
37501
37644
|
},
|
|
37645
|
+
"deviceManager.listLocationDescriptions": {
|
|
37646
|
+
capName: "device-manager",
|
|
37647
|
+
capScope: "system",
|
|
37648
|
+
addonId: null,
|
|
37649
|
+
access: "view"
|
|
37650
|
+
},
|
|
37502
37651
|
"deviceManager.listLocationIcons": {
|
|
37503
37652
|
capName: "device-manager",
|
|
37504
37653
|
capScope: "system",
|
|
@@ -37517,6 +37666,12 @@ Object.freeze({
|
|
|
37517
37666
|
addonId: null,
|
|
37518
37667
|
access: "view"
|
|
37519
37668
|
},
|
|
37669
|
+
"deviceManager.listSiteZones": {
|
|
37670
|
+
capName: "device-manager",
|
|
37671
|
+
capScope: "system",
|
|
37672
|
+
addonId: null,
|
|
37673
|
+
access: "view"
|
|
37674
|
+
},
|
|
37520
37675
|
"deviceManager.listWrappersForCap": {
|
|
37521
37676
|
capName: "device-manager",
|
|
37522
37677
|
capScope: "system",
|
|
@@ -37601,12 +37756,24 @@ Object.freeze({
|
|
|
37601
37756
|
addonId: null,
|
|
37602
37757
|
access: "delete"
|
|
37603
37758
|
},
|
|
37759
|
+
"deviceManager.removeSiteZone": {
|
|
37760
|
+
capName: "device-manager",
|
|
37761
|
+
capScope: "system",
|
|
37762
|
+
addonId: null,
|
|
37763
|
+
access: "delete"
|
|
37764
|
+
},
|
|
37604
37765
|
"deviceManager.renameLocation": {
|
|
37605
37766
|
capName: "device-manager",
|
|
37606
37767
|
capScope: "system",
|
|
37607
37768
|
addonId: null,
|
|
37608
37769
|
access: "create"
|
|
37609
37770
|
},
|
|
37771
|
+
"deviceManager.renameSiteZone": {
|
|
37772
|
+
capName: "device-manager",
|
|
37773
|
+
capScope: "system",
|
|
37774
|
+
addonId: null,
|
|
37775
|
+
access: "create"
|
|
37776
|
+
},
|
|
37610
37777
|
"deviceManager.runDeviceAction": {
|
|
37611
37778
|
capName: "device-manager",
|
|
37612
37779
|
capScope: "system",
|
|
@@ -37649,12 +37816,24 @@ Object.freeze({
|
|
|
37649
37816
|
addonId: null,
|
|
37650
37817
|
access: "create"
|
|
37651
37818
|
},
|
|
37819
|
+
"deviceManager.setLocationDescription": {
|
|
37820
|
+
capName: "device-manager",
|
|
37821
|
+
capScope: "system",
|
|
37822
|
+
addonId: null,
|
|
37823
|
+
access: "create"
|
|
37824
|
+
},
|
|
37652
37825
|
"deviceManager.setLocationIcon": {
|
|
37653
37826
|
capName: "device-manager",
|
|
37654
37827
|
capScope: "system",
|
|
37655
37828
|
addonId: null,
|
|
37656
37829
|
access: "create"
|
|
37657
37830
|
},
|
|
37831
|
+
"deviceManager.setLocationZone": {
|
|
37832
|
+
capName: "device-manager",
|
|
37833
|
+
capScope: "system",
|
|
37834
|
+
addonId: null,
|
|
37835
|
+
access: "create"
|
|
37836
|
+
},
|
|
37658
37837
|
"deviceManager.setMetadata": {
|
|
37659
37838
|
capName: "device-manager",
|
|
37660
37839
|
capScope: "system",
|
|
@@ -37685,6 +37864,12 @@ Object.freeze({
|
|
|
37685
37864
|
addonId: null,
|
|
37686
37865
|
access: "create"
|
|
37687
37866
|
},
|
|
37867
|
+
"deviceManager.setSiteZone": {
|
|
37868
|
+
capName: "device-manager",
|
|
37869
|
+
capScope: "system",
|
|
37870
|
+
addonId: null,
|
|
37871
|
+
access: "create"
|
|
37872
|
+
},
|
|
37688
37873
|
"deviceManager.setStreamProfileMap": {
|
|
37689
37874
|
capName: "device-manager",
|
|
37690
37875
|
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-
|
|
6
|
+
const require_dist = require("../dist-BsxXcblv.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-
|
|
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-BEWasBMp.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|