@camstack/addon-provider-bosch 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-integration-offline-Ciq9CZa-.mjs → account-integration-offline-34gaYDfb.mjs} +1 -1
- package/dist/{account-integration-offline-CEg0JOfN.js → account-integration-offline-DZLHsBZF.js} +1 -1
- package/dist/{dist-CFPbdUpa.js → dist-CRlugVId.js} +441 -31
- package/dist/{dist-D9i3id5N.mjs → dist-DGlq0nuG.mjs} +436 -32
- package/dist/home-connect/addon.js +8 -17
- package/dist/home-connect/addon.mjs +8 -17
- package/dist/homecom/addon.js +2 -2
- package/dist/homecom/addon.mjs +2 -2
- package/dist/shc/addon.js +1 -1
- package/dist/shc/addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -8841,7 +8841,7 @@ function errMsg(err) {
|
|
|
8841
8841
|
return String(err);
|
|
8842
8842
|
}
|
|
8843
8843
|
//#endregion
|
|
8844
|
-
//#region ../types/dist/composition-
|
|
8844
|
+
//#region ../types/dist/composition-BJ8iAZb3.mjs
|
|
8845
8845
|
/**
|
|
8846
8846
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
8847
8847
|
*
|
|
@@ -8901,7 +8901,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
|
|
|
8901
8901
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
8902
8902
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
8903
8903
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
8904
|
-
* the sources of a
|
|
8904
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
8905
8905
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
8906
8906
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
8907
8907
|
*
|
|
@@ -54356,20 +54356,68 @@ var BatteryStatusSchema = object({
|
|
|
54356
54356
|
*/
|
|
54357
54357
|
binary: boolean().optional()
|
|
54358
54358
|
});
|
|
54359
|
+
var BATTERY_DEVICE_TYPES = [
|
|
54360
|
+
DeviceType.Camera,
|
|
54361
|
+
DeviceType.Sensor,
|
|
54362
|
+
DeviceType.Button,
|
|
54363
|
+
DeviceType.Switch,
|
|
54364
|
+
DeviceType.PetFeeder,
|
|
54365
|
+
DeviceType.Container,
|
|
54366
|
+
DeviceType.Thermostat
|
|
54367
|
+
];
|
|
54368
|
+
/** Generic Customize target for the percentage reading (D936). */
|
|
54369
|
+
var batteryCustomize = {
|
|
54370
|
+
version: 1,
|
|
54371
|
+
targets: [{
|
|
54372
|
+
id: "percentage",
|
|
54373
|
+
cardinality: "scalar",
|
|
54374
|
+
vocabulary: {
|
|
54375
|
+
cap: "battery",
|
|
54376
|
+
stateField: "percentage"
|
|
54377
|
+
},
|
|
54378
|
+
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
54379
|
+
apply: "add-or-replace",
|
|
54380
|
+
path: "percentage",
|
|
54381
|
+
sources: [{
|
|
54382
|
+
kind: "field",
|
|
54383
|
+
valueKinds: ["number", "string"],
|
|
54384
|
+
transforms: [{ kind: "identity" }, {
|
|
54385
|
+
kind: "linear",
|
|
54386
|
+
defaultScale: 1,
|
|
54387
|
+
defaultOffset: 0,
|
|
54388
|
+
clampMin: 0,
|
|
54389
|
+
clampMax: 100
|
|
54390
|
+
}]
|
|
54391
|
+
}],
|
|
54392
|
+
companions: [
|
|
54393
|
+
{
|
|
54394
|
+
kind: "constant",
|
|
54395
|
+
path: "charging",
|
|
54396
|
+
value: "unknown",
|
|
54397
|
+
when: "add"
|
|
54398
|
+
},
|
|
54399
|
+
{
|
|
54400
|
+
kind: "constant",
|
|
54401
|
+
path: "sleeping",
|
|
54402
|
+
value: false,
|
|
54403
|
+
when: "add"
|
|
54404
|
+
},
|
|
54405
|
+
{
|
|
54406
|
+
kind: "clock",
|
|
54407
|
+
path: "lastUpdated",
|
|
54408
|
+
when: "add"
|
|
54409
|
+
}
|
|
54410
|
+
],
|
|
54411
|
+
sourceReport: { status: "assignment-status" },
|
|
54412
|
+
advancedExpression: true
|
|
54413
|
+
}]
|
|
54414
|
+
};
|
|
54359
54415
|
var batteryCapability = {
|
|
54360
54416
|
name: "battery",
|
|
54361
54417
|
scope: "device",
|
|
54362
54418
|
deviceNative: true,
|
|
54363
54419
|
mode: "singleton",
|
|
54364
|
-
deviceTypes:
|
|
54365
|
-
DeviceType.Camera,
|
|
54366
|
-
DeviceType.Sensor,
|
|
54367
|
-
DeviceType.Button,
|
|
54368
|
-
DeviceType.Switch,
|
|
54369
|
-
DeviceType.PetFeeder,
|
|
54370
|
-
DeviceType.Container,
|
|
54371
|
-
DeviceType.Thermostat
|
|
54372
|
-
],
|
|
54420
|
+
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
54373
54421
|
methods: {
|
|
54374
54422
|
/**
|
|
54375
54423
|
* Explicitly wake the camera from low-power sleep ahead of a
|
|
@@ -54453,6 +54501,7 @@ onStatusChanged: { data: object({
|
|
|
54453
54501
|
kind: "gauge",
|
|
54454
54502
|
unit: "%"
|
|
54455
54503
|
} } },
|
|
54504
|
+
customize: batteryCustomize,
|
|
54456
54505
|
/** Clock fields: written, but excluded from the compare that decides
|
|
54457
54506
|
* whether persisting is worth a SQLite commit. */
|
|
54458
54507
|
volatileStateFields: ["lastUpdated"]
|
|
@@ -55421,6 +55470,106 @@ var ConsumablesStatusSchema = object({
|
|
|
55421
55470
|
items: array(ConsumableItemSchema),
|
|
55422
55471
|
lastChangedAt: number()
|
|
55423
55472
|
});
|
|
55473
|
+
/** Synthesize seed for a link-built status (no native provider).
|
|
55474
|
+
*
|
|
55475
|
+
* ⚠ NO LIVE CALLER since 2026-08-08 (device-links deleted; see
|
|
55476
|
+
* `CapabilityStatusSchema.empty`). The wiring guidance below was written for
|
|
55477
|
+
* exactly the case the operator is asking about again — a Dreame's HA
|
|
55478
|
+
* consumable-life sensors — so it is kept for that conversation, not because
|
|
55479
|
+
* anything reads it today. */
|
|
55480
|
+
var EMPTY_STATUS = {
|
|
55481
|
+
items: [],
|
|
55482
|
+
lastChangedAt: 0
|
|
55483
|
+
};
|
|
55484
|
+
/** Seed for a NEW link-built consumable item. `key`/`label` are overwritten
|
|
55485
|
+
* with the link's `itemKey` (see `status.itemArray`), so the placeholder
|
|
55486
|
+
* empty strings never survive into a validated item. Link-built items are
|
|
55487
|
+
* not resettable — there is no native provider to receive `reset()`.
|
|
55488
|
+
*
|
|
55489
|
+
* Wiring guidance (HA vacuum consumable-life sensors):
|
|
55490
|
+
* - a percent-remaining source (`numeric-sensor`, unit '%') → `level` via
|
|
55491
|
+
* `identity` (or `linear` scale 1 offset 0 clamp [0,100] to be safe);
|
|
55492
|
+
* - an hours-remaining source (e.g. Dreame 'Main Brush Time Left', unit 'h')
|
|
55493
|
+
* → `level` via `linear` with scale = 100 / max-hours for that item
|
|
55494
|
+
* (e.g. main brush 300 h → scale 0.3333) + clamp [0,100];
|
|
55495
|
+
* - a discrete source (`enum-sensor`, e.g. mop pad 'installed') → `status`
|
|
55496
|
+
* via `enum-map` (e.g. { installed: 'ok', missing: 'replace' }).
|
|
55497
|
+
* A numeric→'replace' THRESHOLD (level < 10 → 'replace') is NOT expressible
|
|
55498
|
+
* with the current transform kinds — leave `status` null (valid) until the
|
|
55499
|
+
* expression transform lands. */
|
|
55500
|
+
/** Generic Customize target for one consumable item (D936). Native rows stay read-only. */
|
|
55501
|
+
var consumablesCustomize = {
|
|
55502
|
+
version: 1,
|
|
55503
|
+
targets: [{
|
|
55504
|
+
id: "items",
|
|
55505
|
+
cardinality: "keyedArray",
|
|
55506
|
+
vocabulary: { cap: "consumables" },
|
|
55507
|
+
deviceTypes: Object.values(DeviceType),
|
|
55508
|
+
apply: "add",
|
|
55509
|
+
path: "items",
|
|
55510
|
+
keyField: "key",
|
|
55511
|
+
labelField: "label",
|
|
55512
|
+
itemSchema: ConsumableItemSchema,
|
|
55513
|
+
nativeItems: "read-only",
|
|
55514
|
+
sourceReport: { status: "assignment-status" },
|
|
55515
|
+
fields: [
|
|
55516
|
+
{
|
|
55517
|
+
path: "level",
|
|
55518
|
+
sources: [{
|
|
55519
|
+
kind: "numeric",
|
|
55520
|
+
transforms: [{ kind: "identity" }, {
|
|
55521
|
+
kind: "linear",
|
|
55522
|
+
defaultScale: 1,
|
|
55523
|
+
defaultOffset: 0,
|
|
55524
|
+
clampMin: 0,
|
|
55525
|
+
clampMax: 100
|
|
55526
|
+
}]
|
|
55527
|
+
}]
|
|
55528
|
+
},
|
|
55529
|
+
{
|
|
55530
|
+
path: "remaining.value",
|
|
55531
|
+
sources: [{
|
|
55532
|
+
kind: "numeric",
|
|
55533
|
+
transforms: [{ kind: "identity" }]
|
|
55534
|
+
}],
|
|
55535
|
+
literals: [{
|
|
55536
|
+
path: "remaining.unit",
|
|
55537
|
+
values: [...ConsumableRemainingUnitSchema.options]
|
|
55538
|
+
}]
|
|
55539
|
+
},
|
|
55540
|
+
{
|
|
55541
|
+
path: "status",
|
|
55542
|
+
sources: [{
|
|
55543
|
+
kind: "enum",
|
|
55544
|
+
transforms: [{
|
|
55545
|
+
kind: "enum-map",
|
|
55546
|
+
outputValues: [...ConsumableStatusSchema.options],
|
|
55547
|
+
unmapped: null
|
|
55548
|
+
}]
|
|
55549
|
+
}]
|
|
55550
|
+
}
|
|
55551
|
+
],
|
|
55552
|
+
traits: [{
|
|
55553
|
+
path: "kind",
|
|
55554
|
+
values: [...ConsumableKindSchema.options],
|
|
55555
|
+
defaultValue: "wear"
|
|
55556
|
+
}, {
|
|
55557
|
+
path: "form",
|
|
55558
|
+
values: [...ConsumableFormSchema.options],
|
|
55559
|
+
defaultValue: "part"
|
|
55560
|
+
}],
|
|
55561
|
+
companions: [{
|
|
55562
|
+
kind: "clock",
|
|
55563
|
+
path: "lastChangedAt",
|
|
55564
|
+
when: "add"
|
|
55565
|
+
}, {
|
|
55566
|
+
kind: "clock",
|
|
55567
|
+
path: "lastFetchedAt",
|
|
55568
|
+
when: "add"
|
|
55569
|
+
}],
|
|
55570
|
+
advancedExpression: true
|
|
55571
|
+
}]
|
|
55572
|
+
};
|
|
55424
55573
|
var consumablesCapability = {
|
|
55425
55574
|
name: "consumables",
|
|
55426
55575
|
scope: "device",
|
|
@@ -55458,10 +55607,7 @@ reset: method(object({
|
|
|
55458
55607
|
status: {
|
|
55459
55608
|
schema: ConsumablesStatusSchema,
|
|
55460
55609
|
kind: "push",
|
|
55461
|
-
empty:
|
|
55462
|
-
items: [],
|
|
55463
|
-
lastChangedAt: 0
|
|
55464
|
-
},
|
|
55610
|
+
empty: EMPTY_STATUS,
|
|
55465
55611
|
itemArray: {
|
|
55466
55612
|
path: "items",
|
|
55467
55613
|
keyField: "key",
|
|
@@ -55497,6 +55643,7 @@ reset: method(object({
|
|
|
55497
55643
|
* brush's remaining life and a dishwasher's salt are each recorded the moment
|
|
55498
55644
|
* their provider reports them; an item that appears later gets its series.
|
|
55499
55645
|
*/
|
|
55646
|
+
customize: consumablesCustomize,
|
|
55500
55647
|
history: {
|
|
55501
55648
|
fields: {},
|
|
55502
55649
|
items: {
|
|
@@ -56239,6 +56386,36 @@ var dishwasherCapability = {
|
|
|
56239
56386
|
powerOn: { kind: "boolean" }
|
|
56240
56387
|
} }
|
|
56241
56388
|
};
|
|
56389
|
+
/** Pulse override: a rising edge advances `lastPressedAt` and the press count. */
|
|
56390
|
+
var doorbellCustomize = {
|
|
56391
|
+
version: 1,
|
|
56392
|
+
targets: [{
|
|
56393
|
+
id: "pressed",
|
|
56394
|
+
cardinality: "event",
|
|
56395
|
+
shape: "pulse",
|
|
56396
|
+
vocabulary: {
|
|
56397
|
+
cap: "doorbell",
|
|
56398
|
+
eventName: "onPressed"
|
|
56399
|
+
},
|
|
56400
|
+
deviceTypes: [DeviceType.Camera],
|
|
56401
|
+
apply: "add",
|
|
56402
|
+
applyAuthority: { kind: "composition-claim" },
|
|
56403
|
+
eventName: "onPressed",
|
|
56404
|
+
edges: ["rising"],
|
|
56405
|
+
timestampPath: "lastPressedAt",
|
|
56406
|
+
counterPath: "pressCountSinceStart",
|
|
56407
|
+
highWater: "composer-advance",
|
|
56408
|
+
combine: "any",
|
|
56409
|
+
debounce: {
|
|
56410
|
+
kind: "rising-edge",
|
|
56411
|
+
defaultDebounceMs: 2e3,
|
|
56412
|
+
changedAtRequired: true
|
|
56413
|
+
},
|
|
56414
|
+
sources: [{ kind: "binary" }, { kind: "switch" }],
|
|
56415
|
+
sourceReport: { status: "assignment-status" },
|
|
56416
|
+
advancedExpression: true
|
|
56417
|
+
}]
|
|
56418
|
+
};
|
|
56242
56419
|
var DoorbellStatusSchema = object({
|
|
56243
56420
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
56244
56421
|
lastPressedAt: number().nullable(),
|
|
@@ -56305,7 +56482,8 @@ onPressed: {
|
|
|
56305
56482
|
/**
|
|
56306
56483
|
* History (D850): none — `pressCountSinceStart` resets with the addon, so it is not a monotonic meter; presses live in the events ledger.
|
|
56307
56484
|
*/
|
|
56308
|
-
history: "none"
|
|
56485
|
+
history: "none",
|
|
56486
|
+
customize: doorbellCustomize
|
|
56309
56487
|
};
|
|
56310
56488
|
/**
|
|
56311
56489
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -58701,6 +58879,38 @@ authKey: string().optional() }), object({
|
|
|
58701
58879
|
/** Human-readable error when `ok: false`. */
|
|
58702
58880
|
error: string().optional()
|
|
58703
58881
|
}), { kind: "mutation" });
|
|
58882
|
+
/** Span override: start on a rising edge, end on a fall or this timeout. */
|
|
58883
|
+
var motionCustomize = {
|
|
58884
|
+
version: 1,
|
|
58885
|
+
targets: [{
|
|
58886
|
+
id: "detected",
|
|
58887
|
+
cardinality: "event",
|
|
58888
|
+
shape: "span",
|
|
58889
|
+
vocabulary: {
|
|
58890
|
+
cap: "motion",
|
|
58891
|
+
eventName: "onMotionChanged"
|
|
58892
|
+
},
|
|
58893
|
+
deviceTypes: [DeviceType.Camera],
|
|
58894
|
+
apply: "replace",
|
|
58895
|
+
applyAuthority: {
|
|
58896
|
+
kind: "camera-sensors",
|
|
58897
|
+
timeoutField: "motionCooldownMs"
|
|
58898
|
+
},
|
|
58899
|
+
eventName: "onMotionChanged",
|
|
58900
|
+
start: "rising-edge",
|
|
58901
|
+
end: "falling-edge-or-timeout",
|
|
58902
|
+
timeoutMs: 3e4,
|
|
58903
|
+
combine: "any",
|
|
58904
|
+
sourceModes: [
|
|
58905
|
+
"in-addition",
|
|
58906
|
+
"confirm",
|
|
58907
|
+
"replace"
|
|
58908
|
+
],
|
|
58909
|
+
sources: [{ kind: "binary" }, { kind: "switch" }],
|
|
58910
|
+
sourceReport: { status: "assignment-status" },
|
|
58911
|
+
advancedExpression: false
|
|
58912
|
+
}]
|
|
58913
|
+
};
|
|
58704
58914
|
var MotionStatusSchema = object({
|
|
58705
58915
|
detected: boolean(),
|
|
58706
58916
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
@@ -58840,7 +59050,8 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
58840
59050
|
history: { fields: { detected: {
|
|
58841
59051
|
kind: "boolean",
|
|
58842
59052
|
excludeDeviceTypes: [DeviceType.Camera]
|
|
58843
|
-
} } }
|
|
59053
|
+
} } },
|
|
59054
|
+
customize: motionCustomize
|
|
58844
59055
|
};
|
|
58845
59056
|
/**
|
|
58846
59057
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -61566,6 +61777,16 @@ var ptzAutotrackCapability = {
|
|
|
61566
61777
|
*/
|
|
61567
61778
|
history: "none"
|
|
61568
61779
|
};
|
|
61780
|
+
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
61781
|
+
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
61782
|
+
/** Before any provider reading — all fields unknown (D933). */
|
|
61783
|
+
var RUNNING_STATE_COLD = {
|
|
61784
|
+
running: null,
|
|
61785
|
+
since: null,
|
|
61786
|
+
source: "native",
|
|
61787
|
+
phase: null,
|
|
61788
|
+
lastFetchedAt: null
|
|
61789
|
+
};
|
|
61569
61790
|
var RunningStateSourceSchema = _enum(["native", "assigned"]);
|
|
61570
61791
|
var RunningStateStatusSchema = object({
|
|
61571
61792
|
/** null = unknown — never coerced to false (D393). */
|
|
@@ -61574,19 +61795,100 @@ var RunningStateStatusSchema = object({
|
|
|
61574
61795
|
since: number().nullable(),
|
|
61575
61796
|
source: RunningStateSourceSchema,
|
|
61576
61797
|
phase: string().nullable(),
|
|
61577
|
-
|
|
61798
|
+
/** null until a reading has been published (D393). */
|
|
61799
|
+
lastFetchedAt: number().nullable()
|
|
61578
61800
|
});
|
|
61579
61801
|
var RunningFlipEventDataSchema = object({
|
|
61580
61802
|
deviceId: number(),
|
|
61581
61803
|
since: number().nullable(),
|
|
61582
61804
|
phase: string().nullable()
|
|
61583
61805
|
});
|
|
61806
|
+
var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
|
|
61807
|
+
/** Generic Customize target for the running boolean (D936). */
|
|
61808
|
+
var runningCustomize = {
|
|
61809
|
+
version: 1,
|
|
61810
|
+
targets: [{
|
|
61811
|
+
id: "running",
|
|
61812
|
+
cardinality: "scalar",
|
|
61813
|
+
vocabulary: {
|
|
61814
|
+
cap: "running-state",
|
|
61815
|
+
stateField: "running"
|
|
61816
|
+
},
|
|
61817
|
+
deviceTypes: [
|
|
61818
|
+
DeviceType.Dishwasher,
|
|
61819
|
+
DeviceType.Vacuum,
|
|
61820
|
+
DeviceType.LawnMower,
|
|
61821
|
+
DeviceType.MediaPlayer,
|
|
61822
|
+
DeviceType.WaterHeater,
|
|
61823
|
+
DeviceType.Humidifier,
|
|
61824
|
+
DeviceType.Fan,
|
|
61825
|
+
DeviceType.Climate,
|
|
61826
|
+
DeviceType.Thermostat,
|
|
61827
|
+
DeviceType.PetFeeder
|
|
61828
|
+
],
|
|
61829
|
+
apply: "add-or-replace",
|
|
61830
|
+
path: "running",
|
|
61831
|
+
sources: [
|
|
61832
|
+
{
|
|
61833
|
+
kind: "switch",
|
|
61834
|
+
transforms: [{ kind: "identity" }]
|
|
61835
|
+
},
|
|
61836
|
+
{
|
|
61837
|
+
kind: "binary",
|
|
61838
|
+
transforms: [{ kind: "identity" }, { kind: "invert" }]
|
|
61839
|
+
},
|
|
61840
|
+
{
|
|
61841
|
+
kind: "numeric",
|
|
61842
|
+
requiredUnit: "W",
|
|
61843
|
+
transforms: [{
|
|
61844
|
+
kind: "threshold",
|
|
61845
|
+
comparison: "gte",
|
|
61846
|
+
defaultThreshold: 5,
|
|
61847
|
+
defaultStartDwellMs: RUNNING_POWER_START_DELAY_MS,
|
|
61848
|
+
defaultStopDwellMs: RUNNING_POWER_STOP_DELAY_MS,
|
|
61849
|
+
thresholdUnit: "W"
|
|
61850
|
+
}]
|
|
61851
|
+
}
|
|
61852
|
+
],
|
|
61853
|
+
companions: [
|
|
61854
|
+
{
|
|
61855
|
+
kind: "constant",
|
|
61856
|
+
path: "source",
|
|
61857
|
+
value: "assigned",
|
|
61858
|
+
when: "always"
|
|
61859
|
+
},
|
|
61860
|
+
{
|
|
61861
|
+
kind: "constant",
|
|
61862
|
+
path: "phase",
|
|
61863
|
+
value: null,
|
|
61864
|
+
when: "always"
|
|
61865
|
+
},
|
|
61866
|
+
{
|
|
61867
|
+
kind: "clock",
|
|
61868
|
+
path: "lastFetchedAt",
|
|
61869
|
+
when: "always"
|
|
61870
|
+
},
|
|
61871
|
+
{
|
|
61872
|
+
kind: "transition-time",
|
|
61873
|
+
path: "since",
|
|
61874
|
+
sourceChangedAt: "prefer"
|
|
61875
|
+
}
|
|
61876
|
+
],
|
|
61877
|
+
sourceReport: {
|
|
61878
|
+
status: "assignment-status",
|
|
61879
|
+
runtimeField: "source",
|
|
61880
|
+
nativeValue: "native",
|
|
61881
|
+
assignedValue: "assigned"
|
|
61882
|
+
},
|
|
61883
|
+
advancedExpression: true
|
|
61884
|
+
}]
|
|
61885
|
+
};
|
|
61584
61886
|
var runningStateCapability = {
|
|
61585
61887
|
name: "running-state",
|
|
61586
61888
|
scope: "device",
|
|
61587
61889
|
deviceNative: true,
|
|
61588
61890
|
mode: "singleton",
|
|
61589
|
-
deviceTypes:
|
|
61891
|
+
deviceTypes: RUNNING_DEVICE_TYPES,
|
|
61590
61892
|
methods: {},
|
|
61591
61893
|
events: {
|
|
61592
61894
|
onStarted: { data: RunningFlipEventDataSchema },
|
|
@@ -61599,7 +61901,8 @@ var runningStateCapability = {
|
|
|
61599
61901
|
runtimeState: RunningStateStatusSchema,
|
|
61600
61902
|
durability: "restored",
|
|
61601
61903
|
history: { fields: { running: { kind: "boolean" } } },
|
|
61602
|
-
volatileStateFields: ["lastFetchedAt"]
|
|
61904
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
61905
|
+
customize: runningCustomize
|
|
61603
61906
|
};
|
|
61604
61907
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
61605
61908
|
kind: "mutation",
|
|
@@ -66231,25 +66534,36 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
66231
66534
|
kind: "mutation",
|
|
66232
66535
|
auth: "admin"
|
|
66233
66536
|
});
|
|
66234
|
-
function
|
|
66537
|
+
function programStartFromRemaining(running, remainingSeconds, fetchedAt) {
|
|
66538
|
+
if (!running || remainingSeconds === null || remainingSeconds === void 0) return null;
|
|
66539
|
+
if (remainingSeconds <= 0) return null;
|
|
66540
|
+
return fetchedAt - remainingSeconds * 1e3;
|
|
66541
|
+
}
|
|
66542
|
+
function resolveSince(running, previous, transitionAtMs, bootstrapSinceMs) {
|
|
66235
66543
|
if (running === null) return null;
|
|
66236
|
-
|
|
66237
|
-
|
|
66544
|
+
const prevRunning = previous?.running ?? null;
|
|
66545
|
+
if (prevRunning === null) return bootstrapSinceMs;
|
|
66546
|
+
if (prevRunning !== running) return transitionAtMs;
|
|
66547
|
+
return previous?.since ?? null;
|
|
66238
66548
|
}
|
|
66239
|
-
function nativeSlice(running, phase, previous,
|
|
66549
|
+
function nativeSlice(running, phase, previous, transitionAtMs, fetchedAt, bootstrapSinceMs) {
|
|
66240
66550
|
return {
|
|
66241
66551
|
running,
|
|
66242
|
-
since: resolveSince(running, previous,
|
|
66552
|
+
since: resolveSince(running, previous, transitionAtMs, bootstrapSinceMs),
|
|
66243
66553
|
source: "native",
|
|
66244
66554
|
phase: running === null ? null : phase,
|
|
66245
|
-
lastFetchedAt:
|
|
66555
|
+
lastFetchedAt: fetchedAt
|
|
66246
66556
|
};
|
|
66247
66557
|
}
|
|
66248
|
-
function runningFromDishwasherOperation(operation, program, previous,
|
|
66249
|
-
|
|
66250
|
-
if (operation ===
|
|
66251
|
-
if (operation === "
|
|
66252
|
-
|
|
66558
|
+
function runningFromDishwasherOperation(operation, program, previous, fetchedAt, remainingSeconds, transitionAt) {
|
|
66559
|
+
const transitionAtMs = transitionAt ?? fetchedAt;
|
|
66560
|
+
if (operation === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
|
|
66561
|
+
if (operation === "Run" || operation === "Aborting") {
|
|
66562
|
+
const bootstrap = programStartFromRemaining(true, remainingSeconds, fetchedAt);
|
|
66563
|
+
return nativeSlice(true, program ?? operation, previous, transitionAtMs, fetchedAt, bootstrap);
|
|
66564
|
+
}
|
|
66565
|
+
if (operation === "Pause") return nativeSlice(false, "Pause", previous, transitionAtMs, fetchedAt, null);
|
|
66566
|
+
return nativeSlice(false, operation, previous, transitionAtMs, fetchedAt, null);
|
|
66253
66567
|
}
|
|
66254
66568
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
66255
66569
|
Object.freeze({
|
|
@@ -84135,6 +84449,96 @@ Object.freeze({
|
|
|
84135
84449
|
"smtp-provider": "email"
|
|
84136
84450
|
});
|
|
84137
84451
|
DeviceType.Camera;
|
|
84452
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
84453
|
+
/**
|
|
84454
|
+
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
84455
|
+
* `z.infer`, they do not restate the shape.
|
|
84456
|
+
*/
|
|
84457
|
+
var OverrideSourceSchema = object({
|
|
84458
|
+
addonId: string().min(1),
|
|
84459
|
+
stableId: string().min(1),
|
|
84460
|
+
cap: string().min(1),
|
|
84461
|
+
fieldPath: string().min(1)
|
|
84462
|
+
});
|
|
84463
|
+
var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
|
|
84464
|
+
object({ kind: literal("identity") }),
|
|
84465
|
+
object({ kind: literal("invert") }),
|
|
84466
|
+
object({
|
|
84467
|
+
kind: literal("threshold"),
|
|
84468
|
+
comparison: _enum(["gte", "lte"]),
|
|
84469
|
+
threshold: number(),
|
|
84470
|
+
startDwellMs: number().nonnegative(),
|
|
84471
|
+
stopDwellMs: number().nonnegative()
|
|
84472
|
+
}),
|
|
84473
|
+
object({
|
|
84474
|
+
kind: literal("linear"),
|
|
84475
|
+
scale: number(),
|
|
84476
|
+
offset: number(),
|
|
84477
|
+
clampMin: number().optional(),
|
|
84478
|
+
clampMax: number().optional()
|
|
84479
|
+
}),
|
|
84480
|
+
object({
|
|
84481
|
+
kind: literal("enum-map"),
|
|
84482
|
+
mapping: record(string(), string().nullable())
|
|
84483
|
+
}),
|
|
84484
|
+
object({ kind: literal("number") })
|
|
84485
|
+
]);
|
|
84486
|
+
var ScalarOverrideDraftSchema = object({
|
|
84487
|
+
kind: literal("scalar"),
|
|
84488
|
+
cap: string().min(1),
|
|
84489
|
+
targetId: string().min(1),
|
|
84490
|
+
source: OverrideSourceSchema,
|
|
84491
|
+
transform: CustomizeTransformDraftSchema
|
|
84492
|
+
});
|
|
84493
|
+
var KeyedArrayOverrideDraftSchema = object({
|
|
84494
|
+
kind: literal("keyedArray"),
|
|
84495
|
+
cap: string().min(1),
|
|
84496
|
+
targetId: string().min(1),
|
|
84497
|
+
key: string().min(1),
|
|
84498
|
+
label: string().min(1),
|
|
84499
|
+
fieldPath: string().min(1),
|
|
84500
|
+
source: OverrideSourceSchema,
|
|
84501
|
+
transform: CustomizeTransformDraftSchema
|
|
84502
|
+
});
|
|
84503
|
+
var PulseOverrideDraftSchema = object({
|
|
84504
|
+
kind: literal("pulse"),
|
|
84505
|
+
cap: string().min(1),
|
|
84506
|
+
targetId: string().min(1),
|
|
84507
|
+
enabled: boolean(),
|
|
84508
|
+
debounceMs: number().nonnegative(),
|
|
84509
|
+
sources: array(OverrideSourceSchema).min(1)
|
|
84510
|
+
});
|
|
84511
|
+
var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
|
|
84512
|
+
"in-addition",
|
|
84513
|
+
"confirm",
|
|
84514
|
+
"replace"
|
|
84515
|
+
]).optional() });
|
|
84516
|
+
discriminatedUnion("kind", [
|
|
84517
|
+
ScalarOverrideDraftSchema,
|
|
84518
|
+
KeyedArrayOverrideDraftSchema,
|
|
84519
|
+
PulseOverrideDraftSchema,
|
|
84520
|
+
object({
|
|
84521
|
+
kind: literal("span"),
|
|
84522
|
+
cap: string().min(1),
|
|
84523
|
+
targetId: string().min(1),
|
|
84524
|
+
timeoutMs: number().nonnegative(),
|
|
84525
|
+
cooldownMs: number().nonnegative().optional(),
|
|
84526
|
+
sources: array(SpanSourceDraftSchema)
|
|
84527
|
+
})
|
|
84528
|
+
]);
|
|
84529
|
+
object({
|
|
84530
|
+
targetId: string().min(1),
|
|
84531
|
+
configured: boolean(),
|
|
84532
|
+
source: _enum(["native", "assigned"]),
|
|
84533
|
+
state: _enum([
|
|
84534
|
+
"active",
|
|
84535
|
+
"stale",
|
|
84536
|
+
"released",
|
|
84537
|
+
"unavailable"
|
|
84538
|
+
]),
|
|
84539
|
+
reason: string().nullable()
|
|
84540
|
+
});
|
|
84541
|
+
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
84138
84542
|
var G711_SCALE_CORRECTION_DB = {
|
|
84139
84543
|
PCMU: 20 * Math.log10(4),
|
|
84140
84544
|
PCMA: 20 * Math.log10(8)
|
|
@@ -85329,4 +85733,4 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
|
85329
85733
|
var MB = 1024 * 1024;
|
|
85330
85734
|
1024 * MB, 3072 * MB;
|
|
85331
85735
|
//#endregion
|
|
85332
|
-
export {
|
|
85736
|
+
export { _enum as A, DeviceType as C, defineCustomActions as D, customAction as E, record as F, string as I, union as L, literal as M, number as N, isSecretMarker as O, object as P, unknown as R, DeviceRole as S, createEvent as T, runningFromDishwasherOperation as _, batteryCapability as a, temperatureSensorCapability as b, connectionTestCapability as c, dishwasherCapability as d, enumSensorCapability as f, powerMeterCapability as g, numericSensorCapability as h, RUNNING_STATE_COLD as i, array as j, isSecretMarkerLike as k, consumablesCapability as l, heatingValveCapability as m, BaseDeviceProvider as n, binaryCapability as o, eventEmitterCapability as p, DishwasherOperationStateSchema as r, climateControlCapability as s, BaseDevice as t, deviceAdoptionCapability as u, runningStateCapability as v, errMsg as w, waterHeaterCapability as x, switchCapability as y, EventCategory as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../dist-
|
|
3
|
-
const require_account_integration_offline = require("../account-integration-offline-
|
|
2
|
+
const require_dist = require("../dist-CRlugVId.js");
|
|
3
|
+
const require_account_integration_offline = require("../account-integration-offline-DZLHsBZF.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
let node_tls = require("node:tls");
|
|
6
6
|
let node_zlib = require("node:zlib");
|
|
@@ -4622,13 +4622,6 @@ var homeConnectDishwasherSchema = require_dist.object({
|
|
|
4622
4622
|
var DISH_CAP = "dishwasher";
|
|
4623
4623
|
var CONSUMABLES_CAP = "consumables";
|
|
4624
4624
|
var RUNNING_CAP = "running-state";
|
|
4625
|
-
var RUNNING_COLD = {
|
|
4626
|
-
running: null,
|
|
4627
|
-
since: null,
|
|
4628
|
-
source: "native",
|
|
4629
|
-
phase: null,
|
|
4630
|
-
lastFetchedAt: 0
|
|
4631
|
-
};
|
|
4632
4625
|
var CONSUMABLES_EMPTY = {
|
|
4633
4626
|
items: [],
|
|
4634
4627
|
lastChangedAt: 0,
|
|
@@ -4666,10 +4659,7 @@ var HomeConnectDishwasherDevice = class extends require_dist.BaseDevice {
|
|
|
4666
4659
|
this.registerConsumablesCap();
|
|
4667
4660
|
this.registerRunningCap();
|
|
4668
4661
|
this.runtimeState.setCapState(DISH_CAP, COLD_DISHWASHER_STATUS);
|
|
4669
|
-
this.runtimeState.setCapState(RUNNING_CAP,
|
|
4670
|
-
...RUNNING_COLD,
|
|
4671
|
-
lastFetchedAt: Date.now()
|
|
4672
|
-
});
|
|
4662
|
+
this.runtimeState.setCapState(RUNNING_CAP, require_dist.RUNNING_STATE_COLD);
|
|
4673
4663
|
this.markOnline(false);
|
|
4674
4664
|
this.#unwatch = homeConnectConnections.watch(this.#brokerId, this.#haId, (event) => this.recomputeSlice(event));
|
|
4675
4665
|
this.recomputeSlice({ kind: "client" });
|
|
@@ -4699,7 +4689,7 @@ var HomeConnectDishwasherDevice = class extends require_dist.BaseDevice {
|
|
|
4699
4689
|
lastValueAt
|
|
4700
4690
|
});
|
|
4701
4691
|
this.runtimeState.setCapState(DISH_CAP, slice);
|
|
4702
|
-
this.publishRunningSlice(slice
|
|
4692
|
+
this.publishRunningSlice(slice);
|
|
4703
4693
|
this.writeConsumables(dishwasherConsumablesFromFeatures(view));
|
|
4704
4694
|
this.markOnline(slice.availability !== "offline");
|
|
4705
4695
|
}
|
|
@@ -4803,11 +4793,12 @@ var HomeConnectDishwasherDevice = class extends require_dist.BaseDevice {
|
|
|
4803
4793
|
});
|
|
4804
4794
|
}
|
|
4805
4795
|
registerRunningCap() {
|
|
4806
|
-
this.ctx.registerNativeCap(require_dist.runningStateCapability, { getStatus: async () => this.runtimeState.getCapState(RUNNING_CAP) ??
|
|
4796
|
+
this.ctx.registerNativeCap(require_dist.runningStateCapability, { getStatus: async () => this.runtimeState.getCapState(RUNNING_CAP) ?? require_dist.RUNNING_STATE_COLD });
|
|
4807
4797
|
}
|
|
4808
|
-
publishRunningSlice(slice
|
|
4798
|
+
publishRunningSlice(slice) {
|
|
4799
|
+
const fetchedAt = Date.now();
|
|
4809
4800
|
const previous = this.runtimeState.getCapState(RUNNING_CAP);
|
|
4810
|
-
const next = require_dist.runningFromDishwasherOperation(slice.operationState, slice.program, previous,
|
|
4801
|
+
const next = require_dist.runningFromDishwasherOperation(slice.operationState, slice.program, previous, fetchedAt, slice.remainingSeconds);
|
|
4811
4802
|
this.runtimeState.setCapState(RUNNING_CAP, next);
|
|
4812
4803
|
}
|
|
4813
4804
|
};
|