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