@camstack/addon-provider-homeassistant 1.2.621 → 1.2.622
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +13 -40
- package/dist/addon.mjs +13 -40
- package/dist/{dist-DdSdlgON.js → dist-33tQA0eu.js} +445 -41
- package/dist/{dist-BvE3GGAV.mjs → dist-C6zA8__P.mjs} +440 -42
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -9195,7 +9195,7 @@ function errMsg(err) {
|
|
|
9195
9195
|
return String(err);
|
|
9196
9196
|
}
|
|
9197
9197
|
//#endregion
|
|
9198
|
-
//#region ../types/dist/composition-
|
|
9198
|
+
//#region ../types/dist/composition-BJ8iAZb3.mjs
|
|
9199
9199
|
/**
|
|
9200
9200
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
9201
9201
|
*
|
|
@@ -9255,7 +9255,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
|
|
|
9255
9255
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
9256
9256
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
9257
9257
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
9258
|
-
* the sources of a
|
|
9258
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
9259
9259
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
9260
9260
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
9261
9261
|
*
|
|
@@ -55249,20 +55249,68 @@ var BatteryStatusSchema = object({
|
|
|
55249
55249
|
*/
|
|
55250
55250
|
binary: boolean().optional()
|
|
55251
55251
|
});
|
|
55252
|
+
var BATTERY_DEVICE_TYPES = [
|
|
55253
|
+
DeviceType.Camera,
|
|
55254
|
+
DeviceType.Sensor,
|
|
55255
|
+
DeviceType.Button,
|
|
55256
|
+
DeviceType.Switch,
|
|
55257
|
+
DeviceType.PetFeeder,
|
|
55258
|
+
DeviceType.Container,
|
|
55259
|
+
DeviceType.Thermostat
|
|
55260
|
+
];
|
|
55261
|
+
/** Generic Customize target for the percentage reading (D936). */
|
|
55262
|
+
var batteryCustomize = {
|
|
55263
|
+
version: 1,
|
|
55264
|
+
targets: [{
|
|
55265
|
+
id: "percentage",
|
|
55266
|
+
cardinality: "scalar",
|
|
55267
|
+
vocabulary: {
|
|
55268
|
+
cap: "battery",
|
|
55269
|
+
stateField: "percentage"
|
|
55270
|
+
},
|
|
55271
|
+
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
55272
|
+
apply: "add-or-replace",
|
|
55273
|
+
path: "percentage",
|
|
55274
|
+
sources: [{
|
|
55275
|
+
kind: "field",
|
|
55276
|
+
valueKinds: ["number", "string"],
|
|
55277
|
+
transforms: [{ kind: "identity" }, {
|
|
55278
|
+
kind: "linear",
|
|
55279
|
+
defaultScale: 1,
|
|
55280
|
+
defaultOffset: 0,
|
|
55281
|
+
clampMin: 0,
|
|
55282
|
+
clampMax: 100
|
|
55283
|
+
}]
|
|
55284
|
+
}],
|
|
55285
|
+
companions: [
|
|
55286
|
+
{
|
|
55287
|
+
kind: "constant",
|
|
55288
|
+
path: "charging",
|
|
55289
|
+
value: "unknown",
|
|
55290
|
+
when: "add"
|
|
55291
|
+
},
|
|
55292
|
+
{
|
|
55293
|
+
kind: "constant",
|
|
55294
|
+
path: "sleeping",
|
|
55295
|
+
value: false,
|
|
55296
|
+
when: "add"
|
|
55297
|
+
},
|
|
55298
|
+
{
|
|
55299
|
+
kind: "clock",
|
|
55300
|
+
path: "lastUpdated",
|
|
55301
|
+
when: "add"
|
|
55302
|
+
}
|
|
55303
|
+
],
|
|
55304
|
+
sourceReport: { status: "assignment-status" },
|
|
55305
|
+
advancedExpression: true
|
|
55306
|
+
}]
|
|
55307
|
+
};
|
|
55252
55308
|
var batteryCapability = {
|
|
55253
55309
|
name: "battery",
|
|
55254
55310
|
scope: "device",
|
|
55255
55311
|
deviceNative: true,
|
|
55256
55312
|
mode: "singleton",
|
|
55257
|
-
deviceTypes:
|
|
55258
|
-
DeviceType.Camera,
|
|
55259
|
-
DeviceType.Sensor,
|
|
55260
|
-
DeviceType.Button,
|
|
55261
|
-
DeviceType.Switch,
|
|
55262
|
-
DeviceType.PetFeeder,
|
|
55263
|
-
DeviceType.Container,
|
|
55264
|
-
DeviceType.Thermostat
|
|
55265
|
-
],
|
|
55313
|
+
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
55266
55314
|
methods: {
|
|
55267
55315
|
/**
|
|
55268
55316
|
* Explicitly wake the camera from low-power sleep ahead of a
|
|
@@ -55346,6 +55394,7 @@ onStatusChanged: { data: object({
|
|
|
55346
55394
|
kind: "gauge",
|
|
55347
55395
|
unit: "%"
|
|
55348
55396
|
} } },
|
|
55397
|
+
customize: batteryCustomize,
|
|
55349
55398
|
/** Clock fields: written, but excluded from the compare that decides
|
|
55350
55399
|
* whether persisting is worth a SQLite commit. */
|
|
55351
55400
|
volatileStateFields: ["lastUpdated"]
|
|
@@ -56347,6 +56396,106 @@ var ConsumablesStatusSchema = object({
|
|
|
56347
56396
|
items: array(ConsumableItemSchema),
|
|
56348
56397
|
lastChangedAt: number()
|
|
56349
56398
|
});
|
|
56399
|
+
/** Synthesize seed for a link-built status (no native provider).
|
|
56400
|
+
*
|
|
56401
|
+
* ⚠ NO LIVE CALLER since 2026-08-08 (device-links deleted; see
|
|
56402
|
+
* `CapabilityStatusSchema.empty`). The wiring guidance below was written for
|
|
56403
|
+
* exactly the case the operator is asking about again — a Dreame's HA
|
|
56404
|
+
* consumable-life sensors — so it is kept for that conversation, not because
|
|
56405
|
+
* anything reads it today. */
|
|
56406
|
+
var EMPTY_STATUS = {
|
|
56407
|
+
items: [],
|
|
56408
|
+
lastChangedAt: 0
|
|
56409
|
+
};
|
|
56410
|
+
/** Seed for a NEW link-built consumable item. `key`/`label` are overwritten
|
|
56411
|
+
* with the link's `itemKey` (see `status.itemArray`), so the placeholder
|
|
56412
|
+
* empty strings never survive into a validated item. Link-built items are
|
|
56413
|
+
* not resettable — there is no native provider to receive `reset()`.
|
|
56414
|
+
*
|
|
56415
|
+
* Wiring guidance (HA vacuum consumable-life sensors):
|
|
56416
|
+
* - a percent-remaining source (`numeric-sensor`, unit '%') → `level` via
|
|
56417
|
+
* `identity` (or `linear` scale 1 offset 0 clamp [0,100] to be safe);
|
|
56418
|
+
* - an hours-remaining source (e.g. Dreame 'Main Brush Time Left', unit 'h')
|
|
56419
|
+
* → `level` via `linear` with scale = 100 / max-hours for that item
|
|
56420
|
+
* (e.g. main brush 300 h → scale 0.3333) + clamp [0,100];
|
|
56421
|
+
* - a discrete source (`enum-sensor`, e.g. mop pad 'installed') → `status`
|
|
56422
|
+
* via `enum-map` (e.g. { installed: 'ok', missing: 'replace' }).
|
|
56423
|
+
* A numeric→'replace' THRESHOLD (level < 10 → 'replace') is NOT expressible
|
|
56424
|
+
* with the current transform kinds — leave `status` null (valid) until the
|
|
56425
|
+
* expression transform lands. */
|
|
56426
|
+
/** Generic Customize target for one consumable item (D936). Native rows stay read-only. */
|
|
56427
|
+
var consumablesCustomize = {
|
|
56428
|
+
version: 1,
|
|
56429
|
+
targets: [{
|
|
56430
|
+
id: "items",
|
|
56431
|
+
cardinality: "keyedArray",
|
|
56432
|
+
vocabulary: { cap: "consumables" },
|
|
56433
|
+
deviceTypes: Object.values(DeviceType),
|
|
56434
|
+
apply: "add",
|
|
56435
|
+
path: "items",
|
|
56436
|
+
keyField: "key",
|
|
56437
|
+
labelField: "label",
|
|
56438
|
+
itemSchema: ConsumableItemSchema,
|
|
56439
|
+
nativeItems: "read-only",
|
|
56440
|
+
sourceReport: { status: "assignment-status" },
|
|
56441
|
+
fields: [
|
|
56442
|
+
{
|
|
56443
|
+
path: "level",
|
|
56444
|
+
sources: [{
|
|
56445
|
+
kind: "numeric",
|
|
56446
|
+
transforms: [{ kind: "identity" }, {
|
|
56447
|
+
kind: "linear",
|
|
56448
|
+
defaultScale: 1,
|
|
56449
|
+
defaultOffset: 0,
|
|
56450
|
+
clampMin: 0,
|
|
56451
|
+
clampMax: 100
|
|
56452
|
+
}]
|
|
56453
|
+
}]
|
|
56454
|
+
},
|
|
56455
|
+
{
|
|
56456
|
+
path: "remaining.value",
|
|
56457
|
+
sources: [{
|
|
56458
|
+
kind: "numeric",
|
|
56459
|
+
transforms: [{ kind: "identity" }]
|
|
56460
|
+
}],
|
|
56461
|
+
literals: [{
|
|
56462
|
+
path: "remaining.unit",
|
|
56463
|
+
values: [...ConsumableRemainingUnitSchema.options]
|
|
56464
|
+
}]
|
|
56465
|
+
},
|
|
56466
|
+
{
|
|
56467
|
+
path: "status",
|
|
56468
|
+
sources: [{
|
|
56469
|
+
kind: "enum",
|
|
56470
|
+
transforms: [{
|
|
56471
|
+
kind: "enum-map",
|
|
56472
|
+
outputValues: [...ConsumableStatusSchema.options],
|
|
56473
|
+
unmapped: null
|
|
56474
|
+
}]
|
|
56475
|
+
}]
|
|
56476
|
+
}
|
|
56477
|
+
],
|
|
56478
|
+
traits: [{
|
|
56479
|
+
path: "kind",
|
|
56480
|
+
values: [...ConsumableKindSchema.options],
|
|
56481
|
+
defaultValue: "wear"
|
|
56482
|
+
}, {
|
|
56483
|
+
path: "form",
|
|
56484
|
+
values: [...ConsumableFormSchema.options],
|
|
56485
|
+
defaultValue: "part"
|
|
56486
|
+
}],
|
|
56487
|
+
companions: [{
|
|
56488
|
+
kind: "clock",
|
|
56489
|
+
path: "lastChangedAt",
|
|
56490
|
+
when: "add"
|
|
56491
|
+
}, {
|
|
56492
|
+
kind: "clock",
|
|
56493
|
+
path: "lastFetchedAt",
|
|
56494
|
+
when: "add"
|
|
56495
|
+
}],
|
|
56496
|
+
advancedExpression: true
|
|
56497
|
+
}]
|
|
56498
|
+
};
|
|
56350
56499
|
var consumablesCapability = {
|
|
56351
56500
|
name: "consumables",
|
|
56352
56501
|
scope: "device",
|
|
@@ -56384,10 +56533,7 @@ reset: method(object({
|
|
|
56384
56533
|
status: {
|
|
56385
56534
|
schema: ConsumablesStatusSchema,
|
|
56386
56535
|
kind: "push",
|
|
56387
|
-
empty:
|
|
56388
|
-
items: [],
|
|
56389
|
-
lastChangedAt: 0
|
|
56390
|
-
},
|
|
56536
|
+
empty: EMPTY_STATUS,
|
|
56391
56537
|
itemArray: {
|
|
56392
56538
|
path: "items",
|
|
56393
56539
|
keyField: "key",
|
|
@@ -56423,6 +56569,7 @@ reset: method(object({
|
|
|
56423
56569
|
* brush's remaining life and a dishwasher's salt are each recorded the moment
|
|
56424
56570
|
* their provider reports them; an item that appears later gets its series.
|
|
56425
56571
|
*/
|
|
56572
|
+
customize: consumablesCustomize,
|
|
56426
56573
|
history: {
|
|
56427
56574
|
fields: {},
|
|
56428
56575
|
items: {
|
|
@@ -57165,6 +57312,36 @@ var dishwasherCapability = {
|
|
|
57165
57312
|
powerOn: { kind: "boolean" }
|
|
57166
57313
|
} }
|
|
57167
57314
|
};
|
|
57315
|
+
/** Pulse override: a rising edge advances `lastPressedAt` and the press count. */
|
|
57316
|
+
var doorbellCustomize = {
|
|
57317
|
+
version: 1,
|
|
57318
|
+
targets: [{
|
|
57319
|
+
id: "pressed",
|
|
57320
|
+
cardinality: "event",
|
|
57321
|
+
shape: "pulse",
|
|
57322
|
+
vocabulary: {
|
|
57323
|
+
cap: "doorbell",
|
|
57324
|
+
eventName: "onPressed"
|
|
57325
|
+
},
|
|
57326
|
+
deviceTypes: [DeviceType.Camera],
|
|
57327
|
+
apply: "add",
|
|
57328
|
+
applyAuthority: { kind: "composition-claim" },
|
|
57329
|
+
eventName: "onPressed",
|
|
57330
|
+
edges: ["rising"],
|
|
57331
|
+
timestampPath: "lastPressedAt",
|
|
57332
|
+
counterPath: "pressCountSinceStart",
|
|
57333
|
+
highWater: "composer-advance",
|
|
57334
|
+
combine: "any",
|
|
57335
|
+
debounce: {
|
|
57336
|
+
kind: "rising-edge",
|
|
57337
|
+
defaultDebounceMs: 2e3,
|
|
57338
|
+
changedAtRequired: true
|
|
57339
|
+
},
|
|
57340
|
+
sources: [{ kind: "binary" }, { kind: "switch" }],
|
|
57341
|
+
sourceReport: { status: "assignment-status" },
|
|
57342
|
+
advancedExpression: true
|
|
57343
|
+
}]
|
|
57344
|
+
};
|
|
57168
57345
|
var DoorbellStatusSchema = object({
|
|
57169
57346
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
57170
57347
|
lastPressedAt: number().nullable(),
|
|
@@ -57231,7 +57408,8 @@ onPressed: {
|
|
|
57231
57408
|
/**
|
|
57232
57409
|
* History (D850): none — `pressCountSinceStart` resets with the addon, so it is not a monotonic meter; presses live in the events ledger.
|
|
57233
57410
|
*/
|
|
57234
|
-
history: "none"
|
|
57411
|
+
history: "none",
|
|
57412
|
+
customize: doorbellCustomize
|
|
57235
57413
|
};
|
|
57236
57414
|
/**
|
|
57237
57415
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -59627,6 +59805,38 @@ authKey: string().optional() }), object({
|
|
|
59627
59805
|
/** Human-readable error when `ok: false`. */
|
|
59628
59806
|
error: string().optional()
|
|
59629
59807
|
}), { kind: "mutation" });
|
|
59808
|
+
/** Span override: start on a rising edge, end on a fall or this timeout. */
|
|
59809
|
+
var motionCustomize = {
|
|
59810
|
+
version: 1,
|
|
59811
|
+
targets: [{
|
|
59812
|
+
id: "detected",
|
|
59813
|
+
cardinality: "event",
|
|
59814
|
+
shape: "span",
|
|
59815
|
+
vocabulary: {
|
|
59816
|
+
cap: "motion",
|
|
59817
|
+
eventName: "onMotionChanged"
|
|
59818
|
+
},
|
|
59819
|
+
deviceTypes: [DeviceType.Camera],
|
|
59820
|
+
apply: "replace",
|
|
59821
|
+
applyAuthority: {
|
|
59822
|
+
kind: "camera-sensors",
|
|
59823
|
+
timeoutField: "motionCooldownMs"
|
|
59824
|
+
},
|
|
59825
|
+
eventName: "onMotionChanged",
|
|
59826
|
+
start: "rising-edge",
|
|
59827
|
+
end: "falling-edge-or-timeout",
|
|
59828
|
+
timeoutMs: 3e4,
|
|
59829
|
+
combine: "any",
|
|
59830
|
+
sourceModes: [
|
|
59831
|
+
"in-addition",
|
|
59832
|
+
"confirm",
|
|
59833
|
+
"replace"
|
|
59834
|
+
],
|
|
59835
|
+
sources: [{ kind: "binary" }, { kind: "switch" }],
|
|
59836
|
+
sourceReport: { status: "assignment-status" },
|
|
59837
|
+
advancedExpression: false
|
|
59838
|
+
}]
|
|
59839
|
+
};
|
|
59630
59840
|
var MotionStatusSchema = object({
|
|
59631
59841
|
detected: boolean(),
|
|
59632
59842
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
@@ -59766,7 +59976,8 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
59766
59976
|
history: { fields: { detected: {
|
|
59767
59977
|
kind: "boolean",
|
|
59768
59978
|
excludeDeviceTypes: [DeviceType.Camera]
|
|
59769
|
-
} } }
|
|
59979
|
+
} } },
|
|
59980
|
+
customize: motionCustomize
|
|
59770
59981
|
};
|
|
59771
59982
|
/**
|
|
59772
59983
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -62492,6 +62703,16 @@ var ptzAutotrackCapability = {
|
|
|
62492
62703
|
*/
|
|
62493
62704
|
history: "none"
|
|
62494
62705
|
};
|
|
62706
|
+
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
62707
|
+
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
62708
|
+
/** Before any provider reading — all fields unknown (D933). */
|
|
62709
|
+
var RUNNING_STATE_COLD = {
|
|
62710
|
+
running: null,
|
|
62711
|
+
since: null,
|
|
62712
|
+
source: "native",
|
|
62713
|
+
phase: null,
|
|
62714
|
+
lastFetchedAt: null
|
|
62715
|
+
};
|
|
62495
62716
|
var RunningStateSourceSchema = _enum(["native", "assigned"]);
|
|
62496
62717
|
var RunningStateStatusSchema = object({
|
|
62497
62718
|
/** null = unknown — never coerced to false (D393). */
|
|
@@ -62500,19 +62721,100 @@ var RunningStateStatusSchema = object({
|
|
|
62500
62721
|
since: number().nullable(),
|
|
62501
62722
|
source: RunningStateSourceSchema,
|
|
62502
62723
|
phase: string().nullable(),
|
|
62503
|
-
|
|
62724
|
+
/** null until a reading has been published (D393). */
|
|
62725
|
+
lastFetchedAt: number().nullable()
|
|
62504
62726
|
});
|
|
62505
62727
|
var RunningFlipEventDataSchema = object({
|
|
62506
62728
|
deviceId: number(),
|
|
62507
62729
|
since: number().nullable(),
|
|
62508
62730
|
phase: string().nullable()
|
|
62509
62731
|
});
|
|
62732
|
+
var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
|
|
62733
|
+
/** Generic Customize target for the running boolean (D936). */
|
|
62734
|
+
var runningCustomize = {
|
|
62735
|
+
version: 1,
|
|
62736
|
+
targets: [{
|
|
62737
|
+
id: "running",
|
|
62738
|
+
cardinality: "scalar",
|
|
62739
|
+
vocabulary: {
|
|
62740
|
+
cap: "running-state",
|
|
62741
|
+
stateField: "running"
|
|
62742
|
+
},
|
|
62743
|
+
deviceTypes: [
|
|
62744
|
+
DeviceType.Dishwasher,
|
|
62745
|
+
DeviceType.Vacuum,
|
|
62746
|
+
DeviceType.LawnMower,
|
|
62747
|
+
DeviceType.MediaPlayer,
|
|
62748
|
+
DeviceType.WaterHeater,
|
|
62749
|
+
DeviceType.Humidifier,
|
|
62750
|
+
DeviceType.Fan,
|
|
62751
|
+
DeviceType.Climate,
|
|
62752
|
+
DeviceType.Thermostat,
|
|
62753
|
+
DeviceType.PetFeeder
|
|
62754
|
+
],
|
|
62755
|
+
apply: "add-or-replace",
|
|
62756
|
+
path: "running",
|
|
62757
|
+
sources: [
|
|
62758
|
+
{
|
|
62759
|
+
kind: "switch",
|
|
62760
|
+
transforms: [{ kind: "identity" }]
|
|
62761
|
+
},
|
|
62762
|
+
{
|
|
62763
|
+
kind: "binary",
|
|
62764
|
+
transforms: [{ kind: "identity" }, { kind: "invert" }]
|
|
62765
|
+
},
|
|
62766
|
+
{
|
|
62767
|
+
kind: "numeric",
|
|
62768
|
+
requiredUnit: "W",
|
|
62769
|
+
transforms: [{
|
|
62770
|
+
kind: "threshold",
|
|
62771
|
+
comparison: "gte",
|
|
62772
|
+
defaultThreshold: 5,
|
|
62773
|
+
defaultStartDwellMs: RUNNING_POWER_START_DELAY_MS,
|
|
62774
|
+
defaultStopDwellMs: RUNNING_POWER_STOP_DELAY_MS,
|
|
62775
|
+
thresholdUnit: "W"
|
|
62776
|
+
}]
|
|
62777
|
+
}
|
|
62778
|
+
],
|
|
62779
|
+
companions: [
|
|
62780
|
+
{
|
|
62781
|
+
kind: "constant",
|
|
62782
|
+
path: "source",
|
|
62783
|
+
value: "assigned",
|
|
62784
|
+
when: "always"
|
|
62785
|
+
},
|
|
62786
|
+
{
|
|
62787
|
+
kind: "constant",
|
|
62788
|
+
path: "phase",
|
|
62789
|
+
value: null,
|
|
62790
|
+
when: "always"
|
|
62791
|
+
},
|
|
62792
|
+
{
|
|
62793
|
+
kind: "clock",
|
|
62794
|
+
path: "lastFetchedAt",
|
|
62795
|
+
when: "always"
|
|
62796
|
+
},
|
|
62797
|
+
{
|
|
62798
|
+
kind: "transition-time",
|
|
62799
|
+
path: "since",
|
|
62800
|
+
sourceChangedAt: "prefer"
|
|
62801
|
+
}
|
|
62802
|
+
],
|
|
62803
|
+
sourceReport: {
|
|
62804
|
+
status: "assignment-status",
|
|
62805
|
+
runtimeField: "source",
|
|
62806
|
+
nativeValue: "native",
|
|
62807
|
+
assignedValue: "assigned"
|
|
62808
|
+
},
|
|
62809
|
+
advancedExpression: true
|
|
62810
|
+
}]
|
|
62811
|
+
};
|
|
62510
62812
|
var runningStateCapability = {
|
|
62511
62813
|
name: "running-state",
|
|
62512
62814
|
scope: "device",
|
|
62513
62815
|
deviceNative: true,
|
|
62514
62816
|
mode: "singleton",
|
|
62515
|
-
deviceTypes:
|
|
62817
|
+
deviceTypes: RUNNING_DEVICE_TYPES,
|
|
62516
62818
|
methods: {},
|
|
62517
62819
|
events: {
|
|
62518
62820
|
onStarted: { data: RunningFlipEventDataSchema },
|
|
@@ -62525,7 +62827,8 @@ var runningStateCapability = {
|
|
|
62525
62827
|
runtimeState: RunningStateStatusSchema,
|
|
62526
62828
|
durability: "restored",
|
|
62527
62829
|
history: { fields: { running: { kind: "boolean" } } },
|
|
62528
|
-
volatileStateFields: ["lastFetchedAt"]
|
|
62830
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
62831
|
+
customize: runningCustomize
|
|
62529
62832
|
};
|
|
62530
62833
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
62531
62834
|
kind: "mutation",
|
|
@@ -67157,37 +67460,42 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
67157
67460
|
kind: "mutation",
|
|
67158
67461
|
auth: "admin"
|
|
67159
67462
|
});
|
|
67160
|
-
function resolveSince(running, previous,
|
|
67463
|
+
function resolveSince(running, previous, transitionAtMs, bootstrapSinceMs) {
|
|
67161
67464
|
if (running === null) return null;
|
|
67162
|
-
|
|
67163
|
-
|
|
67465
|
+
const prevRunning = previous?.running ?? null;
|
|
67466
|
+
if (prevRunning === null) return bootstrapSinceMs;
|
|
67467
|
+
if (prevRunning !== running) return transitionAtMs;
|
|
67468
|
+
return previous?.since ?? null;
|
|
67164
67469
|
}
|
|
67165
|
-
function nativeSlice(running, phase, previous,
|
|
67470
|
+
function nativeSlice(running, phase, previous, transitionAtMs, fetchedAt, bootstrapSinceMs) {
|
|
67166
67471
|
return {
|
|
67167
67472
|
running,
|
|
67168
|
-
since: resolveSince(running, previous,
|
|
67473
|
+
since: resolveSince(running, previous, transitionAtMs, bootstrapSinceMs),
|
|
67169
67474
|
source: "native",
|
|
67170
67475
|
phase: running === null ? null : phase,
|
|
67171
|
-
lastFetchedAt:
|
|
67476
|
+
lastFetchedAt: fetchedAt
|
|
67172
67477
|
};
|
|
67173
67478
|
}
|
|
67174
|
-
function runningFromVacuumState(state, previous,
|
|
67175
|
-
|
|
67176
|
-
if (state ===
|
|
67177
|
-
if (state === "
|
|
67178
|
-
return nativeSlice(false,
|
|
67479
|
+
function runningFromVacuumState(state, previous, fetchedAt, transitionAt) {
|
|
67480
|
+
const transitionAtMs = transitionAt ?? fetchedAt;
|
|
67481
|
+
if (state === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
|
|
67482
|
+
if (state === "cleaning" || state === "returning" || state === "drying") return nativeSlice(true, state, previous, transitionAtMs, fetchedAt, null);
|
|
67483
|
+
if (state === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
|
|
67484
|
+
return nativeSlice(false, state, previous, transitionAtMs, fetchedAt, null);
|
|
67179
67485
|
}
|
|
67180
|
-
function runningFromLawnMower(activity, previous,
|
|
67181
|
-
|
|
67182
|
-
if (activity ===
|
|
67183
|
-
if (activity === "
|
|
67184
|
-
return nativeSlice(false,
|
|
67486
|
+
function runningFromLawnMower(activity, previous, fetchedAt, transitionAt) {
|
|
67487
|
+
const transitionAtMs = transitionAt ?? fetchedAt;
|
|
67488
|
+
if (activity === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
|
|
67489
|
+
if (activity === "mowing") return nativeSlice(true, activity, previous, transitionAtMs, fetchedAt, null);
|
|
67490
|
+
if (activity === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
|
|
67491
|
+
return nativeSlice(false, activity, previous, transitionAtMs, fetchedAt, null);
|
|
67185
67492
|
}
|
|
67186
|
-
function runningFromMediaPlayer(state, previous,
|
|
67187
|
-
|
|
67188
|
-
if (state ===
|
|
67189
|
-
if (state === "
|
|
67190
|
-
return nativeSlice(false,
|
|
67493
|
+
function runningFromMediaPlayer(state, previous, fetchedAt, transitionAt) {
|
|
67494
|
+
const transitionAtMs = transitionAt ?? fetchedAt;
|
|
67495
|
+
if (state === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
|
|
67496
|
+
if (state === "playing" || state === "buffering") return nativeSlice(true, state, previous, transitionAtMs, fetchedAt, null);
|
|
67497
|
+
if (state === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
|
|
67498
|
+
return nativeSlice(false, state, previous, transitionAtMs, fetchedAt, null);
|
|
67191
67499
|
}
|
|
67192
67500
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
67193
67501
|
Object.freeze({
|
|
@@ -85073,6 +85381,96 @@ Object.freeze({
|
|
|
85073
85381
|
"smtp-provider": "email"
|
|
85074
85382
|
});
|
|
85075
85383
|
DeviceType.Camera;
|
|
85384
|
+
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;
|
|
85385
|
+
/**
|
|
85386
|
+
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
85387
|
+
* `z.infer`, they do not restate the shape.
|
|
85388
|
+
*/
|
|
85389
|
+
var OverrideSourceSchema = object({
|
|
85390
|
+
addonId: string().min(1),
|
|
85391
|
+
stableId: string().min(1),
|
|
85392
|
+
cap: string().min(1),
|
|
85393
|
+
fieldPath: string().min(1)
|
|
85394
|
+
});
|
|
85395
|
+
var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
|
|
85396
|
+
object({ kind: literal("identity") }),
|
|
85397
|
+
object({ kind: literal("invert") }),
|
|
85398
|
+
object({
|
|
85399
|
+
kind: literal("threshold"),
|
|
85400
|
+
comparison: _enum(["gte", "lte"]),
|
|
85401
|
+
threshold: number(),
|
|
85402
|
+
startDwellMs: number().nonnegative(),
|
|
85403
|
+
stopDwellMs: number().nonnegative()
|
|
85404
|
+
}),
|
|
85405
|
+
object({
|
|
85406
|
+
kind: literal("linear"),
|
|
85407
|
+
scale: number(),
|
|
85408
|
+
offset: number(),
|
|
85409
|
+
clampMin: number().optional(),
|
|
85410
|
+
clampMax: number().optional()
|
|
85411
|
+
}),
|
|
85412
|
+
object({
|
|
85413
|
+
kind: literal("enum-map"),
|
|
85414
|
+
mapping: record(string(), string().nullable())
|
|
85415
|
+
}),
|
|
85416
|
+
object({ kind: literal("number") })
|
|
85417
|
+
]);
|
|
85418
|
+
var ScalarOverrideDraftSchema = object({
|
|
85419
|
+
kind: literal("scalar"),
|
|
85420
|
+
cap: string().min(1),
|
|
85421
|
+
targetId: string().min(1),
|
|
85422
|
+
source: OverrideSourceSchema,
|
|
85423
|
+
transform: CustomizeTransformDraftSchema
|
|
85424
|
+
});
|
|
85425
|
+
var KeyedArrayOverrideDraftSchema = object({
|
|
85426
|
+
kind: literal("keyedArray"),
|
|
85427
|
+
cap: string().min(1),
|
|
85428
|
+
targetId: string().min(1),
|
|
85429
|
+
key: string().min(1),
|
|
85430
|
+
label: string().min(1),
|
|
85431
|
+
fieldPath: string().min(1),
|
|
85432
|
+
source: OverrideSourceSchema,
|
|
85433
|
+
transform: CustomizeTransformDraftSchema
|
|
85434
|
+
});
|
|
85435
|
+
var PulseOverrideDraftSchema = object({
|
|
85436
|
+
kind: literal("pulse"),
|
|
85437
|
+
cap: string().min(1),
|
|
85438
|
+
targetId: string().min(1),
|
|
85439
|
+
enabled: boolean(),
|
|
85440
|
+
debounceMs: number().nonnegative(),
|
|
85441
|
+
sources: array(OverrideSourceSchema).min(1)
|
|
85442
|
+
});
|
|
85443
|
+
var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
|
|
85444
|
+
"in-addition",
|
|
85445
|
+
"confirm",
|
|
85446
|
+
"replace"
|
|
85447
|
+
]).optional() });
|
|
85448
|
+
discriminatedUnion("kind", [
|
|
85449
|
+
ScalarOverrideDraftSchema,
|
|
85450
|
+
KeyedArrayOverrideDraftSchema,
|
|
85451
|
+
PulseOverrideDraftSchema,
|
|
85452
|
+
object({
|
|
85453
|
+
kind: literal("span"),
|
|
85454
|
+
cap: string().min(1),
|
|
85455
|
+
targetId: string().min(1),
|
|
85456
|
+
timeoutMs: number().nonnegative(),
|
|
85457
|
+
cooldownMs: number().nonnegative().optional(),
|
|
85458
|
+
sources: array(SpanSourceDraftSchema)
|
|
85459
|
+
})
|
|
85460
|
+
]);
|
|
85461
|
+
object({
|
|
85462
|
+
targetId: string().min(1),
|
|
85463
|
+
configured: boolean(),
|
|
85464
|
+
source: _enum(["native", "assigned"]),
|
|
85465
|
+
state: _enum([
|
|
85466
|
+
"active",
|
|
85467
|
+
"stale",
|
|
85468
|
+
"released",
|
|
85469
|
+
"unavailable"
|
|
85470
|
+
]),
|
|
85471
|
+
reason: string().nullable()
|
|
85472
|
+
});
|
|
85473
|
+
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
85076
85474
|
var G711_SCALE_CORRECTION_DB = {
|
|
85077
85475
|
PCMU: 20 * Math.log10(4),
|
|
85078
85476
|
PCMA: 20 * Math.log10(8)
|
|
@@ -86634,6 +87032,12 @@ Object.defineProperty(exports, "MediaPlayerRepeatSchema", {
|
|
|
86634
87032
|
return MediaPlayerRepeatSchema;
|
|
86635
87033
|
}
|
|
86636
87034
|
});
|
|
87035
|
+
Object.defineProperty(exports, "RUNNING_STATE_COLD", {
|
|
87036
|
+
enumerable: true,
|
|
87037
|
+
get: function() {
|
|
87038
|
+
return RUNNING_STATE_COLD;
|
|
87039
|
+
}
|
|
87040
|
+
});
|
|
86637
87041
|
Object.defineProperty(exports, "RecordSecretUnavailableError", {
|
|
86638
87042
|
enumerable: true,
|
|
86639
87043
|
get: function() {
|