@camstack/addon-provider-homematic 1.2.200 → 1.2.202
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/CHANGELOG.md +12 -0
- package/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-qmc1Dkr5.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-Co16X8r0.mjs} +5 -5
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CSC-ziPZ.mjs +26 -0
- package/dist/addon-provider-homematic.css +1 -1
- package/dist/addon.js +1025 -69
- package/dist/addon.mjs +1025 -69
- package/dist/{hostInit-DD3ofn9q.mjs → hostInit-DNi48_tT.mjs} +4 -4
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-C1yOQF9B.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-CWpmn0LZ.mjs} +1 -1
- package/dist/widgets/_stub.js +1 -1
- package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-BIJK_-Yo.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-D7OMUSRg.mjs} +3 -3
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DCfwscwZ.mjs +26 -0
- package/dist/widgets/{hostInit-B6-zj1pa.mjs → hostInit-BADUDAz-.mjs} +3 -3
- package/dist/widgets/remoteEntry.js +1 -1
- package/package.json +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DELdD34C.mjs +0 -26
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CcB6r27y.mjs +0 -26
package/dist/addon.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { networkInterfaces } from "node:os";
|
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region ../types/dist/event-category-
|
|
12
|
+
//#region ../types/dist/event-category-Dhcd0TRH.mjs
|
|
13
13
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
14
14
|
EventCategory["SystemBoot"] = "system.boot";
|
|
15
15
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -283,6 +283,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
283
283
|
EventCategory["StorageLocationCritical"] = "storage.location.critical";
|
|
284
284
|
/** Recovery from low/critical on a storage location. */
|
|
285
285
|
EventCategory["StorageLocationOk"] = "storage.location.ok";
|
|
286
|
+
/**
|
|
287
|
+
* A `drain` location's regular progress ping (#538) — location id + name,
|
|
288
|
+
* bytes remaining, the observed cede rate and the estimated empty date, or
|
|
289
|
+
* `null` fields when the occupancy read that sweep failed (D393: never
|
|
290
|
+
* folded to 0). Cadence is the named constant
|
|
291
|
+
* `DRAIN_PROGRESS_EVENT_INTERVAL_MS` (15 min) plus once on drain start — no
|
|
292
|
+
* operator knob. Telemetry (D8): a lost tick is a stale progress bar the
|
|
293
|
+
* next sweep corrects.
|
|
294
|
+
*/
|
|
295
|
+
EventCategory["StorageDrainProgress"] = "storage.drain.progress";
|
|
296
|
+
/** Fires once when a draining location reaches zero evictable bytes. */
|
|
297
|
+
EventCategory["StorageDrainComplete"] = "storage.drain.complete";
|
|
286
298
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
287
299
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
288
300
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
@@ -821,7 +833,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
821
833
|
return EventCategory;
|
|
822
834
|
}({});
|
|
823
835
|
//#endregion
|
|
824
|
-
//#region ../types/dist/composed-stable-id-
|
|
836
|
+
//#region ../types/dist/composed-stable-id-RvQIEpqg.mjs
|
|
825
837
|
/**
|
|
826
838
|
import { errMsg } from '@camstack/types'
|
|
827
839
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -903,6 +915,9 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
903
915
|
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
904
916
|
* `weather` cap. */
|
|
905
917
|
DeviceType["Weather"] = "weather";
|
|
918
|
+
/** A physical weather station (Ecowitt outdoor array). `weather-station`
|
|
919
|
+
* cap. Distinct from {@link Weather}, which is a forecast provider. */
|
|
920
|
+
DeviceType["WeatherStation"] = "weather-station";
|
|
906
921
|
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
907
922
|
DeviceType["Vacuum"] = "vacuum";
|
|
908
923
|
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
@@ -6070,7 +6085,7 @@ var ZodIssueCode = {
|
|
|
6070
6085
|
var ZodFirstPartyTypeKind;
|
|
6071
6086
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6072
6087
|
//#endregion
|
|
6073
|
-
//#region ../types/dist/sleep-
|
|
6088
|
+
//#region ../types/dist/sleep-BnR9qGOv.mjs
|
|
6074
6089
|
/**
|
|
6075
6090
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6076
6091
|
* window to float samples (D455).
|
|
@@ -13392,6 +13407,76 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
13392
13407
|
en: "Control",
|
|
13393
13408
|
it: "Controllo"
|
|
13394
13409
|
},
|
|
13410
|
+
actions: [
|
|
13411
|
+
{
|
|
13412
|
+
id: "select.next",
|
|
13413
|
+
method: "next",
|
|
13414
|
+
label: {
|
|
13415
|
+
en: "Next option",
|
|
13416
|
+
it: "Opzione successiva"
|
|
13417
|
+
},
|
|
13418
|
+
phrase: {
|
|
13419
|
+
en: "Select the next option on {device}",
|
|
13420
|
+
it: "Seleziona l’opzione successiva su {device}"
|
|
13421
|
+
},
|
|
13422
|
+
icon: "skip-forward",
|
|
13423
|
+
openArgs: [{
|
|
13424
|
+
key: "cycle",
|
|
13425
|
+
label: {
|
|
13426
|
+
en: "Wrap to the first option",
|
|
13427
|
+
it: "Ricomincia dalla prima opzione"
|
|
13428
|
+
},
|
|
13429
|
+
offer: { kind: "boolean" }
|
|
13430
|
+
}]
|
|
13431
|
+
},
|
|
13432
|
+
{
|
|
13433
|
+
id: "select.previous",
|
|
13434
|
+
method: "previous",
|
|
13435
|
+
label: {
|
|
13436
|
+
en: "Previous option",
|
|
13437
|
+
it: "Opzione precedente"
|
|
13438
|
+
},
|
|
13439
|
+
phrase: {
|
|
13440
|
+
en: "Select the previous option on {device}",
|
|
13441
|
+
it: "Seleziona l’opzione precedente su {device}"
|
|
13442
|
+
},
|
|
13443
|
+
icon: "skip-back",
|
|
13444
|
+
openArgs: [{
|
|
13445
|
+
key: "cycle",
|
|
13446
|
+
label: {
|
|
13447
|
+
en: "Wrap to the last option",
|
|
13448
|
+
it: "Ricomincia dall’ultima opzione"
|
|
13449
|
+
},
|
|
13450
|
+
offer: { kind: "boolean" }
|
|
13451
|
+
}]
|
|
13452
|
+
},
|
|
13453
|
+
{
|
|
13454
|
+
id: "select.first",
|
|
13455
|
+
method: "first",
|
|
13456
|
+
label: {
|
|
13457
|
+
en: "First option",
|
|
13458
|
+
it: "Prima opzione"
|
|
13459
|
+
},
|
|
13460
|
+
phrase: {
|
|
13461
|
+
en: "Select the first option on {device}",
|
|
13462
|
+
it: "Seleziona la prima opzione su {device}"
|
|
13463
|
+
},
|
|
13464
|
+
icon: "chevron-first"
|
|
13465
|
+
},
|
|
13466
|
+
{
|
|
13467
|
+
id: "select.last",
|
|
13468
|
+
method: "last",
|
|
13469
|
+
label: {
|
|
13470
|
+
en: "Last option",
|
|
13471
|
+
it: "Ultima opzione"
|
|
13472
|
+
},
|
|
13473
|
+
phrase: {
|
|
13474
|
+
en: "Select the last option on {device}",
|
|
13475
|
+
it: "Seleziona l’ultima opzione su {device}"
|
|
13476
|
+
},
|
|
13477
|
+
icon: "chevron-last"
|
|
13478
|
+
}
|
|
13479
|
+
],
|
|
13395
13480
|
notOperatorFacing: { setValue: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework" },
|
|
13396
13481
|
state: [{
|
|
13397
13482
|
kind: "value",
|
|
@@ -18538,6 +18623,183 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
18538
18623
|
}
|
|
18539
18624
|
]
|
|
18540
18625
|
},
|
|
18626
|
+
"weather-station": {
|
|
18627
|
+
scope: "device",
|
|
18628
|
+
noun: {
|
|
18629
|
+
en: "Weather station",
|
|
18630
|
+
it: "Stazione meteo"
|
|
18631
|
+
},
|
|
18632
|
+
state: [
|
|
18633
|
+
{
|
|
18634
|
+
kind: "numeric",
|
|
18635
|
+
field: "temperature",
|
|
18636
|
+
quantity: {
|
|
18637
|
+
en: "the outdoor temperature",
|
|
18638
|
+
it: "la temperatura esterna"
|
|
18639
|
+
},
|
|
18640
|
+
label: {
|
|
18641
|
+
en: "Temperature",
|
|
18642
|
+
it: "Temperatura"
|
|
18643
|
+
},
|
|
18644
|
+
unit: "°C",
|
|
18645
|
+
icon: "thermometer"
|
|
18646
|
+
},
|
|
18647
|
+
{
|
|
18648
|
+
kind: "numeric",
|
|
18649
|
+
field: "humidity",
|
|
18650
|
+
quantity: {
|
|
18651
|
+
en: "the outdoor humidity",
|
|
18652
|
+
it: "l’umidità esterna"
|
|
18653
|
+
},
|
|
18654
|
+
label: {
|
|
18655
|
+
en: "Humidity",
|
|
18656
|
+
it: "Umidità"
|
|
18657
|
+
},
|
|
18658
|
+
unit: "%",
|
|
18659
|
+
icon: "droplets"
|
|
18660
|
+
},
|
|
18661
|
+
{
|
|
18662
|
+
kind: "numeric",
|
|
18663
|
+
field: "pressure",
|
|
18664
|
+
quantity: {
|
|
18665
|
+
en: "the air pressure",
|
|
18666
|
+
it: "la pressione atmosferica"
|
|
18667
|
+
},
|
|
18668
|
+
label: {
|
|
18669
|
+
en: "Pressure",
|
|
18670
|
+
it: "Pressione"
|
|
18671
|
+
},
|
|
18672
|
+
unit: "hPa",
|
|
18673
|
+
icon: "gauge"
|
|
18674
|
+
},
|
|
18675
|
+
{
|
|
18676
|
+
kind: "numeric",
|
|
18677
|
+
field: "windSpeed",
|
|
18678
|
+
quantity: {
|
|
18679
|
+
en: "the wind speed",
|
|
18680
|
+
it: "la velocità del vento"
|
|
18681
|
+
},
|
|
18682
|
+
label: {
|
|
18683
|
+
en: "Wind",
|
|
18684
|
+
it: "Vento"
|
|
18685
|
+
},
|
|
18686
|
+
unit: "m/s",
|
|
18687
|
+
icon: "wind"
|
|
18688
|
+
},
|
|
18689
|
+
{
|
|
18690
|
+
kind: "numeric",
|
|
18691
|
+
field: "windGust",
|
|
18692
|
+
quantity: {
|
|
18693
|
+
en: "the wind gust",
|
|
18694
|
+
it: "la raffica di vento"
|
|
18695
|
+
},
|
|
18696
|
+
label: {
|
|
18697
|
+
en: "Gust",
|
|
18698
|
+
it: "Raffica"
|
|
18699
|
+
},
|
|
18700
|
+
unit: "m/s",
|
|
18701
|
+
icon: "wind"
|
|
18702
|
+
},
|
|
18703
|
+
{
|
|
18704
|
+
kind: "numeric",
|
|
18705
|
+
field: "windBearing",
|
|
18706
|
+
quantity: {
|
|
18707
|
+
en: "the wind bearing",
|
|
18708
|
+
it: "la direzione del vento"
|
|
18709
|
+
},
|
|
18710
|
+
label: {
|
|
18711
|
+
en: "Wind bearing",
|
|
18712
|
+
it: "Direzione del vento"
|
|
18713
|
+
},
|
|
18714
|
+
unit: "°",
|
|
18715
|
+
icon: "wind"
|
|
18716
|
+
},
|
|
18717
|
+
{
|
|
18718
|
+
kind: "numeric",
|
|
18719
|
+
field: "rainRate",
|
|
18720
|
+
quantity: {
|
|
18721
|
+
en: "the rain rate",
|
|
18722
|
+
it: "l’intensità della pioggia"
|
|
18723
|
+
},
|
|
18724
|
+
label: {
|
|
18725
|
+
en: "Rain rate",
|
|
18726
|
+
it: "Intensità pioggia"
|
|
18727
|
+
},
|
|
18728
|
+
unit: "mm/h",
|
|
18729
|
+
icon: "droplets"
|
|
18730
|
+
},
|
|
18731
|
+
{
|
|
18732
|
+
kind: "numeric",
|
|
18733
|
+
field: "rainDaily",
|
|
18734
|
+
quantity: {
|
|
18735
|
+
en: "the rain today",
|
|
18736
|
+
it: "la pioggia di oggi"
|
|
18737
|
+
},
|
|
18738
|
+
label: {
|
|
18739
|
+
en: "Rain today",
|
|
18740
|
+
it: "Pioggia oggi"
|
|
18741
|
+
},
|
|
18742
|
+
unit: "mm",
|
|
18743
|
+
icon: "droplets"
|
|
18744
|
+
},
|
|
18745
|
+
{
|
|
18746
|
+
kind: "numeric",
|
|
18747
|
+
field: "rainEvent",
|
|
18748
|
+
quantity: {
|
|
18749
|
+
en: "the rain this event",
|
|
18750
|
+
it: "la pioggia di questo evento"
|
|
18751
|
+
},
|
|
18752
|
+
label: {
|
|
18753
|
+
en: "Rain event",
|
|
18754
|
+
it: "Evento di pioggia"
|
|
18755
|
+
},
|
|
18756
|
+
unit: "mm",
|
|
18757
|
+
icon: "droplets"
|
|
18758
|
+
},
|
|
18759
|
+
{
|
|
18760
|
+
kind: "numeric",
|
|
18761
|
+
field: "uv",
|
|
18762
|
+
quantity: {
|
|
18763
|
+
en: "the UV index",
|
|
18764
|
+
it: "l’indice UV"
|
|
18765
|
+
},
|
|
18766
|
+
label: {
|
|
18767
|
+
en: "UV",
|
|
18768
|
+
it: "UV"
|
|
18769
|
+
},
|
|
18770
|
+
unit: "",
|
|
18771
|
+
icon: "cloud-sun"
|
|
18772
|
+
},
|
|
18773
|
+
{
|
|
18774
|
+
kind: "numeric",
|
|
18775
|
+
field: "solarRadiation",
|
|
18776
|
+
quantity: {
|
|
18777
|
+
en: "the solar radiation",
|
|
18778
|
+
it: "la radiazione solare"
|
|
18779
|
+
},
|
|
18780
|
+
label: {
|
|
18781
|
+
en: "Solar",
|
|
18782
|
+
it: "Sole"
|
|
18783
|
+
},
|
|
18784
|
+
unit: "W/m²",
|
|
18785
|
+
icon: "cloud-sun"
|
|
18786
|
+
},
|
|
18787
|
+
{
|
|
18788
|
+
kind: "numeric",
|
|
18789
|
+
field: "dewPoint",
|
|
18790
|
+
quantity: {
|
|
18791
|
+
en: "the dew point",
|
|
18792
|
+
it: "il punto di rugiada"
|
|
18793
|
+
},
|
|
18794
|
+
label: {
|
|
18795
|
+
en: "Dew point",
|
|
18796
|
+
it: "Punto di rugiada"
|
|
18797
|
+
},
|
|
18798
|
+
unit: "°C",
|
|
18799
|
+
icon: "thermometer"
|
|
18800
|
+
}
|
|
18801
|
+
]
|
|
18802
|
+
},
|
|
18541
18803
|
"battery": {
|
|
18542
18804
|
scope: "device",
|
|
18543
18805
|
noun: {
|
|
@@ -18762,6 +19024,30 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
18762
19024
|
icon: "wifi-off"
|
|
18763
19025
|
}]
|
|
18764
19026
|
},
|
|
19027
|
+
"error": {
|
|
19028
|
+
scope: "device",
|
|
19029
|
+
noun: {
|
|
19030
|
+
en: "Fault",
|
|
19031
|
+
it: "Guasto"
|
|
19032
|
+
},
|
|
19033
|
+
state: [{
|
|
19034
|
+
kind: "boolean",
|
|
19035
|
+
field: "active",
|
|
19036
|
+
label: {
|
|
19037
|
+
en: "Fault",
|
|
19038
|
+
it: "Guasto"
|
|
19039
|
+
},
|
|
19040
|
+
whenTrue: {
|
|
19041
|
+
en: "When {device} reports a fault",
|
|
19042
|
+
it: "Quando {device} segnala un guasto"
|
|
19043
|
+
},
|
|
19044
|
+
whenFalse: {
|
|
19045
|
+
en: "When the fault of {device} clears",
|
|
19046
|
+
it: "Quando il guasto di {device} si risolve"
|
|
19047
|
+
},
|
|
19048
|
+
icon: "triangle-alert"
|
|
19049
|
+
}]
|
|
19050
|
+
},
|
|
18765
19051
|
"doorbell": {
|
|
18766
19052
|
scope: "device",
|
|
18767
19053
|
noun: {
|
|
@@ -19492,6 +19778,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
19492
19778
|
"embedding-encoder",
|
|
19493
19779
|
"energy-system",
|
|
19494
19780
|
"enum-sensor",
|
|
19781
|
+
"error",
|
|
19495
19782
|
"event-emitter",
|
|
19496
19783
|
"face-gallery",
|
|
19497
19784
|
"failure-contribution",
|
|
@@ -19622,6 +19909,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
19622
19909
|
"viewer-ui",
|
|
19623
19910
|
"water-heater",
|
|
19624
19911
|
"weather",
|
|
19912
|
+
"weather-station",
|
|
19625
19913
|
"webrtc-session",
|
|
19626
19914
|
"zone-analytics",
|
|
19627
19915
|
"zone-rules",
|
|
@@ -19901,6 +20189,18 @@ Object.freeze({
|
|
|
19901
20189
|
"dry"
|
|
19902
20190
|
]
|
|
19903
20191
|
},
|
|
20192
|
+
{
|
|
20193
|
+
"path": "action",
|
|
20194
|
+
"valueType": "enum",
|
|
20195
|
+
"enumValues": [
|
|
20196
|
+
"heating",
|
|
20197
|
+
"cooling",
|
|
20198
|
+
"drying",
|
|
20199
|
+
"fan",
|
|
20200
|
+
"idle",
|
|
20201
|
+
"off"
|
|
20202
|
+
]
|
|
20203
|
+
},
|
|
19904
20204
|
{
|
|
19905
20205
|
"path": "fanMode",
|
|
19906
20206
|
"valueType": "string"
|
|
@@ -20369,6 +20669,29 @@ Object.freeze({
|
|
|
20369
20669
|
"path": "timestamp",
|
|
20370
20670
|
"valueType": "boolean"
|
|
20371
20671
|
}],
|
|
20672
|
+
"error": [
|
|
20673
|
+
{
|
|
20674
|
+
"path": "active",
|
|
20675
|
+
"valueType": "boolean"
|
|
20676
|
+
},
|
|
20677
|
+
{
|
|
20678
|
+
"path": "code",
|
|
20679
|
+
"valueType": "string"
|
|
20680
|
+
},
|
|
20681
|
+
{
|
|
20682
|
+
"path": "label",
|
|
20683
|
+
"valueType": "string"
|
|
20684
|
+
},
|
|
20685
|
+
{
|
|
20686
|
+
"path": "severity",
|
|
20687
|
+
"valueType": "enum",
|
|
20688
|
+
"enumValues": ["warning", "error"]
|
|
20689
|
+
},
|
|
20690
|
+
{
|
|
20691
|
+
"path": "since",
|
|
20692
|
+
"valueType": "number"
|
|
20693
|
+
}
|
|
20694
|
+
],
|
|
20372
20695
|
"event-emitter": [
|
|
20373
20696
|
{
|
|
20374
20697
|
"path": "lastEvent.deviceId",
|
|
@@ -21588,6 +21911,56 @@ Object.freeze({
|
|
|
21588
21911
|
"valueType": "number"
|
|
21589
21912
|
}
|
|
21590
21913
|
],
|
|
21914
|
+
"weather-station": [
|
|
21915
|
+
{
|
|
21916
|
+
"path": "temperature",
|
|
21917
|
+
"valueType": "number"
|
|
21918
|
+
},
|
|
21919
|
+
{
|
|
21920
|
+
"path": "humidity",
|
|
21921
|
+
"valueType": "number"
|
|
21922
|
+
},
|
|
21923
|
+
{
|
|
21924
|
+
"path": "pressure",
|
|
21925
|
+
"valueType": "number"
|
|
21926
|
+
},
|
|
21927
|
+
{
|
|
21928
|
+
"path": "windSpeed",
|
|
21929
|
+
"valueType": "number"
|
|
21930
|
+
},
|
|
21931
|
+
{
|
|
21932
|
+
"path": "windGust",
|
|
21933
|
+
"valueType": "number"
|
|
21934
|
+
},
|
|
21935
|
+
{
|
|
21936
|
+
"path": "windBearing",
|
|
21937
|
+
"valueType": "number"
|
|
21938
|
+
},
|
|
21939
|
+
{
|
|
21940
|
+
"path": "rainRate",
|
|
21941
|
+
"valueType": "number"
|
|
21942
|
+
},
|
|
21943
|
+
{
|
|
21944
|
+
"path": "rainDaily",
|
|
21945
|
+
"valueType": "number"
|
|
21946
|
+
},
|
|
21947
|
+
{
|
|
21948
|
+
"path": "rainEvent",
|
|
21949
|
+
"valueType": "number"
|
|
21950
|
+
},
|
|
21951
|
+
{
|
|
21952
|
+
"path": "uv",
|
|
21953
|
+
"valueType": "number"
|
|
21954
|
+
},
|
|
21955
|
+
{
|
|
21956
|
+
"path": "solarRadiation",
|
|
21957
|
+
"valueType": "number"
|
|
21958
|
+
},
|
|
21959
|
+
{
|
|
21960
|
+
"path": "dewPoint",
|
|
21961
|
+
"valueType": "number"
|
|
21962
|
+
}
|
|
21963
|
+
],
|
|
21591
21964
|
"zone-analytics": [
|
|
21592
21965
|
{
|
|
21593
21966
|
"path": "ts",
|
|
@@ -21680,7 +22053,7 @@ Object.freeze({
|
|
|
21680
22053
|
}
|
|
21681
22054
|
});
|
|
21682
22055
|
//#endregion
|
|
21683
|
-
//#region ../types/dist/implemented-methods-
|
|
22056
|
+
//#region ../types/dist/implemented-methods-C5FMXLGP.mjs
|
|
21684
22057
|
/**
|
|
21685
22058
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
21686
22059
|
*
|
|
@@ -55012,6 +55385,16 @@ var HvacModeSchema = _enum([
|
|
|
55012
55385
|
var ClimateControlStatusSchema = object({
|
|
55013
55386
|
/** Active HVAC mode. */
|
|
55014
55387
|
mode: HvacModeSchema,
|
|
55388
|
+
/** What the device is doing now (`heating` while the valve is open, `idle`
|
|
55389
|
+
* at setpoint). Absent or null = the device does not say; never a guess (D393). */
|
|
55390
|
+
action: _enum([
|
|
55391
|
+
"heating",
|
|
55392
|
+
"cooling",
|
|
55393
|
+
"drying",
|
|
55394
|
+
"fan",
|
|
55395
|
+
"idle",
|
|
55396
|
+
"off"
|
|
55397
|
+
]).nullable().optional(),
|
|
55015
55398
|
/** Available HVAC modes the device accepts. Subset of HvacMode. */
|
|
55016
55399
|
availableModes: array(HvacModeSchema),
|
|
55017
55400
|
/** Active fan mode (`auto` / `low` / `medium` / `high` / `on` / `off`
|
|
@@ -55065,6 +55448,40 @@ var ClimateControlStatusSchema = object({
|
|
|
55065
55448
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
55066
55449
|
lastFetchedAt: number$1()
|
|
55067
55450
|
});
|
|
55451
|
+
/**
|
|
55452
|
+
* Linked room sensor (Customize): the OPERATOR may replace the thermostat's own
|
|
55453
|
+
* `currentTemp` / `currentHumidity` with a sensor in the room. Never linked on
|
|
55454
|
+
* its own (D356). Once linked it ALWAYS replaces the native value, a null
|
|
55455
|
+
* native included — the operator chose the better reading.
|
|
55456
|
+
*/
|
|
55457
|
+
var CLIMATE_CUSTOMIZE_DEVICE_TYPES = [DeviceType.Climate];
|
|
55458
|
+
function roomSensorTarget(id, path) {
|
|
55459
|
+
return {
|
|
55460
|
+
id,
|
|
55461
|
+
cardinality: "scalar",
|
|
55462
|
+
vocabulary: {
|
|
55463
|
+
cap: "climate-control",
|
|
55464
|
+
stateField: path
|
|
55465
|
+
},
|
|
55466
|
+
deviceTypes: CLIMATE_CUSTOMIZE_DEVICE_TYPES,
|
|
55467
|
+
apply: "replace",
|
|
55468
|
+
path,
|
|
55469
|
+
sources: [{
|
|
55470
|
+
kind: "numeric",
|
|
55471
|
+
transforms: [{ kind: "identity" }]
|
|
55472
|
+
}],
|
|
55473
|
+
sourceReport: { status: "assignment-status" }
|
|
55474
|
+
};
|
|
55475
|
+
}
|
|
55476
|
+
var CLIMATE_CONTROL_TARGETS = [roomSensorTarget("room-temperature", "currentTemp"), roomSensorTarget("room-humidity", "currentHumidity")];
|
|
55477
|
+
var climateControlCustomize = {
|
|
55478
|
+
version: 1,
|
|
55479
|
+
overridable: CLIMATE_CONTROL_TARGETS.map((target) => ({
|
|
55480
|
+
path: target.path,
|
|
55481
|
+
by: target.id
|
|
55482
|
+
})),
|
|
55483
|
+
targets: CLIMATE_CONTROL_TARGETS
|
|
55484
|
+
};
|
|
55068
55485
|
var climateControlCapability = {
|
|
55069
55486
|
name: "climate-control",
|
|
55070
55487
|
scope: "device",
|
|
@@ -55375,6 +55792,7 @@ var climateControlCapability = {
|
|
|
55375
55792
|
* on every push without re-querying the provider.
|
|
55376
55793
|
*/
|
|
55377
55794
|
runtimeState: ClimateControlStatusSchema,
|
|
55795
|
+
customize: climateControlCustomize,
|
|
55378
55796
|
/**
|
|
55379
55797
|
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
55380
55798
|
*
|
|
@@ -56563,20 +56981,95 @@ var ControlSetValueInputSchema = discriminatedUnion("kind", [
|
|
|
56563
56981
|
value: string().min(1)
|
|
56564
56982
|
})
|
|
56565
56983
|
]);
|
|
56984
|
+
/**
|
|
56985
|
+
* `next` / `previous` input (#544, operator scripts driving a selector).
|
|
56986
|
+
* `cycle` is a TOP-LEVEL default so a direct `ctx.api.control.next` call
|
|
56987
|
+
* (which skips the tRPC router's Zod parse) still gets `true` via
|
|
56988
|
+
* `CAP_INPUT_DEFAULTS` — matching HA's own `select_next` / `select_previous`
|
|
56989
|
+
* default.
|
|
56990
|
+
*/
|
|
56991
|
+
var ControlStepInputSchema = object({
|
|
56992
|
+
deviceId: number$1().int().nonnegative(),
|
|
56993
|
+
cycle: boolean().default(true)
|
|
56994
|
+
});
|
|
56995
|
+
/** `first` / `last` input — no `cycle`, there is no boundary to stop at. */
|
|
56996
|
+
var ControlBoundaryInputSchema = object({ deviceId: number$1().int().nonnegative() });
|
|
56566
56997
|
var controlCapability = {
|
|
56567
56998
|
name: "control",
|
|
56568
56999
|
scope: "device",
|
|
56569
57000
|
deviceNative: true,
|
|
56570
57001
|
mode: "singleton",
|
|
56571
57002
|
deviceTypes: [DeviceType.Control],
|
|
56572
|
-
methods: {
|
|
56573
|
-
|
|
56574
|
-
|
|
56575
|
-
|
|
56576
|
-
|
|
56577
|
-
|
|
56578
|
-
|
|
56579
|
-
|
|
57003
|
+
methods: {
|
|
57004
|
+
setValue: method(object({
|
|
57005
|
+
deviceId: number$1().int().nonnegative(),
|
|
57006
|
+
control: ControlSetValueInputSchema
|
|
57007
|
+
}), _void(), {
|
|
57008
|
+
kind: "mutation",
|
|
57009
|
+
auth: "protected",
|
|
57010
|
+
notOperatorFacing: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework"
|
|
57011
|
+
}),
|
|
57012
|
+
/**
|
|
57013
|
+
* Select one step forward through `options` (#544). `providerOptional`
|
|
57014
|
+
* (hence `optionalMethod`): only a `kind: 'select'` provider implements
|
|
57015
|
+
* it — the stepping math is NOT re-derived per provider, it is the one
|
|
57016
|
+
* shared helper `selectNavigationMethods` (`control-select-navigation.ts`)
|
|
57017
|
+
* every select-kind driver spreads in.
|
|
57018
|
+
*/
|
|
57019
|
+
next: optionalMethod(ControlStepInputSchema, _void(), {
|
|
57020
|
+
kind: "mutation",
|
|
57021
|
+
auth: "protected",
|
|
57022
|
+
actions: [{
|
|
57023
|
+
id: "select.next",
|
|
57024
|
+
label: t("Next option", "Opzione successiva"),
|
|
57025
|
+
phrase: t("Select the next option on {device}", "Seleziona l’opzione successiva su {device}"),
|
|
57026
|
+
icon: "skip-forward",
|
|
57027
|
+
openArgs: [{
|
|
57028
|
+
key: "cycle",
|
|
57029
|
+
label: t("Wrap to the first option", "Ricomincia dalla prima opzione"),
|
|
57030
|
+
offer: { kind: "boolean" }
|
|
57031
|
+
}]
|
|
57032
|
+
}]
|
|
57033
|
+
}),
|
|
57034
|
+
/** Select one step backward through `options` (#544) — mirrors `next`. */
|
|
57035
|
+
previous: optionalMethod(ControlStepInputSchema, _void(), {
|
|
57036
|
+
kind: "mutation",
|
|
57037
|
+
auth: "protected",
|
|
57038
|
+
actions: [{
|
|
57039
|
+
id: "select.previous",
|
|
57040
|
+
label: t("Previous option", "Opzione precedente"),
|
|
57041
|
+
phrase: t("Select the previous option on {device}", "Seleziona l’opzione precedente su {device}"),
|
|
57042
|
+
icon: "skip-back",
|
|
57043
|
+
openArgs: [{
|
|
57044
|
+
key: "cycle",
|
|
57045
|
+
label: t("Wrap to the last option", "Ricomincia dall’ultima opzione"),
|
|
57046
|
+
offer: { kind: "boolean" }
|
|
57047
|
+
}]
|
|
57048
|
+
}]
|
|
57049
|
+
}),
|
|
57050
|
+
/** Select the first entry of `options` (#544). */
|
|
57051
|
+
first: optionalMethod(ControlBoundaryInputSchema, _void(), {
|
|
57052
|
+
kind: "mutation",
|
|
57053
|
+
auth: "protected",
|
|
57054
|
+
actions: [{
|
|
57055
|
+
id: "select.first",
|
|
57056
|
+
label: t("First option", "Prima opzione"),
|
|
57057
|
+
phrase: t("Select the first option on {device}", "Seleziona la prima opzione su {device}"),
|
|
57058
|
+
icon: "chevron-first"
|
|
57059
|
+
}]
|
|
57060
|
+
}),
|
|
57061
|
+
/** Select the last entry of `options` (#544). */
|
|
57062
|
+
last: optionalMethod(ControlBoundaryInputSchema, _void(), {
|
|
57063
|
+
kind: "mutation",
|
|
57064
|
+
auth: "protected",
|
|
57065
|
+
actions: [{
|
|
57066
|
+
id: "select.last",
|
|
57067
|
+
label: t("Last option", "Ultima opzione"),
|
|
57068
|
+
phrase: t("Select the last option on {device}", "Seleziona l’ultima opzione su {device}"),
|
|
57069
|
+
icon: "chevron-last"
|
|
57070
|
+
}]
|
|
57071
|
+
})
|
|
57072
|
+
},
|
|
56580
57073
|
status: {
|
|
56581
57074
|
schema: ControlStatusSchema,
|
|
56582
57075
|
kind: "push"
|
|
@@ -57553,7 +58046,7 @@ var mediaPlayerCapability = {
|
|
|
57553
58046
|
]
|
|
57554
58047
|
}
|
|
57555
58048
|
};
|
|
57556
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer;
|
|
58049
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer;
|
|
57557
58050
|
var NUMBER = {
|
|
57558
58051
|
kind: "fixed",
|
|
57559
58052
|
result: ["number"]
|
|
@@ -57618,7 +58111,7 @@ var CHANGED = {
|
|
|
57618
58111
|
fieldPath: "lastChangedAt",
|
|
57619
58112
|
expr: "now"
|
|
57620
58113
|
};
|
|
57621
|
-
function numeric(input) {
|
|
58114
|
+
function numeric$1(input) {
|
|
57622
58115
|
const { alsoFrom, ...base } = input;
|
|
57623
58116
|
return {
|
|
57624
58117
|
...base,
|
|
@@ -57653,7 +58146,7 @@ function binary(input) {
|
|
|
57653
58146
|
};
|
|
57654
58147
|
}
|
|
57655
58148
|
var GROUP_TEMPLATES = [
|
|
57656
|
-
numeric({
|
|
58149
|
+
numeric$1({
|
|
57657
58150
|
id: "temperature",
|
|
57658
58151
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
57659
58152
|
role: DeviceRole.TemperatureSensor,
|
|
@@ -57671,7 +58164,7 @@ var GROUP_TEMPLATES = [
|
|
|
57671
58164
|
}
|
|
57672
58165
|
}
|
|
57673
58166
|
}),
|
|
57674
|
-
numeric({
|
|
58167
|
+
numeric$1({
|
|
57675
58168
|
id: "humidity",
|
|
57676
58169
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
57677
58170
|
role: DeviceRole.HumiditySensor,
|
|
@@ -57689,7 +58182,7 @@ var GROUP_TEMPLATES = [
|
|
|
57689
58182
|
}
|
|
57690
58183
|
}
|
|
57691
58184
|
}),
|
|
57692
|
-
numeric({
|
|
58185
|
+
numeric$1({
|
|
57693
58186
|
id: "pressure",
|
|
57694
58187
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
57695
58188
|
role: DeviceRole.PressureSensor,
|
|
@@ -57700,7 +58193,7 @@ var GROUP_TEMPLATES = [
|
|
|
57700
58193
|
empty: "null",
|
|
57701
58194
|
companions: [NOW$3]
|
|
57702
58195
|
}),
|
|
57703
|
-
numeric({
|
|
58196
|
+
numeric$1({
|
|
57704
58197
|
id: "illuminance",
|
|
57705
58198
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
57706
58199
|
role: DeviceRole.AmbientLightSensor,
|
|
@@ -57711,7 +58204,7 @@ var GROUP_TEMPLATES = [
|
|
|
57711
58204
|
empty: "null",
|
|
57712
58205
|
companions: [NOW$3]
|
|
57713
58206
|
}),
|
|
57714
|
-
numeric({
|
|
58207
|
+
numeric$1({
|
|
57715
58208
|
id: "power",
|
|
57716
58209
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
57717
58210
|
role: DeviceRole.PowerSensor,
|
|
@@ -57722,7 +58215,7 @@ var GROUP_TEMPLATES = [
|
|
|
57722
58215
|
empty: "omit",
|
|
57723
58216
|
companions: [NOW$3]
|
|
57724
58217
|
}),
|
|
57725
|
-
numeric({
|
|
58218
|
+
numeric$1({
|
|
57726
58219
|
id: "energy",
|
|
57727
58220
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
57728
58221
|
role: DeviceRole.EnergySensor,
|
|
@@ -57733,7 +58226,7 @@ var GROUP_TEMPLATES = [
|
|
|
57733
58226
|
empty: "omit",
|
|
57734
58227
|
companions: [NOW$3]
|
|
57735
58228
|
}),
|
|
57736
|
-
numeric({
|
|
58229
|
+
numeric$1({
|
|
57737
58230
|
id: "battery",
|
|
57738
58231
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
57739
58232
|
role: DeviceRole.BatterySensor,
|
|
@@ -57757,7 +58250,7 @@ var GROUP_TEMPLATES = [
|
|
|
57757
58250
|
}
|
|
57758
58251
|
]
|
|
57759
58252
|
}),
|
|
57760
|
-
numeric({
|
|
58253
|
+
numeric$1({
|
|
57761
58254
|
id: "numeric",
|
|
57762
58255
|
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
57763
58256
|
role: DeviceRole.NumericSensor,
|
|
@@ -63361,6 +63854,85 @@ var enumSensorCapability = {
|
|
|
63361
63854
|
}]
|
|
63362
63855
|
}
|
|
63363
63856
|
};
|
|
63857
|
+
/** How loudly a fault wants the operator. Both tiers raise the attention event. */
|
|
63858
|
+
var DeviceErrorSeveritySchema = _enum(["warning", "error"]);
|
|
63859
|
+
/** One fault of a device that can raise several at once. */
|
|
63860
|
+
var DeviceFaultSchema = object({
|
|
63861
|
+
/** The device's own code, as the vendor names it. */
|
|
63862
|
+
code: string(),
|
|
63863
|
+
/** Already translated by the provider (it owns the vendor vocabulary). */
|
|
63864
|
+
label: string(),
|
|
63865
|
+
severity: DeviceErrorSeveritySchema
|
|
63866
|
+
});
|
|
63867
|
+
/**
|
|
63868
|
+
* The fault a device reports right now. One slice per device.
|
|
63869
|
+
*
|
|
63870
|
+
* `active` is tri-state: `null` is "the provider has not read it yet" and is
|
|
63871
|
+
* never drawn as "no fault" nor as a fault (D315, D393). The provider filters
|
|
63872
|
+
* what is not a fault (a completion or reminder code) BEFORE it writes `true`.
|
|
63873
|
+
*
|
|
63874
|
+
* The cap's name is the key a template reads (`{{ alias.error.label }}`, D1021).
|
|
63875
|
+
*/
|
|
63876
|
+
var ErrorStatusSchema = object({
|
|
63877
|
+
active: boolean().nullable(),
|
|
63878
|
+
/** The code of the principal fault; `null` when none (or unknown). */
|
|
63879
|
+
code: string().nullable(),
|
|
63880
|
+
/** The principal fault's words, provider-translated; `null` when none. */
|
|
63881
|
+
label: string().nullable(),
|
|
63882
|
+
severity: DeviceErrorSeveritySchema,
|
|
63883
|
+
/** Ms epoch the current fault started; `null` when none or not known. */
|
|
63884
|
+
since: number$1().nullable(),
|
|
63885
|
+
/** Every fault, for a device that raises several. The principal is the first. */
|
|
63886
|
+
faults: array(DeviceFaultSchema).optional(),
|
|
63887
|
+
/** Ms epoch of the last read the provider made of the fault. */
|
|
63888
|
+
lastFetchedAt: number$1()
|
|
63889
|
+
});
|
|
63890
|
+
/** The slice before the provider has read anything: unknown, not "fine". */
|
|
63891
|
+
var ERROR_STATUS_COLD = {
|
|
63892
|
+
active: null,
|
|
63893
|
+
code: null,
|
|
63894
|
+
label: null,
|
|
63895
|
+
severity: "error",
|
|
63896
|
+
since: null,
|
|
63897
|
+
lastFetchedAt: 0
|
|
63898
|
+
};
|
|
63899
|
+
var errorCapability = {
|
|
63900
|
+
name: "error",
|
|
63901
|
+
scope: "device",
|
|
63902
|
+
deviceNative: true,
|
|
63903
|
+
mode: "singleton",
|
|
63904
|
+
methods: {},
|
|
63905
|
+
status: {
|
|
63906
|
+
schema: ErrorStatusSchema,
|
|
63907
|
+
kind: "push",
|
|
63908
|
+
empty: ERROR_STATUS_COLD
|
|
63909
|
+
},
|
|
63910
|
+
runtimeState: ErrorStatusSchema,
|
|
63911
|
+
/**
|
|
63912
|
+
* Runtime-state durability: **restored** — the previous observation is what
|
|
63913
|
+
* lets the first reading after a restart be a COMPARISON: a fault that was
|
|
63914
|
+
* already open must not announce itself a second time.
|
|
63915
|
+
*
|
|
63916
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
63917
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
63918
|
+
*/
|
|
63919
|
+
durability: "restored",
|
|
63920
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
63921
|
+
/** The fault itself is carried by the attention alerts; no series is recorded. */
|
|
63922
|
+
history: "none",
|
|
63923
|
+
vocabulary: {
|
|
63924
|
+
noun: t("Fault", "Guasto"),
|
|
63925
|
+
order: 5265,
|
|
63926
|
+
state: [{
|
|
63927
|
+
kind: "boolean",
|
|
63928
|
+
field: "active",
|
|
63929
|
+
label: t("Fault", "Guasto"),
|
|
63930
|
+
whenTrue: t("When {device} reports a fault", "Quando {device} segnala un guasto"),
|
|
63931
|
+
whenFalse: t("When the fault of {device} clears", "Quando il guasto di {device} si risolve"),
|
|
63932
|
+
icon: "triangle-alert"
|
|
63933
|
+
}]
|
|
63934
|
+
}
|
|
63935
|
+
};
|
|
63364
63936
|
var IdentitySchema = object({
|
|
63365
63937
|
id: string(),
|
|
63366
63938
|
name: string(),
|
|
@@ -65827,7 +66399,7 @@ var HeroSceneSchema = object({
|
|
|
65827
66399
|
/** 0..1: volume, cover position, cycle progress. */
|
|
65828
66400
|
level: number$1().min(0).max(1).nullable()
|
|
65829
66401
|
});
|
|
65830
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
66402
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
65831
66403
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
65832
66404
|
var HeroRowIdSchema = _enum([
|
|
65833
66405
|
"progress",
|
|
@@ -77852,6 +78424,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
77852
78424
|
"storage-location-low",
|
|
77853
78425
|
"storage-location-critical",
|
|
77854
78426
|
"storage-location-ok",
|
|
78427
|
+
"storage-drain-progress",
|
|
78428
|
+
"storage-drain-complete",
|
|
77855
78429
|
"addon-crash-loop",
|
|
77856
78430
|
"addon-update-available",
|
|
77857
78431
|
"server-update-available",
|
|
@@ -90309,6 +90883,17 @@ var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
|
90309
90883
|
exitCode: number$1().int(),
|
|
90310
90884
|
signal: number$1().int().optional()
|
|
90311
90885
|
})]);
|
|
90886
|
+
var ServerShellRefusalSchema = object({
|
|
90887
|
+
code: literal("server-shell-disabled"),
|
|
90888
|
+
nodeId: string(),
|
|
90889
|
+
message: string()
|
|
90890
|
+
});
|
|
90891
|
+
var ServerShellStatusSchema = object({
|
|
90892
|
+
nodeId: string(),
|
|
90893
|
+
enabled: boolean(),
|
|
90894
|
+
idleMinutes: number$1().int().positive(),
|
|
90895
|
+
refusal: ServerShellRefusalSchema.nullable()
|
|
90896
|
+
});
|
|
90312
90897
|
var TerminalOutputBatchSchema = object({
|
|
90313
90898
|
cursor: number$1().int().nonnegative(),
|
|
90314
90899
|
reset: boolean(),
|
|
@@ -90321,7 +90906,7 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
90321
90906
|
}), TerminalInstanceInfoSchema, {
|
|
90322
90907
|
kind: "mutation",
|
|
90323
90908
|
auth: "admin"
|
|
90324
|
-
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
90909
|
+
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(_void(), ServerShellStatusSchema, { auth: "admin" }), method(object({
|
|
90325
90910
|
profileId: string(),
|
|
90326
90911
|
cols: number$1().int().positive(),
|
|
90327
90912
|
rows: number$1().int().positive(),
|
|
@@ -90331,7 +90916,8 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
90331
90916
|
environment: array(string().max(4096)).max(64).optional()
|
|
90332
90917
|
}), TerminalSessionInfoSchema, {
|
|
90333
90918
|
kind: "mutation",
|
|
90334
|
-
auth: "admin"
|
|
90919
|
+
auth: "admin",
|
|
90920
|
+
caller: "required"
|
|
90335
90921
|
}), method(object({
|
|
90336
90922
|
sessionId: string(),
|
|
90337
90923
|
cols: number$1().int().positive(),
|
|
@@ -90352,6 +90938,7 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
90352
90938
|
}), TerminalOutputBatchSchema, {
|
|
90353
90939
|
kind: "mutation",
|
|
90354
90940
|
auth: "admin",
|
|
90941
|
+
caller: "required",
|
|
90355
90942
|
timeoutMs: 15e3
|
|
90356
90943
|
}), method(object({
|
|
90357
90944
|
sessionId: string(),
|
|
@@ -90361,7 +90948,8 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
|
|
|
90361
90948
|
auth: "admin"
|
|
90362
90949
|
}), method(object({ sessionId: string() }), _void(), {
|
|
90363
90950
|
kind: "mutation",
|
|
90364
|
-
auth: "admin"
|
|
90951
|
+
auth: "admin",
|
|
90952
|
+
caller: "required"
|
|
90365
90953
|
}), NOT_A_DEVICE.CLUSTER;
|
|
90366
90954
|
/**
|
|
90367
90955
|
* toast — system-scoped singleton capability that streams toast
|
|
@@ -92315,6 +92903,71 @@ var weatherCapability = {
|
|
|
92315
92903
|
]
|
|
92316
92904
|
}
|
|
92317
92905
|
};
|
|
92906
|
+
var WeatherStationStatusSchema = object({
|
|
92907
|
+
temperature: number$1().nullable().meta(readingMeta("temperature", { precision: 1 })),
|
|
92908
|
+
humidity: number$1().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
92909
|
+
pressure: number$1().nullable().meta(readingMeta("pressure")),
|
|
92910
|
+
windSpeed: number$1().nullable().meta(readingMeta("speed")),
|
|
92911
|
+
windGust: number$1().nullable().meta(readingMeta("speed")),
|
|
92912
|
+
windBearing: number$1().nullable().meta(readingMeta("angle")),
|
|
92913
|
+
rainRate: number$1().nullable().meta(readingMeta("precipitation-rate", { precision: 1 })),
|
|
92914
|
+
rainDaily: number$1().nullable().meta(readingMeta("precipitation", { precision: 1 })),
|
|
92915
|
+
rainEvent: number$1().nullable().meta(readingMeta("precipitation", { precision: 1 })),
|
|
92916
|
+
uv: number$1().nullable().meta(readingMeta("index", { precision: 1 })),
|
|
92917
|
+
solarRadiation: number$1().nullable().meta(readingMeta("irradiance")),
|
|
92918
|
+
dewPoint: number$1().nullable().meta(readingMeta("temperature", { precision: 1 }))
|
|
92919
|
+
}).extend({
|
|
92920
|
+
/** Ms epoch of the poll that produced this slice. 0 before the first one. */
|
|
92921
|
+
lastFetchedAt: number$1() });
|
|
92922
|
+
var numeric = (field, quantity, label, unit, icon) => ({
|
|
92923
|
+
kind: "numeric",
|
|
92924
|
+
field,
|
|
92925
|
+
quantity,
|
|
92926
|
+
label,
|
|
92927
|
+
unit,
|
|
92928
|
+
icon
|
|
92929
|
+
});
|
|
92930
|
+
var weatherStationCapability = {
|
|
92931
|
+
name: "weather-station",
|
|
92932
|
+
scope: "device",
|
|
92933
|
+
deviceNative: true,
|
|
92934
|
+
mode: "singleton",
|
|
92935
|
+
deviceTypes: [DeviceType.WeatherStation],
|
|
92936
|
+
methods: {},
|
|
92937
|
+
status: {
|
|
92938
|
+
schema: WeatherStationStatusSchema,
|
|
92939
|
+
kind: "push"
|
|
92940
|
+
},
|
|
92941
|
+
runtimeState: WeatherStationStatusSchema,
|
|
92942
|
+
/**
|
|
92943
|
+
* The sensor children already record each reading. The station slice is the
|
|
92944
|
+
* live aggregate a template reads; it does not keep a second series.
|
|
92945
|
+
*/
|
|
92946
|
+
history: "none",
|
|
92947
|
+
/**
|
|
92948
|
+
* Runtime-state durability: **session** — a station reading is stale the
|
|
92949
|
+
* moment the hub is down; the provider re-reads on the next poll.
|
|
92950
|
+
*/
|
|
92951
|
+
durability: "session",
|
|
92952
|
+
vocabulary: {
|
|
92953
|
+
noun: t("Weather station", "Stazione meteo"),
|
|
92954
|
+
order: 5235,
|
|
92955
|
+
state: [
|
|
92956
|
+
numeric("temperature", t("the outdoor temperature", "la temperatura esterna"), t("Temperature", "Temperatura"), "°C", "thermometer"),
|
|
92957
|
+
numeric("humidity", t("the outdoor humidity", "l’umidità esterna"), t("Humidity", "Umidità"), "%", "droplets"),
|
|
92958
|
+
numeric("pressure", t("the air pressure", "la pressione atmosferica"), t("Pressure", "Pressione"), "hPa", "gauge"),
|
|
92959
|
+
numeric("windSpeed", t("the wind speed", "la velocità del vento"), t("Wind", "Vento"), "m/s", "wind"),
|
|
92960
|
+
numeric("windGust", t("the wind gust", "la raffica di vento"), t("Gust", "Raffica"), "m/s", "wind"),
|
|
92961
|
+
numeric("windBearing", t("the wind bearing", "la direzione del vento"), t("Wind bearing", "Direzione del vento"), "°", "wind"),
|
|
92962
|
+
numeric("rainRate", t("the rain rate", "l’intensità della pioggia"), t("Rain rate", "Intensità pioggia"), "mm/h", "droplets"),
|
|
92963
|
+
numeric("rainDaily", t("the rain today", "la pioggia di oggi"), t("Rain today", "Pioggia oggi"), "mm", "droplets"),
|
|
92964
|
+
numeric("rainEvent", t("the rain this event", "la pioggia di questo evento"), t("Rain event", "Evento di pioggia"), "mm", "droplets"),
|
|
92965
|
+
numeric("uv", t("the UV index", "l’indice UV"), t("UV", "UV"), "", "cloud-sun"),
|
|
92966
|
+
numeric("solarRadiation", t("the solar radiation", "la radiazione solare"), t("Solar", "Sole"), "W/m²", "cloud-sun"),
|
|
92967
|
+
numeric("dewPoint", t("the dew point", "il punto di rugiada"), t("Dew point", "Punto di rugiada"), "°C", "thermometer")
|
|
92968
|
+
]
|
|
92969
|
+
}
|
|
92970
|
+
};
|
|
92318
92971
|
/**
|
|
92319
92972
|
* Optional client-side hints sent at session creation to help the provider
|
|
92320
92973
|
* pick the best native source. All fields optional — a viewer that knows
|
|
@@ -93880,6 +94533,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
93880
94533
|
doorbell: doorbellCapability,
|
|
93881
94534
|
energySystem: energySystemCapability,
|
|
93882
94535
|
enumSensor: enumSensorCapability,
|
|
94536
|
+
error: errorCapability,
|
|
93883
94537
|
eventEmitter: eventEmitterCapability,
|
|
93884
94538
|
fanControl: fanControlCapability,
|
|
93885
94539
|
featureProbe: featureProbeCapability,
|
|
@@ -93936,10 +94590,59 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
93936
94590
|
vibration: vibrationCapability,
|
|
93937
94591
|
waterHeater: waterHeaterCapability,
|
|
93938
94592
|
weather: weatherCapability,
|
|
94593
|
+
weatherStation: weatherStationCapability,
|
|
93939
94594
|
zoneAnalytics: zoneAnalyticsCapability,
|
|
93940
94595
|
zoneRules: zoneRulesCapability,
|
|
93941
94596
|
zones: zonesCapability
|
|
93942
94597
|
};
|
|
94598
|
+
/**
|
|
94599
|
+
* The edge between two readings, or `null` for no edge.
|
|
94600
|
+
*
|
|
94601
|
+
* - `null`/cold → `true` is a START (a fault already open at boot is one);
|
|
94602
|
+
* - `true` → `false` is a RESOLVE;
|
|
94603
|
+
* - an UNKNOWN reading (`active: null`) is never an edge, in either direction —
|
|
94604
|
+
* a failed read must neither raise nor close an episode (D393, D49);
|
|
94605
|
+
* - `true` → `true` is the same episode, whatever the code did.
|
|
94606
|
+
*/
|
|
94607
|
+
function deviceErrorEdge(previous, next) {
|
|
94608
|
+
if (next.active === true && previous?.active !== true) return "start";
|
|
94609
|
+
if (next.active === false && previous?.active === true) return "resolve";
|
|
94610
|
+
return null;
|
|
94611
|
+
}
|
|
94612
|
+
function deviceErrorAlertId(deviceId) {
|
|
94613
|
+
return `device-error:${String(deviceId)}`;
|
|
94614
|
+
}
|
|
94615
|
+
/** The alert that opens an episode. `since` is the fault's own start, else `now`. */
|
|
94616
|
+
function buildDeviceErrorAlert(deviceId, deviceName, status, now) {
|
|
94617
|
+
const label = status.label ?? status.code ?? "Fault";
|
|
94618
|
+
const startedAt = status.since ?? now;
|
|
94619
|
+
const alertId = deviceErrorAlertId(deviceId);
|
|
94620
|
+
return {
|
|
94621
|
+
id: alertId,
|
|
94622
|
+
category: "device.error",
|
|
94623
|
+
severity: "critical",
|
|
94624
|
+
title: `${deviceName}: ${label}`,
|
|
94625
|
+
message: `${deviceName} reports a fault: ${label}.`,
|
|
94626
|
+
action: {
|
|
94627
|
+
label: "Open device",
|
|
94628
|
+
href: `/devices/${String(deviceId)}`,
|
|
94629
|
+
navigation: "app"
|
|
94630
|
+
},
|
|
94631
|
+
status: "active",
|
|
94632
|
+
read: false,
|
|
94633
|
+
createdAt: now,
|
|
94634
|
+
updatedAt: now,
|
|
94635
|
+
source: {
|
|
94636
|
+
type: "device",
|
|
94637
|
+
id: String(deviceId)
|
|
94638
|
+
},
|
|
94639
|
+
metadata: {
|
|
94640
|
+
episodeId: `${alertId}@${String(startedAt)}`,
|
|
94641
|
+
code: status.code,
|
|
94642
|
+
deviceSeverity: status.severity
|
|
94643
|
+
}
|
|
94644
|
+
};
|
|
94645
|
+
}
|
|
93943
94646
|
var BaseDevice = class {
|
|
93944
94647
|
id;
|
|
93945
94648
|
stableId;
|
|
@@ -94239,6 +94942,68 @@ var BaseDevice = class {
|
|
|
94239
94942
|
} catch (err) {}
|
|
94240
94943
|
}
|
|
94241
94944
|
/**
|
|
94945
|
+
* Declare that this device can report a fault (the `error` cap). The slice
|
|
94946
|
+
* starts UNKNOWN — a restored slice is kept, so a fault that was open before
|
|
94947
|
+
* a restart is compared, not announced again.
|
|
94948
|
+
*/
|
|
94949
|
+
registerErrorCap() {
|
|
94950
|
+
this.ctx.registerNativeCap?.(errorCapability, {});
|
|
94951
|
+
if (this.runtimeState.getCapState(errorCapability.name) === void 0) this.setCapSlice(errorCapability, ERROR_STATUS_COLD);
|
|
94952
|
+
}
|
|
94953
|
+
/**
|
|
94954
|
+
* Publish the device's fault. The slice is written; on an EDGE (a fault
|
|
94955
|
+
* starts, or one resolves) an attention episode opens or closes through the
|
|
94956
|
+
* alerts cap, which the notification center announces as
|
|
94957
|
+
* `device-attention-required` / `-resolved`. An unknown reading is never an
|
|
94958
|
+
* edge. No rule exists by default: it notifies when the operator makes one.
|
|
94959
|
+
*/
|
|
94960
|
+
async publishError(reading) {
|
|
94961
|
+
const previous = this.getCapSlice(errorCapability);
|
|
94962
|
+
if (reading.active === null && previous !== null && previous.active !== null) return;
|
|
94963
|
+
const now = Date.now();
|
|
94964
|
+
const edge = deviceErrorEdge(previous, reading);
|
|
94965
|
+
const next = edge === "start" && reading.since === null ? {
|
|
94966
|
+
...reading,
|
|
94967
|
+
since: now
|
|
94968
|
+
} : reading;
|
|
94969
|
+
this.setCapSlice(errorCapability, next);
|
|
94970
|
+
if (edge === null) return;
|
|
94971
|
+
const alerts = this.ctx.api.alerts;
|
|
94972
|
+
if (alerts === void 0) {
|
|
94973
|
+
this.ctx.logger.warn("device error: attention event skipped — alerts capability missing", {
|
|
94974
|
+
tags: { deviceId: this.id },
|
|
94975
|
+
meta: { edge }
|
|
94976
|
+
});
|
|
94977
|
+
return;
|
|
94978
|
+
}
|
|
94979
|
+
try {
|
|
94980
|
+
if (edge === "start") await alerts.emit.mutate(buildDeviceErrorAlert(this.id, this.name, next, now));
|
|
94981
|
+
else await alerts.update.mutate({
|
|
94982
|
+
alertId: deviceErrorAlertId(this.id),
|
|
94983
|
+
patch: {
|
|
94984
|
+
status: "completed",
|
|
94985
|
+
read: true,
|
|
94986
|
+
updatedAt: now
|
|
94987
|
+
}
|
|
94988
|
+
});
|
|
94989
|
+
this.ctx.logger.info(`device error: ${edge === "start" ? "raised" : "resolved"}`, {
|
|
94990
|
+
tags: { deviceId: this.id },
|
|
94991
|
+
meta: {
|
|
94992
|
+
code: next.code,
|
|
94993
|
+
label: next.label
|
|
94994
|
+
}
|
|
94995
|
+
});
|
|
94996
|
+
} catch (err) {
|
|
94997
|
+
this.ctx.logger.warn("device error: attention event failed", {
|
|
94998
|
+
tags: { deviceId: this.id },
|
|
94999
|
+
meta: {
|
|
95000
|
+
edge,
|
|
95001
|
+
error: errMsg(err)
|
|
95002
|
+
}
|
|
95003
|
+
});
|
|
95004
|
+
}
|
|
95005
|
+
}
|
|
95006
|
+
/**
|
|
94242
95007
|
* Typed read-through to a cap-keyed runtime-state slice. Drivers
|
|
94243
95008
|
* call `this.getCapSlice(batteryCapability)` and the return type
|
|
94244
95009
|
* is inferred from the cap's `runtimeState` Zod schema — no string
|
|
@@ -95186,7 +95951,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
95186
95951
|
}
|
|
95187
95952
|
};
|
|
95188
95953
|
DeviceType.HeatPump;
|
|
95189
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
95954
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
95190
95955
|
new Set(Object.values(DeviceType));
|
|
95191
95956
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
95192
95957
|
function contribution(cap, schema, build) {
|
|
@@ -96555,6 +97320,17 @@ var SENSORS_FAMILY_CONTRIBUTIONS = {
|
|
|
96555
97320
|
doorbell: doorbellContribution,
|
|
96556
97321
|
meter: meterContribution,
|
|
96557
97322
|
weather: weatherContribution,
|
|
97323
|
+
"weather-station": contribution("weather-station", WeatherStationStatusSchema, (slice) => {
|
|
97324
|
+
if (slice === void 0 || slice.temperature === null) return { reading: reading$1("weather", "unknown") };
|
|
97325
|
+
const celsius = `${number(slice.temperature)}°C`;
|
|
97326
|
+
const facts = [fact("reading", "thermometer", t(celsius, celsius), "primary")];
|
|
97327
|
+
if (slice.humidity !== null) facts.push(fact("reading", "droplets", t(`${Math.round(slice.humidity)}%`, `${Math.round(slice.humidity)}%`)));
|
|
97328
|
+
if (slice.windSpeed !== null) facts.push(fact("reading", "wind", t(`${number(slice.windSpeed)} m/s`, `${number(slice.windSpeed)} m/s`)));
|
|
97329
|
+
return {
|
|
97330
|
+
reading: reading$1("weather", "on", false, t(celsius, celsius)),
|
|
97331
|
+
facts
|
|
97332
|
+
};
|
|
97333
|
+
}),
|
|
96558
97334
|
update: updateContribution,
|
|
96559
97335
|
image: imageContribution,
|
|
96560
97336
|
button: buttonContribution,
|
|
@@ -97231,7 +98007,7 @@ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pu
|
|
|
97231
98007
|
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
97232
98008
|
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
97233
98009
|
];
|
|
97234
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
98010
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
97235
98011
|
/**
|
|
97236
98012
|
* Who looks like what (D1023). One look per {@link DeviceType}, refined by a
|
|
97237
98013
|
* {@link DeviceRole} where the role changes how the device reads (a leak
|
|
@@ -97875,7 +98651,7 @@ lookOf({
|
|
|
97875
98651
|
standby: MUTED
|
|
97876
98652
|
});
|
|
97877
98653
|
DeviceType.Climate;
|
|
97878
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
98654
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
97879
98655
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
97880
98656
|
Object.freeze({
|
|
97881
98657
|
"accessories.getStatus": {
|
|
@@ -99180,6 +99956,13 @@ Object.freeze({
|
|
|
99180
99956
|
access: "view",
|
|
99181
99957
|
role: "viewer"
|
|
99182
99958
|
},
|
|
99959
|
+
"control.first": {
|
|
99960
|
+
capName: "control",
|
|
99961
|
+
capScope: "device",
|
|
99962
|
+
addonId: null,
|
|
99963
|
+
access: "create",
|
|
99964
|
+
role: "viewer"
|
|
99965
|
+
},
|
|
99183
99966
|
"control.getStatus": {
|
|
99184
99967
|
capName: "control",
|
|
99185
99968
|
capScope: "device",
|
|
@@ -99187,6 +99970,27 @@ Object.freeze({
|
|
|
99187
99970
|
access: "view",
|
|
99188
99971
|
role: "viewer"
|
|
99189
99972
|
},
|
|
99973
|
+
"control.last": {
|
|
99974
|
+
capName: "control",
|
|
99975
|
+
capScope: "device",
|
|
99976
|
+
addonId: null,
|
|
99977
|
+
access: "create",
|
|
99978
|
+
role: "viewer"
|
|
99979
|
+
},
|
|
99980
|
+
"control.next": {
|
|
99981
|
+
capName: "control",
|
|
99982
|
+
capScope: "device",
|
|
99983
|
+
addonId: null,
|
|
99984
|
+
access: "create",
|
|
99985
|
+
role: "viewer"
|
|
99986
|
+
},
|
|
99987
|
+
"control.previous": {
|
|
99988
|
+
capName: "control",
|
|
99989
|
+
capScope: "device",
|
|
99990
|
+
addonId: null,
|
|
99991
|
+
access: "create",
|
|
99992
|
+
role: "viewer"
|
|
99993
|
+
},
|
|
99190
99994
|
"control.setValue": {
|
|
99191
99995
|
capName: "control",
|
|
99192
99996
|
capScope: "device",
|
|
@@ -101140,6 +101944,13 @@ Object.freeze({
|
|
|
101140
101944
|
access: "view",
|
|
101141
101945
|
role: "viewer"
|
|
101142
101946
|
},
|
|
101947
|
+
"error.getStatus": {
|
|
101948
|
+
capName: "error",
|
|
101949
|
+
capScope: "device",
|
|
101950
|
+
addonId: null,
|
|
101951
|
+
access: "view",
|
|
101952
|
+
role: "viewer"
|
|
101953
|
+
},
|
|
101143
101954
|
"eventEmitter.getStatus": {
|
|
101144
101955
|
capName: "event-emitter",
|
|
101145
101956
|
capScope: "device",
|
|
@@ -107398,6 +108209,13 @@ Object.freeze({
|
|
|
107398
108209
|
access: "create",
|
|
107399
108210
|
role: "admin"
|
|
107400
108211
|
},
|
|
108212
|
+
"terminalSession.serverShellStatus": {
|
|
108213
|
+
capName: "terminal-session",
|
|
108214
|
+
capScope: "system",
|
|
108215
|
+
addonId: null,
|
|
108216
|
+
access: "view",
|
|
108217
|
+
role: "admin"
|
|
108218
|
+
},
|
|
107401
108219
|
"terminalSession.writeInput": {
|
|
107402
108220
|
capName: "terminal-session",
|
|
107403
108221
|
capScope: "system",
|
|
@@ -108133,6 +108951,13 @@ Object.freeze({
|
|
|
108133
108951
|
access: "view",
|
|
108134
108952
|
role: "viewer"
|
|
108135
108953
|
},
|
|
108954
|
+
"weatherStation.getStatus": {
|
|
108955
|
+
capName: "weather-station",
|
|
108956
|
+
capScope: "device",
|
|
108957
|
+
addonId: null,
|
|
108958
|
+
access: "view",
|
|
108959
|
+
role: "viewer"
|
|
108960
|
+
},
|
|
108136
108961
|
"webrtcSession.addIceCandidate": {
|
|
108137
108962
|
capName: "webrtc-session",
|
|
108138
108963
|
capScope: "device",
|
|
@@ -108346,7 +109171,7 @@ function offered(received) {
|
|
|
108346
109171
|
};
|
|
108347
109172
|
}
|
|
108348
109173
|
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
108349
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
109174
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
108350
109175
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
108351
109176
|
new Set(Object.values(DeviceType));
|
|
108352
109177
|
new Set(Object.values(DeviceRole));
|
|
@@ -108828,11 +109653,31 @@ Object.freeze({
|
|
|
108828
109653
|
form: "single",
|
|
108829
109654
|
optional: false
|
|
108830
109655
|
}],
|
|
109656
|
+
"control.first": [{
|
|
109657
|
+
name: "deviceId",
|
|
109658
|
+
form: "single",
|
|
109659
|
+
optional: false
|
|
109660
|
+
}],
|
|
108831
109661
|
"control.getStatus": [{
|
|
108832
109662
|
name: "deviceId",
|
|
108833
109663
|
form: "single",
|
|
108834
109664
|
optional: false
|
|
108835
109665
|
}],
|
|
109666
|
+
"control.last": [{
|
|
109667
|
+
name: "deviceId",
|
|
109668
|
+
form: "single",
|
|
109669
|
+
optional: false
|
|
109670
|
+
}],
|
|
109671
|
+
"control.next": [{
|
|
109672
|
+
name: "deviceId",
|
|
109673
|
+
form: "single",
|
|
109674
|
+
optional: false
|
|
109675
|
+
}],
|
|
109676
|
+
"control.previous": [{
|
|
109677
|
+
name: "deviceId",
|
|
109678
|
+
form: "single",
|
|
109679
|
+
optional: false
|
|
109680
|
+
}],
|
|
108836
109681
|
"control.setValue": [{
|
|
108837
109682
|
name: "deviceId",
|
|
108838
109683
|
form: "single",
|
|
@@ -109457,6 +110302,11 @@ Object.freeze({
|
|
|
109457
110302
|
form: "single",
|
|
109458
110303
|
optional: false
|
|
109459
110304
|
}],
|
|
110305
|
+
"error.getStatus": [{
|
|
110306
|
+
name: "deviceId",
|
|
110307
|
+
form: "single",
|
|
110308
|
+
optional: false
|
|
110309
|
+
}],
|
|
109460
110310
|
"eventEmitter.getStatus": [{
|
|
109461
110311
|
name: "deviceId",
|
|
109462
110312
|
form: "single",
|
|
@@ -111498,6 +112348,11 @@ Object.freeze({
|
|
|
111498
112348
|
form: "single",
|
|
111499
112349
|
optional: false
|
|
111500
112350
|
}],
|
|
112351
|
+
"weatherStation.getStatus": [{
|
|
112352
|
+
name: "deviceId",
|
|
112353
|
+
form: "single",
|
|
112354
|
+
optional: false
|
|
112355
|
+
}],
|
|
111501
112356
|
"webrtcSession.addIceCandidate": [{
|
|
111502
112357
|
name: "deviceId",
|
|
111503
112358
|
form: "single",
|
|
@@ -111734,6 +112589,8 @@ new Map(Object.entries({
|
|
|
111734
112589
|
"storage-location-low": "system",
|
|
111735
112590
|
"storage-location-critical": "system",
|
|
111736
112591
|
"storage-location-ok": "system",
|
|
112592
|
+
"storage-drain-progress": "system",
|
|
112593
|
+
"storage-drain-complete": "system",
|
|
111737
112594
|
"alarm-triggered": "alarm",
|
|
111738
112595
|
"alarm-armed": "alarm",
|
|
111739
112596
|
"alarm-disarmed": "alarm",
|
|
@@ -111869,6 +112726,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
111869
112726
|
"storage-location-ok"
|
|
111870
112727
|
]
|
|
111871
112728
|
},
|
|
112729
|
+
{
|
|
112730
|
+
id: "storage-drain",
|
|
112731
|
+
family: "system",
|
|
112732
|
+
label: "Storage drain progress",
|
|
112733
|
+
kinds: ["storage-drain-progress", "storage-drain-complete"]
|
|
112734
|
+
},
|
|
111872
112735
|
{
|
|
111873
112736
|
id: "alerts",
|
|
111874
112737
|
family: "system",
|
|
@@ -112063,6 +112926,7 @@ var ALERT_EPISODE = [
|
|
|
112063
112926
|
"alert-error",
|
|
112064
112927
|
"alert-critical-resolved"
|
|
112065
112928
|
];
|
|
112929
|
+
var STORAGE_DRAIN = ["storage-drain-progress", "storage-drain-complete"];
|
|
112066
112930
|
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
112067
112931
|
var UPDATES = [
|
|
112068
112932
|
"addon-update-available",
|
|
@@ -112274,6 +113138,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
112274
113138
|
[...RULE_TEXT],
|
|
112275
113139
|
[...RULE_TEXT],
|
|
112276
113140
|
[...RULE_TEXT],
|
|
113141
|
+
[...RULE_TEXT],
|
|
112277
113142
|
[...RULE_BODY_ONLY],
|
|
112278
113143
|
[...RULE_TEXT],
|
|
112279
113144
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
@@ -112286,8 +113151,16 @@ var STATE_SUMMARY_VARS = [
|
|
|
112286
113151
|
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
112287
113152
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
112288
113153
|
[...RULE_TEXT],
|
|
112289
|
-
([...RULE_TEXT], [
|
|
112290
|
-
|
|
113154
|
+
([...RULE_TEXT], [
|
|
113155
|
+
...UPDATES,
|
|
113156
|
+
...STORAGE_DRAIN,
|
|
113157
|
+
...ALERT_EPISODE
|
|
113158
|
+
]),
|
|
113159
|
+
([...RULE_TEXT], [
|
|
113160
|
+
...UPDATES,
|
|
113161
|
+
...STORAGE_DRAIN,
|
|
113162
|
+
...ALERT_EPISODE
|
|
113163
|
+
]),
|
|
112291
113164
|
[...RULE_TEXT],
|
|
112292
113165
|
[...RULE_TEXT],
|
|
112293
113166
|
[...RULE_TEXT],
|
|
@@ -112301,6 +113174,9 @@ var STATE_SUMMARY_VARS = [
|
|
|
112301
113174
|
[...RULE_TEXT],
|
|
112302
113175
|
[...RULE_TEXT],
|
|
112303
113176
|
[...RULE_TEXT],
|
|
113177
|
+
([...RULE_TEXT], [...STORAGE_DRAIN]),
|
|
113178
|
+
([...RULE_TEXT], [...STORAGE_DRAIN]),
|
|
113179
|
+
[...RULE_TEXT],
|
|
112304
113180
|
[...RULE_TEXT],
|
|
112305
113181
|
[...RULE_TEXT],
|
|
112306
113182
|
[...RULE_TEXT],
|
|
@@ -113267,7 +114143,10 @@ object({
|
|
|
113267
114143
|
* duplicating them. Pure: no `BaseDevice` / facade dependency.
|
|
113268
114144
|
*/
|
|
113269
114145
|
/**
|
|
113270
|
-
* Cold-start defaults so reads never miss a slice before the first push.
|
|
114146
|
+
* Cold-start defaults so reads never miss a slice before the first push. They
|
|
114147
|
+
* are READ fallbacks (`getCapState(...) ?? COLD_X`), never written: a placeholder
|
|
114148
|
+
* published at construction overwrote the hydrated slice and diffed against the
|
|
114149
|
+
* CCU replay as phantom device transitions after every boot (planning#561).
|
|
113271
114150
|
* `lastChangedAt: 0` marks each as a PLACEHOLDER — the value is a guess, and
|
|
113272
114151
|
* consumers read it as unknown. A replayed CCU value is stamped
|
|
113273
114152
|
* `HM_SEEDED_CHANGED_AT` instead (`hm-change-stamp.ts`).
|
|
@@ -113291,20 +114170,6 @@ var COLD_MOTION = {
|
|
|
113291
114170
|
lastDetectedAt: null,
|
|
113292
114171
|
autoClearAfterMs: null
|
|
113293
114172
|
};
|
|
113294
|
-
/**
|
|
113295
|
-
* The motion seed a constructor writes OVER the slice hydrated from the
|
|
113296
|
-
* persisted runtime state. The level is a placeholder (`false`) until the
|
|
113297
|
-
* CCU says otherwise, but a stored rise is a fact: `lastDetectedAt: null`
|
|
113298
|
-
* means "never detected" (`motion.cap.ts`), and a restart must not turn
|
|
113299
|
-
* "fired an hour ago" into that.
|
|
113300
|
-
*/
|
|
113301
|
-
function coldMotionKeepingRise(stored) {
|
|
113302
|
-
const rise = stored?.lastDetectedAt;
|
|
113303
|
-
return {
|
|
113304
|
-
...COLD_MOTION,
|
|
113305
|
-
lastDetectedAt: typeof rise === "number" && Number.isFinite(rise) && rise > 0 ? rise : null
|
|
113306
|
-
};
|
|
113307
|
-
}
|
|
113308
114173
|
var COLD_CLIMATE = {
|
|
113309
114174
|
mode: "auto",
|
|
113310
114175
|
availableModes: [...[
|
|
@@ -140564,12 +141429,26 @@ var HmChildDevice = class extends BaseDevice {
|
|
|
140564
141429
|
}
|
|
140565
141430
|
});
|
|
140566
141431
|
}
|
|
141432
|
+
/**
|
|
141433
|
+
* A (channel, parameter) outside the entity's channels that this child still
|
|
141434
|
+
* reads. Default: none. A climate child reads the `STATE` of the device's
|
|
141435
|
+
* floor-heating relay channel (the heat demand); every other parameter of
|
|
141436
|
+
* that channel stays foreign.
|
|
141437
|
+
*/
|
|
141438
|
+
readsForeignDatapoint(_channel, _parameter) {
|
|
141439
|
+
return false;
|
|
141440
|
+
}
|
|
141441
|
+
readsForeignEvent(event) {
|
|
141442
|
+
const channel = this.resolveHmDevice()?.channels.find((c) => c.address === event.channel);
|
|
141443
|
+
return channel !== void 0 && this.readsForeignDatapoint(channel, event.parameter);
|
|
141444
|
+
}
|
|
140567
141445
|
ownsEventChannel(event) {
|
|
140568
141446
|
const owned = this.channel;
|
|
140569
141447
|
if (owned === void 0) return true;
|
|
140570
141448
|
const channel = event.channel;
|
|
140571
141449
|
if (typeof channel === "string" && channel.length > 0) {
|
|
140572
141450
|
if (!this.ownedChannels().includes(channel)) {
|
|
141451
|
+
if (this.readsForeignEvent(event)) return true;
|
|
140573
141452
|
this.logValueDropped(event, "foreign-channel");
|
|
140574
141453
|
return false;
|
|
140575
141454
|
}
|
|
@@ -140613,8 +141492,9 @@ var HmChildDevice = class extends BaseDevice {
|
|
|
140613
141492
|
const now = Date.now();
|
|
140614
141493
|
const accepted = this.ownedChannels();
|
|
140615
141494
|
for (const channel of device.channels) {
|
|
140616
|
-
|
|
141495
|
+
const ownedChannel = accepted.includes(channel.address);
|
|
140617
141496
|
for (const dp of channel.dataPoints ?? []) {
|
|
141497
|
+
if (!ownedChannel && !this.readsForeignDatapoint(channel, dp.parameter)) continue;
|
|
140618
141498
|
if (dp.value === null || dp.value === void 0) continue;
|
|
140619
141499
|
if (!this.isPreferredSource({
|
|
140620
141500
|
dpId: dp.id,
|
|
@@ -140666,12 +141546,13 @@ function isHmOffSetpoint(target, offSetpointC = HM_OFF_SETPOINT_C) {
|
|
|
140666
141546
|
* Observed 2026-11-13 via `getParamsetDescription` on `INT0000001:1`: the
|
|
140667
141547
|
* datapoint is `TYPE INTEGER`, `MIN 0`, `MAX 3`, with no value list. The
|
|
140668
141548
|
* live CCU therefore delivers the index, not a name.
|
|
140669
|
-
* 0 auto, 1 manual heat, 2 party (a timed override
|
|
141549
|
+
* 0 auto, 1 manual heat, 2 party (a timed override: mode auto, preset `party`).
|
|
140670
141550
|
* 3 is absent: unknown, so {@link fromHmSetPointMode} returns null and the
|
|
140671
141551
|
* caller keeps the previous mode.
|
|
140672
141552
|
* `CONTROL_MODE` is write-only on HmIP heating groups and always reads `0`;
|
|
140673
141553
|
* mode is read from here.
|
|
140674
141554
|
*/
|
|
141555
|
+
var HM_SET_POINT_MODE_PARTY = 2;
|
|
140675
141556
|
var HM_SET_POINT_MODE_BY_INDEX = {
|
|
140676
141557
|
0: "auto",
|
|
140677
141558
|
1: "heat",
|
|
@@ -140716,6 +141597,19 @@ function fromHmSetPointMode(value) {
|
|
|
140716
141597
|
if (mode === void 0) return null;
|
|
140717
141598
|
return mode === "auto" ? "auto" : "heat";
|
|
140718
141599
|
}
|
|
141600
|
+
/**
|
|
141601
|
+
* Like {@link fromHmSetPointMode}, but it also says whether the timed override
|
|
141602
|
+
* (index 2 / `PARTY`) is running. The mode stays `auto` under a party; the
|
|
141603
|
+
* override is the `party` preset, as `boost` is.
|
|
141604
|
+
*/
|
|
141605
|
+
function readHmSetPointMode(value) {
|
|
141606
|
+
const mode = fromHmSetPointMode(value);
|
|
141607
|
+
if (mode === null) return null;
|
|
141608
|
+
return {
|
|
141609
|
+
mode,
|
|
141610
|
+
party: typeof value === "string" ? value.toUpperCase() === "PARTY" : value === HM_SET_POINT_MODE_PARTY
|
|
141611
|
+
};
|
|
141612
|
+
}
|
|
140719
141613
|
/** Convert a 0..1 HmIP LEVEL into a 0..100 CamStack position (rounded). */
|
|
140720
141614
|
function levelToPercent(level) {
|
|
140721
141615
|
return Math.round(Math.max(0, Math.min(1, level)) * 100);
|
|
@@ -140866,13 +141760,51 @@ function modeWithHmOffTarget(previous, target, offSetpointC) {
|
|
|
140866
141760
|
if (previous.mode === "off") return previous.lastActiveMode ?? "heat";
|
|
140867
141761
|
return previous.mode;
|
|
140868
141762
|
}
|
|
141763
|
+
/** The action a device with a known heat demand reports, or `off` when it is switched off. */
|
|
141764
|
+
function actionFor(mode, demand) {
|
|
141765
|
+
if (mode === "off") return "off";
|
|
141766
|
+
if (demand === null) return null;
|
|
141767
|
+
return demand ? "heating" : "idle";
|
|
141768
|
+
}
|
|
141769
|
+
/** The demand the previous slice recorded in its `action`; unknown when it said `off` or nothing. */
|
|
141770
|
+
function demandOf(previous) {
|
|
141771
|
+
if (previous.action === "heating") return true;
|
|
141772
|
+
if (previous.action === "idle") return false;
|
|
141773
|
+
return null;
|
|
141774
|
+
}
|
|
141775
|
+
/**
|
|
141776
|
+
* A mode change settles the action: off is `off`; LEAVING off forgets the
|
|
141777
|
+
* demand (the valve was shut by the off setpoint and the device has not said
|
|
141778
|
+
* yet, D393); otherwise the last demand stands.
|
|
141779
|
+
*/
|
|
141780
|
+
function withModeAction(previous, next) {
|
|
141781
|
+
if (next.mode === previous.mode) return next;
|
|
141782
|
+
const demand = previous.mode === "off" ? null : demandOf(previous);
|
|
141783
|
+
return {
|
|
141784
|
+
...next,
|
|
141785
|
+
action: actionFor(next.mode, demand)
|
|
141786
|
+
};
|
|
141787
|
+
}
|
|
141788
|
+
/**
|
|
141789
|
+
* Decode a heat-demand report: a floor-heating relay's `STATE` (BWTH `:8`) or a
|
|
141790
|
+
* radiator valve's `LEVEL` (0..1). Switched off wins over any demand.
|
|
141791
|
+
*/
|
|
141792
|
+
function decodeClimateDemand(previous, source, value, now) {
|
|
141793
|
+
const demand = source === "floor-direct-state" ? typeof value === "boolean" ? value : null : typeof value === "number" ? value > 0 : null;
|
|
141794
|
+
if (demand === null) return null;
|
|
141795
|
+
return {
|
|
141796
|
+
...previous,
|
|
141797
|
+
action: actionFor(previous.mode, demand),
|
|
141798
|
+
lastFetchedAt: now
|
|
141799
|
+
};
|
|
141800
|
+
}
|
|
140869
141801
|
function decodeClimate(previous, parameter, value, now, offSetpointC = HM_OFF_SETPOINT_C) {
|
|
140870
|
-
if (parameter === "SET_POINT_TEMPERATURE" && typeof value === "number") return {
|
|
141802
|
+
if (parameter === "SET_POINT_TEMPERATURE" && typeof value === "number") return withModeAction(previous, {
|
|
140871
141803
|
...previous,
|
|
140872
141804
|
target: value,
|
|
140873
141805
|
mode: modeWithHmOffTarget(previous, value, offSetpointC),
|
|
140874
141806
|
lastFetchedAt: now
|
|
140875
|
-
};
|
|
141807
|
+
});
|
|
140876
141808
|
if (parameter === "ACTUAL_TEMPERATURE" && typeof value === "number") return {
|
|
140877
141809
|
...previous,
|
|
140878
141810
|
currentTemp: value,
|
|
@@ -140884,14 +141816,17 @@ function decodeClimate(previous, parameter, value, now, offSetpointC = HM_OFF_SE
|
|
|
140884
141816
|
lastFetchedAt: now
|
|
140885
141817
|
};
|
|
140886
141818
|
if (parameter === "SET_POINT_MODE") {
|
|
140887
|
-
const
|
|
140888
|
-
if (
|
|
141819
|
+
const reading = readHmSetPointMode(value);
|
|
141820
|
+
if (reading === null) return null;
|
|
141821
|
+
const { mode, party } = reading;
|
|
140889
141822
|
const resolved = mode === "heat" && isHmOffSetpoint(previous.target, offSetpointC) ? "off" : mode;
|
|
140890
|
-
|
|
141823
|
+
const preset = party ? "party" : previous.preset === "party" ? "" : previous.preset;
|
|
141824
|
+
return withModeAction(previous, {
|
|
140891
141825
|
...previous,
|
|
140892
141826
|
mode: resolved,
|
|
141827
|
+
preset,
|
|
140893
141828
|
lastFetchedAt: now
|
|
140894
|
-
};
|
|
141829
|
+
});
|
|
140895
141830
|
}
|
|
140896
141831
|
if (parameter === "BOOST_MODE" && typeof value === "boolean") return {
|
|
140897
141832
|
...previous,
|
|
@@ -140944,7 +141879,7 @@ var hmActuatorSchema = hmChildSchema.extend({
|
|
|
140944
141879
|
* Status flows back via the facade `valueChanged` stream, decoded by the
|
|
140945
141880
|
* existing pure decoders (`decodeCover` / `decodeLock` / `decodeClimate`).
|
|
140946
141881
|
*/
|
|
140947
|
-
var HmActuatorDevice = class extends HmChildDevice {
|
|
141882
|
+
var HmActuatorDevice = class HmActuatorDevice extends HmChildDevice {
|
|
140948
141883
|
/** A cover's `stop` drives the channel's real STOP (`coverStop`). */
|
|
140949
141884
|
features = this.config.values.kind === "cover" ? [DeviceFeature.CoverStoppable] : [];
|
|
140950
141885
|
kind;
|
|
@@ -140986,7 +141921,6 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
140986
141921
|
else await facade.switchTurnOff(this.address, channel);
|
|
140987
141922
|
}
|
|
140988
141923
|
});
|
|
140989
|
-
this.runtimeState.setCapState("switch", COLD_SWITCH);
|
|
140990
141924
|
this.registeredCap = "switch";
|
|
140991
141925
|
}
|
|
140992
141926
|
registerCoverCap() {
|
|
@@ -141007,7 +141941,6 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
141007
141941
|
},
|
|
141008
141942
|
setTiltPosition: async () => this.unsupported("cover tilt")
|
|
141009
141943
|
});
|
|
141010
|
-
this.runtimeState.setCapState("cover", COLD_COVER);
|
|
141011
141944
|
this.registeredCap = "cover";
|
|
141012
141945
|
}
|
|
141013
141946
|
registerLockCap() {
|
|
@@ -141024,7 +141957,6 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
141024
141957
|
await this.requireFacade().lockOpen(this.address, channel);
|
|
141025
141958
|
}
|
|
141026
141959
|
});
|
|
141027
|
-
this.runtimeState.setCapState("lock-control", COLD_LOCK);
|
|
141028
141960
|
this.registeredCap = "lock-control";
|
|
141029
141961
|
}
|
|
141030
141962
|
registerClimateCap() {
|
|
@@ -141059,7 +141991,6 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
141059
141991
|
};
|
|
141060
141992
|
this.ctx.registerNativeCap(climateControlCapability, provider);
|
|
141061
141993
|
registerPowerSwitch(this, climateControlCapability, provider);
|
|
141062
|
-
this.runtimeState.setCapState("climate-control", COLD_CLIMATE);
|
|
141063
141994
|
this.registeredCap = "climate-control";
|
|
141064
141995
|
}
|
|
141065
141996
|
/**
|
|
@@ -141071,6 +142002,28 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
141071
142002
|
const entity = this.facade?.customEntities().find((e) => e.device === this.address && e.channel === this.actuatorChannel);
|
|
141072
142003
|
return entity?.kind === "climate" ? entity.minTemp : HM_OFF_SETPOINT_C;
|
|
141073
142004
|
}
|
|
142005
|
+
/** The channel type of a floor-heating relay's demand report (HmIP-BWTH `:8`). */
|
|
142006
|
+
static FLOOR_DIRECT_CHANNEL_TYPE = "CLIMATECONTROL_FLOOR_DIRECT_TRANSMITTER";
|
|
142007
|
+
static isFloorDirect(channel) {
|
|
142008
|
+
return channel.type === HmActuatorDevice.FLOOR_DIRECT_CHANNEL_TYPE;
|
|
142009
|
+
}
|
|
142010
|
+
/**
|
|
142011
|
+
* A climate child reads the `STATE` of the device's floor-direct transmitter
|
|
142012
|
+
* as its heat demand. It is the ONLY foreign datapoint it takes: the other
|
|
142013
|
+
* parameters of that channel and every other channel (`:9`, `:10`) stay dropped.
|
|
142014
|
+
*/
|
|
142015
|
+
readsForeignDatapoint(channel, parameter) {
|
|
142016
|
+
return this.registeredCap === "climate-control" && parameter === "STATE" && HmActuatorDevice.isFloorDirect(channel);
|
|
142017
|
+
}
|
|
142018
|
+
hasFloorDirectChannel() {
|
|
142019
|
+
return this.resolveHmDevice()?.channels.some(HmActuatorDevice.isFloorDirect) === true;
|
|
142020
|
+
}
|
|
142021
|
+
/** Is this event the floor-direct `STATE`, as opposed to the owned channel's own? */
|
|
142022
|
+
isFloorDirectState(event) {
|
|
142023
|
+
if (event.parameter !== "STATE") return false;
|
|
142024
|
+
const channel = this.resolveHmDevice()?.channels.find((c) => c.address === event.channel);
|
|
142025
|
+
return channel !== void 0 && HmActuatorDevice.isFloorDirect(channel);
|
|
142026
|
+
}
|
|
141074
142027
|
handleValueChanged(event, origin) {
|
|
141075
142028
|
const now = event.ts || Date.now();
|
|
141076
142029
|
const { parameter, value } = event;
|
|
@@ -141089,7 +142042,7 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
141089
142042
|
if (cap === "climate-control") {
|
|
141090
142043
|
const prev = this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE;
|
|
141091
142044
|
const offC = this.climateOffSetpointC();
|
|
141092
|
-
const next =
|
|
142045
|
+
const next = this.decodeClimateEvent(prev, event, now, offC);
|
|
141093
142046
|
if (next === null && parameter === "SET_POINT_MODE") this.ctx.logger.debug("Homematic climate: SET_POINT_MODE unknown — mode unchanged", {
|
|
141094
142047
|
tags: { deviceId: this.id },
|
|
141095
142048
|
meta: {
|
|
@@ -141103,6 +142056,17 @@ var HmActuatorDevice = class extends HmChildDevice {
|
|
|
141103
142056
|
}
|
|
141104
142057
|
}
|
|
141105
142058
|
}
|
|
142059
|
+
/**
|
|
142060
|
+
* Heat demand has two sources: the floor relay's `STATE` (BWTH `:8`) and a
|
|
142061
|
+
* radiator valve's `LEVEL`. A device with a floor relay takes its demand from
|
|
142062
|
+
* there only, so a `LEVEL` it also carries cannot contradict it.
|
|
142063
|
+
*/
|
|
142064
|
+
decodeClimateEvent(prev, event, now, offC) {
|
|
142065
|
+
const { parameter, value } = event;
|
|
142066
|
+
if (this.isFloorDirectState(event)) return decodeClimateDemand(prev, "floor-direct-state", value, now);
|
|
142067
|
+
if (parameter === "LEVEL" && !this.hasFloorDirectChannel()) return decodeClimateDemand(prev, "valve-level", value, now);
|
|
142068
|
+
return decodeClimate(prev, parameter, value, now, offC);
|
|
142069
|
+
}
|
|
141106
142070
|
applyCover(parameter, value, now, origin) {
|
|
141107
142071
|
const prev = this.runtimeState.getCapState("cover") ?? COLD_COVER;
|
|
141108
142072
|
const next = decodeCover(prev, parameter, value, now);
|
|
@@ -141160,19 +142124,15 @@ var COLD_AMBIENT_LIGHT = {
|
|
|
141160
142124
|
var COLD_POWER = { lastFetchedAt: 0 };
|
|
141161
142125
|
function registerTemperatureCap(ctx, runtimeState) {
|
|
141162
142126
|
ctx.registerNativeCap(temperatureSensorCapability, { getStatus: async () => runtimeState.getCapState("temperature-sensor") ?? COLD_TEMPERATURE });
|
|
141163
|
-
runtimeState.setCapState("temperature-sensor", COLD_TEMPERATURE);
|
|
141164
142127
|
}
|
|
141165
142128
|
function registerHumidityCap(ctx, runtimeState) {
|
|
141166
142129
|
ctx.registerNativeCap(humiditySensorCapability, { getStatus: async () => runtimeState.getCapState("humidity-sensor") ?? COLD_HUMIDITY });
|
|
141167
|
-
runtimeState.setCapState("humidity-sensor", COLD_HUMIDITY);
|
|
141168
142130
|
}
|
|
141169
142131
|
function registerAmbientLightCap(ctx, runtimeState) {
|
|
141170
142132
|
ctx.registerNativeCap(ambientLightSensorCapability, { getStatus: async () => runtimeState.getCapState("ambient-light-sensor") ?? COLD_AMBIENT_LIGHT });
|
|
141171
|
-
runtimeState.setCapState("ambient-light-sensor", COLD_AMBIENT_LIGHT);
|
|
141172
142133
|
}
|
|
141173
142134
|
function registerPowerMeterCap(ctx, runtimeState) {
|
|
141174
142135
|
ctx.registerNativeCap(powerMeterCapability, { getStatus: async () => runtimeState.getCapState("power-meter") ?? COLD_POWER });
|
|
141175
|
-
runtimeState.setCapState("power-meter", COLD_POWER);
|
|
141176
142136
|
}
|
|
141177
142137
|
//#endregion
|
|
141178
142138
|
//#region src/devices/hm-sensor-device.ts
|
|
@@ -141228,7 +142188,6 @@ var HmSensorDevice = class extends HmChildDevice {
|
|
|
141228
142188
|
getStatus: async () => this.runtimeState.getCapState("motion") ?? COLD_MOTION,
|
|
141229
142189
|
isDetected: async () => (this.runtimeState.getCapState("motion") ?? COLD_MOTION).detected
|
|
141230
142190
|
});
|
|
141231
|
-
this.runtimeState.setCapState("motion", coldMotionKeepingRise(this.runtimeState.getCapState("motion")));
|
|
141232
142191
|
}
|
|
141233
142192
|
handleValueChanged(event, origin) {
|
|
141234
142193
|
const now = event.ts || Date.now();
|
|
@@ -141685,16 +142644,13 @@ var HmDiagnosticDevice = class extends HmChildDevice {
|
|
|
141685
142644
|
switch (this.capName) {
|
|
141686
142645
|
case "binary":
|
|
141687
142646
|
this.ctx.registerNativeCap(binaryCapability, { getStatus: async () => this.runtimeState.getCapState("binary") ?? COLD_BINARY });
|
|
141688
|
-
this.runtimeState.setCapState("binary", COLD_BINARY);
|
|
141689
142647
|
return;
|
|
141690
142648
|
case "temperature-sensor":
|
|
141691
142649
|
this.ctx.registerNativeCap(temperatureSensorCapability, { getStatus: async () => this.runtimeState.getCapState("temperature-sensor") ?? COLD_TEMP });
|
|
141692
|
-
this.runtimeState.setCapState("temperature-sensor", COLD_TEMP);
|
|
141693
142650
|
return;
|
|
141694
142651
|
default: {
|
|
141695
142652
|
const cold = COLD_NUMERIC;
|
|
141696
142653
|
this.ctx.registerNativeCap(numericSensorCapability, { getStatus: async () => this.runtimeState.getCapState("numeric-sensor") ?? cold });
|
|
141697
|
-
this.runtimeState.setCapState("numeric-sensor", cold);
|
|
141698
142654
|
return;
|
|
141699
142655
|
}
|
|
141700
142656
|
}
|