@camstack/addon-provider-velux 0.2.14 → 0.2.16
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 +723 -95
- package/dist/addon.mjs +723 -95
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -10771,7 +10771,14 @@ var cameraStreamsCapability = {
|
|
|
10771
10771
|
low: string().optional()
|
|
10772
10772
|
}),
|
|
10773
10773
|
lastChangedAt: number()
|
|
10774
|
-
})
|
|
10774
|
+
}),
|
|
10775
|
+
/**
|
|
10776
|
+
* Runtime-state durability: **session** — a restored `slotStatuses: streaming` for a camera that has been dark for two hours is a lie the UI renders as truth.
|
|
10777
|
+
*
|
|
10778
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
10779
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
10780
|
+
*/
|
|
10781
|
+
durability: "session"
|
|
10775
10782
|
};
|
|
10776
10783
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
10777
10784
|
* agent is the reason placement is not fixed to the hub. */
|
|
@@ -11332,6 +11339,13 @@ var deviceDiscoveryCapability = {
|
|
|
11332
11339
|
kind: "poll"
|
|
11333
11340
|
},
|
|
11334
11341
|
runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
|
|
11342
|
+
/**
|
|
11343
|
+
* Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
|
|
11344
|
+
*
|
|
11345
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11346
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11347
|
+
*/
|
|
11348
|
+
durability: "session",
|
|
11335
11349
|
methods: {
|
|
11336
11350
|
/**
|
|
11337
11351
|
* Snapshot of the current `discovered` list. Returns the
|
|
@@ -13231,7 +13245,23 @@ var NotificationActionSchema = object({
|
|
|
13231
13245
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13232
13246
|
* does not buy.
|
|
13233
13247
|
*/
|
|
13234
|
-
destructive: boolean().optional()
|
|
13248
|
+
destructive: boolean().optional(),
|
|
13249
|
+
/**
|
|
13250
|
+
* How the tap should REACH the url.
|
|
13251
|
+
*
|
|
13252
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13253
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13254
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13255
|
+
*
|
|
13256
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13257
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13258
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13259
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13260
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13261
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13262
|
+
* a requirement.
|
|
13263
|
+
*/
|
|
13264
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13235
13265
|
});
|
|
13236
13266
|
/**
|
|
13237
13267
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14083,7 +14113,17 @@ var alarmPanelCapability = {
|
|
|
14083
14113
|
* full slice; renders an arm button per `availableModes` entry and
|
|
14084
14114
|
* a PIN field iff `requiresCode === true`.
|
|
14085
14115
|
*/
|
|
14086
|
-
runtimeState: AlarmPanelStatusSchema
|
|
14116
|
+
runtimeState: AlarmPanelStatusSchema,
|
|
14117
|
+
/**
|
|
14118
|
+
* Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
|
|
14119
|
+
*
|
|
14120
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
14121
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
14122
|
+
*/
|
|
14123
|
+
durability: "restored",
|
|
14124
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
14125
|
+
* whether persisting is worth a SQLite commit. */
|
|
14126
|
+
volatileStateFields: ["lastChangedAt"]
|
|
14087
14127
|
};
|
|
14088
14128
|
/**
|
|
14089
14129
|
* Shared geometry vocabulary for on-frame shape caps — privacy-mask,
|
|
@@ -14260,6 +14300,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14260
14300
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14261
14301
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14262
14302
|
});
|
|
14303
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14304
|
+
* outage the operator asked for once and forgot. */
|
|
14305
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14263
14306
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14264
14307
|
var NcScheduleSchema = object({
|
|
14265
14308
|
windows: array(object({
|
|
@@ -14636,15 +14679,15 @@ var NcConditionsSchema = object({
|
|
|
14636
14679
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14637
14680
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14638
14681
|
*
|
|
14639
|
-
*
|
|
14640
|
-
* rather than an
|
|
14641
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14642
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14682
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14683
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14684
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14685
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14643
14686
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14644
14687
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14645
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14646
|
-
*
|
|
14647
|
-
*
|
|
14688
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14689
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14690
|
+
* follows here.
|
|
14648
14691
|
*/
|
|
14649
14692
|
audio: NcAudioConditionSchema.optional()
|
|
14650
14693
|
});
|
|
@@ -14880,6 +14923,30 @@ var NcRuleInputSchema = object({
|
|
|
14880
14923
|
*/
|
|
14881
14924
|
snoozeAllowGlobal: boolean().optional(),
|
|
14882
14925
|
/**
|
|
14926
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14927
|
+
* minutes.
|
|
14928
|
+
*
|
|
14929
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14930
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14931
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14932
|
+
* would collapse the first two:
|
|
14933
|
+
*
|
|
14934
|
+
* | value | meaning |
|
|
14935
|
+
* | --- | --- |
|
|
14936
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14937
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14938
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14939
|
+
*
|
|
14940
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14941
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14942
|
+
* would push its own tap-through actions off the notification.
|
|
14943
|
+
*
|
|
14944
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14945
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14946
|
+
* window from anywhere (D133).
|
|
14947
|
+
*/
|
|
14948
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14949
|
+
/**
|
|
14883
14950
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14884
14951
|
*
|
|
14885
14952
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14979,6 +15046,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14979
15046
|
"device",
|
|
14980
15047
|
"package",
|
|
14981
15048
|
"occupancy",
|
|
15049
|
+
"audio",
|
|
14982
15050
|
"system"
|
|
14983
15051
|
]),
|
|
14984
15052
|
label: string(),
|
|
@@ -14997,6 +15065,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14997
15065
|
"crossingSelect",
|
|
14998
15066
|
"polygonDraw",
|
|
14999
15067
|
"occupancy",
|
|
15068
|
+
"audio",
|
|
15000
15069
|
"deviceState",
|
|
15001
15070
|
"systemEvent"
|
|
15002
15071
|
]),
|
|
@@ -15148,7 +15217,20 @@ var NcSnoozeInputSchema = object({
|
|
|
15148
15217
|
ruleId: string().optional(),
|
|
15149
15218
|
/** Required when `scope: 'device'`. */
|
|
15150
15219
|
deviceId: number().int().optional(),
|
|
15151
|
-
|
|
15220
|
+
/**
|
|
15221
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15222
|
+
*
|
|
15223
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15224
|
+
* what every window authored before this field meant, so no persisted row
|
|
15225
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15226
|
+
*
|
|
15227
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15228
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15229
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15230
|
+
* they are dismissing.
|
|
15231
|
+
*/
|
|
15232
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15233
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
15152
15234
|
/**
|
|
15153
15235
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
15154
15236
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -15173,6 +15255,10 @@ var NcSnoozeSchema = object({
|
|
|
15173
15255
|
scope: NcSnoozeScopeSchema,
|
|
15174
15256
|
ruleId: string().optional(),
|
|
15175
15257
|
deviceId: number().int().optional(),
|
|
15258
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15259
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15260
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15261
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15176
15262
|
startedAt: number(),
|
|
15177
15263
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
15178
15264
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -17273,7 +17359,14 @@ var zonesCapability = {
|
|
|
17273
17359
|
* handle. Slice shape is `{ zones: Zone[] }` so future extensions
|
|
17274
17360
|
* (e.g. zone groupings) can sit alongside the polygon list.
|
|
17275
17361
|
*/
|
|
17276
|
-
runtimeState: object({ zones: array(ZoneSchema).readonly() })
|
|
17362
|
+
runtimeState: object({ zones: array(ZoneSchema).readonly() }),
|
|
17363
|
+
/**
|
|
17364
|
+
* Runtime-state durability: **restored** — written only on operator mutation, so a camera that never had one has nothing to re-derive from. This is the slice `zone-mirror-hydration.ts` exists to paper over.
|
|
17365
|
+
*
|
|
17366
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
17367
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
17368
|
+
*/
|
|
17369
|
+
durability: "restored"
|
|
17277
17370
|
};
|
|
17278
17371
|
/**
|
|
17279
17372
|
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
@@ -20072,7 +20165,17 @@ var airQualitySensorCapability = {
|
|
|
20072
20165
|
schema: AirQualitySensorStatusSchema,
|
|
20073
20166
|
kind: "push"
|
|
20074
20167
|
},
|
|
20075
|
-
runtimeState: AirQualitySensorStatusSchema
|
|
20168
|
+
runtimeState: AirQualitySensorStatusSchema,
|
|
20169
|
+
/**
|
|
20170
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
20171
|
+
*
|
|
20172
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20173
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20174
|
+
*/
|
|
20175
|
+
durability: "restored",
|
|
20176
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20177
|
+
* whether persisting is worth a SQLite commit. */
|
|
20178
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
20076
20179
|
};
|
|
20077
20180
|
/**
|
|
20078
20181
|
* Ambient illuminance reading in lux. Drives Home Assistant `sensor`
|
|
@@ -20104,7 +20207,17 @@ var ambientLightSensorCapability = {
|
|
|
20104
20207
|
schema: AmbientLightSensorStatusSchema,
|
|
20105
20208
|
kind: "push"
|
|
20106
20209
|
},
|
|
20107
|
-
runtimeState: AmbientLightSensorStatusSchema
|
|
20210
|
+
runtimeState: AmbientLightSensorStatusSchema,
|
|
20211
|
+
/**
|
|
20212
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
20213
|
+
*
|
|
20214
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20215
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20216
|
+
*/
|
|
20217
|
+
durability: "restored",
|
|
20218
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20219
|
+
* whether persisting is worth a SQLite commit. */
|
|
20220
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
20108
20221
|
};
|
|
20109
20222
|
/**
|
|
20110
20223
|
* Per-class audio metrics aggregated over a sliding window.
|
|
@@ -20222,7 +20335,14 @@ var audioMetricsCapability = {
|
|
|
20222
20335
|
}), AudioMetricsHistorySchema)
|
|
20223
20336
|
},
|
|
20224
20337
|
/** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
|
|
20225
|
-
runtimeState: AudioMetricsSnapshotSchema
|
|
20338
|
+
runtimeState: AudioMetricsSnapshotSchema,
|
|
20339
|
+
/**
|
|
20340
|
+
* Runtime-state durability: **session** — 1 Hz per camera at the mirror and ~63 % of the fleet's whole runtime-state write rate. `avgDbfs` is a rolling 60 s mean that genuinely moves every second, so no equality fix reclaims it — and a two-hour-old dB reading rendered as current is worse than no reading.
|
|
20341
|
+
*
|
|
20342
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20343
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20344
|
+
*/
|
|
20345
|
+
durability: "session"
|
|
20226
20346
|
};
|
|
20227
20347
|
/**
|
|
20228
20348
|
* Automation-control cap. Models HA `automation.*` entities on
|
|
@@ -20284,7 +20404,14 @@ var automationControlCapability = {
|
|
|
20284
20404
|
* reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
|
|
20285
20405
|
* (badge) directly.
|
|
20286
20406
|
*/
|
|
20287
|
-
runtimeState: AutomationControlStatusSchema
|
|
20407
|
+
runtimeState: AutomationControlStatusSchema,
|
|
20408
|
+
/**
|
|
20409
|
+
* Runtime-state durability: **session** — the authority for an automation being enabled is the automation store; a restored `isRunning` would be a lie. D62: one authority per switch.
|
|
20410
|
+
*
|
|
20411
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20412
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20413
|
+
*/
|
|
20414
|
+
durability: "session"
|
|
20288
20415
|
};
|
|
20289
20416
|
/**
|
|
20290
20417
|
* Battery status snapshot. Emitted by providers whose device is
|
|
@@ -20390,7 +20517,17 @@ onStatusChanged: { data: object({
|
|
|
20390
20517
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
20391
20518
|
* the underlying driver.
|
|
20392
20519
|
*/
|
|
20393
|
-
runtimeState: BatteryStatusSchema
|
|
20520
|
+
runtimeState: BatteryStatusSchema,
|
|
20521
|
+
/**
|
|
20522
|
+
* Runtime-state durability: **restored** — a sleeping battery camera may not report for hours; the restored percentage is the only thing the UI and the sleep gate have. Zero churn once `lastUpdated` is excluded — 526 writes, 0 value changes, in 25 minutes.
|
|
20523
|
+
*
|
|
20524
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20525
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20526
|
+
*/
|
|
20527
|
+
durability: "restored",
|
|
20528
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20529
|
+
* whether persisting is worth a SQLite commit. */
|
|
20530
|
+
volatileStateFields: ["lastUpdated"]
|
|
20394
20531
|
};
|
|
20395
20532
|
/**
|
|
20396
20533
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
@@ -20419,7 +20556,17 @@ var binaryCapability = {
|
|
|
20419
20556
|
schema: BinaryStatusSchema,
|
|
20420
20557
|
kind: "push"
|
|
20421
20558
|
},
|
|
20422
|
-
runtimeState: BinaryStatusSchema
|
|
20559
|
+
runtimeState: BinaryStatusSchema,
|
|
20560
|
+
/**
|
|
20561
|
+
* Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
|
|
20562
|
+
*
|
|
20563
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20564
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20565
|
+
*/
|
|
20566
|
+
durability: "restored",
|
|
20567
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20568
|
+
* whether persisting is worth a SQLite commit. */
|
|
20569
|
+
volatileStateFields: ["lastChangedAt"]
|
|
20423
20570
|
};
|
|
20424
20571
|
/**
|
|
20425
20572
|
* Dimmable-light brightness control. Co-exists with `switch` on the
|
|
@@ -20472,7 +20619,14 @@ onBrightnessChanged: { data: object({
|
|
|
20472
20619
|
* by the kernel. Read via `device.state.brightness.value` so UI
|
|
20473
20620
|
* sliders surface the current level without polling the provider.
|
|
20474
20621
|
*/
|
|
20475
|
-
runtimeState: BrightnessStatusSchema
|
|
20622
|
+
runtimeState: BrightnessStatusSchema,
|
|
20623
|
+
/**
|
|
20624
|
+
* Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
|
|
20625
|
+
*
|
|
20626
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20627
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20628
|
+
*/
|
|
20629
|
+
durability: "session"
|
|
20476
20630
|
};
|
|
20477
20631
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
20478
20632
|
kind: "mutation",
|
|
@@ -20560,7 +20714,17 @@ var carbonMonoxideCapability = {
|
|
|
20560
20714
|
schema: CarbonMonoxideStatusSchema,
|
|
20561
20715
|
kind: "push"
|
|
20562
20716
|
},
|
|
20563
|
-
runtimeState: CarbonMonoxideStatusSchema
|
|
20717
|
+
runtimeState: CarbonMonoxideStatusSchema,
|
|
20718
|
+
/**
|
|
20719
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
20720
|
+
*
|
|
20721
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20722
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20723
|
+
*/
|
|
20724
|
+
durability: "restored",
|
|
20725
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20726
|
+
* whether persisting is worth a SQLite commit. */
|
|
20727
|
+
volatileStateFields: ["lastChangedAt"]
|
|
20564
20728
|
};
|
|
20565
20729
|
/**
|
|
20566
20730
|
* HVAC / climate control cap. Models the full surface of a HA
|
|
@@ -20720,7 +20884,14 @@ var climateControlCapability = {
|
|
|
20720
20884
|
* the full slice via `device.state.climate-control.value` and refresh
|
|
20721
20885
|
* on every push without re-querying the provider.
|
|
20722
20886
|
*/
|
|
20723
|
-
runtimeState: ClimateControlStatusSchema
|
|
20887
|
+
runtimeState: ClimateControlStatusSchema,
|
|
20888
|
+
/**
|
|
20889
|
+
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
20890
|
+
*
|
|
20891
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20892
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20893
|
+
*/
|
|
20894
|
+
durability: "session"
|
|
20724
20895
|
};
|
|
20725
20896
|
/**
|
|
20726
20897
|
* Color-light cap. Coexists with `switch` (on/off) and `brightness`
|
|
@@ -20830,7 +21001,14 @@ onColorChanged: { data: object({
|
|
|
20830
21001
|
* kernel. Read via `device.state.color.value` so UI pickers surface
|
|
20831
21002
|
* the current chromaticity without polling the provider.
|
|
20832
21003
|
*/
|
|
20833
|
-
runtimeState: ColorStatusSchema
|
|
21004
|
+
runtimeState: ColorStatusSchema,
|
|
21005
|
+
/**
|
|
21006
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
21007
|
+
*
|
|
21008
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21009
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21010
|
+
*/
|
|
21011
|
+
durability: "session"
|
|
20834
21012
|
};
|
|
20835
21013
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
20836
21014
|
object({
|
|
@@ -20888,7 +21066,17 @@ var connectivityCapability = {
|
|
|
20888
21066
|
schema: ConnectivityStatusSchema,
|
|
20889
21067
|
kind: "push"
|
|
20890
21068
|
},
|
|
20891
|
-
runtimeState: ConnectivityStatusSchema
|
|
21069
|
+
runtimeState: ConnectivityStatusSchema,
|
|
21070
|
+
/**
|
|
21071
|
+
* Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
|
|
21072
|
+
*
|
|
21073
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21074
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21075
|
+
*/
|
|
21076
|
+
durability: "restored",
|
|
21077
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21078
|
+
* whether persisting is worth a SQLite commit. */
|
|
21079
|
+
volatileStateFields: ["lastChangedAt"]
|
|
20892
21080
|
};
|
|
20893
21081
|
/**
|
|
20894
21082
|
* Generic device-consumables capability — surfaces a device's
|
|
@@ -20970,7 +21158,14 @@ reset: method(object({
|
|
|
20970
21158
|
}
|
|
20971
21159
|
}
|
|
20972
21160
|
},
|
|
20973
|
-
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
|
|
21161
|
+
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
|
|
21162
|
+
/**
|
|
21163
|
+
* Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
|
|
21164
|
+
*
|
|
21165
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21166
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21167
|
+
*/
|
|
21168
|
+
durability: "session"
|
|
20974
21169
|
};
|
|
20975
21170
|
/**
|
|
20976
21171
|
* Door / window / opening / garage / valve contact sensor. Boolean
|
|
@@ -21001,7 +21196,17 @@ var contactCapability = {
|
|
|
21001
21196
|
schema: ContactStatusSchema,
|
|
21002
21197
|
kind: "push"
|
|
21003
21198
|
},
|
|
21004
|
-
runtimeState: ContactStatusSchema
|
|
21199
|
+
runtimeState: ContactStatusSchema,
|
|
21200
|
+
/**
|
|
21201
|
+
* Runtime-state durability: **restored** — a door left open across a restart must still read open.
|
|
21202
|
+
*
|
|
21203
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21204
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21205
|
+
*/
|
|
21206
|
+
durability: "restored",
|
|
21207
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21208
|
+
* whether persisting is worth a SQLite commit. */
|
|
21209
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21005
21210
|
};
|
|
21006
21211
|
/**
|
|
21007
21212
|
* Status slice — flat object (the framework's `runtimeState` contract
|
|
@@ -21107,7 +21312,14 @@ var controlCapability = {
|
|
|
21107
21312
|
* dropdown / text field / date picker) read the slice's discriminant
|
|
21108
21313
|
* and value directly without polling the provider.
|
|
21109
21314
|
*/
|
|
21110
|
-
runtimeState: ControlStatusSchema
|
|
21315
|
+
runtimeState: ControlStatusSchema,
|
|
21316
|
+
/**
|
|
21317
|
+
* Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
|
|
21318
|
+
*
|
|
21319
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21320
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21321
|
+
*/
|
|
21322
|
+
durability: "session"
|
|
21111
21323
|
};
|
|
21112
21324
|
var CoverStatusSchema = object({
|
|
21113
21325
|
/** Lifecycle state of the cover. */
|
|
@@ -21168,7 +21380,17 @@ var coverCapability = {
|
|
|
21168
21380
|
* Runtime-state slice — mirrored by the kernel. UI controls watch
|
|
21169
21381
|
* the slice for live position changes during a move.
|
|
21170
21382
|
*/
|
|
21171
|
-
runtimeState: CoverStatusSchema
|
|
21383
|
+
runtimeState: CoverStatusSchema,
|
|
21384
|
+
/**
|
|
21385
|
+
* Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
|
|
21386
|
+
*
|
|
21387
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21388
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21389
|
+
*/
|
|
21390
|
+
durability: "restored",
|
|
21391
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21392
|
+
* whether persisting is worth a SQLite commit. */
|
|
21393
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21172
21394
|
};
|
|
21173
21395
|
/**
|
|
21174
21396
|
* Vendor-neutral day/night (IR-cut) control — the per-camera config cap
|
|
@@ -21262,7 +21484,17 @@ var dayNightCapability = {
|
|
|
21262
21484
|
schema: DayNightStatusSchema,
|
|
21263
21485
|
kind: "poll"
|
|
21264
21486
|
},
|
|
21265
|
-
runtimeState: DayNightStatusSchema
|
|
21487
|
+
runtimeState: DayNightStatusSchema,
|
|
21488
|
+
/**
|
|
21489
|
+
* Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
|
|
21490
|
+
*
|
|
21491
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21492
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21493
|
+
*/
|
|
21494
|
+
durability: "restored",
|
|
21495
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21496
|
+
* whether persisting is worth a SQLite commit. */
|
|
21497
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21266
21498
|
};
|
|
21267
21499
|
/**
|
|
21268
21500
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
@@ -21309,7 +21541,17 @@ onStatusChanged: { data: object({
|
|
|
21309
21541
|
schema: DeviceStatusSchema,
|
|
21310
21542
|
kind: "push"
|
|
21311
21543
|
},
|
|
21312
|
-
runtimeState: DeviceStatusSchema
|
|
21544
|
+
runtimeState: DeviceStatusSchema,
|
|
21545
|
+
/**
|
|
21546
|
+
* Runtime-state durability: **restored** — the previous observation is what makes the first reading after a restart a COMPARISON instead of a phantom transition (D130). 32 real flips across 16 devices in 25 min — the busiest slice in the cold half.
|
|
21547
|
+
*
|
|
21548
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21549
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21550
|
+
*/
|
|
21551
|
+
durability: "restored",
|
|
21552
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21553
|
+
* whether persisting is worth a SQLite commit. */
|
|
21554
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21313
21555
|
};
|
|
21314
21556
|
/**
|
|
21315
21557
|
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
@@ -21371,7 +21613,14 @@ onPressed: { data: DoorbellPressEventSchema } },
|
|
|
21371
21613
|
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
21372
21614
|
* without subscribing.
|
|
21373
21615
|
*/
|
|
21374
|
-
runtimeState: DoorbellStatusSchema
|
|
21616
|
+
runtimeState: DoorbellStatusSchema,
|
|
21617
|
+
/**
|
|
21618
|
+
* Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
|
|
21619
|
+
*
|
|
21620
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21621
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21622
|
+
*/
|
|
21623
|
+
durability: "restored"
|
|
21375
21624
|
};
|
|
21376
21625
|
/**
|
|
21377
21626
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -21411,7 +21660,17 @@ var enumSensorCapability = {
|
|
|
21411
21660
|
schema: EnumSensorStatusSchema,
|
|
21412
21661
|
kind: "push"
|
|
21413
21662
|
},
|
|
21414
|
-
runtimeState: EnumSensorStatusSchema
|
|
21663
|
+
runtimeState: EnumSensorStatusSchema,
|
|
21664
|
+
/**
|
|
21665
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
|
|
21666
|
+
*
|
|
21667
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21668
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21669
|
+
*/
|
|
21670
|
+
durability: "restored",
|
|
21671
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21672
|
+
* whether persisting is worth a SQLite commit. */
|
|
21673
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21415
21674
|
};
|
|
21416
21675
|
/**
|
|
21417
21676
|
* Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
|
|
@@ -21447,7 +21706,14 @@ var eventEmitterCapability = {
|
|
|
21447
21706
|
schema: EventEmitterStatusSchema,
|
|
21448
21707
|
kind: "push"
|
|
21449
21708
|
},
|
|
21450
|
-
runtimeState: EventEmitterStatusSchema
|
|
21709
|
+
runtimeState: EventEmitterStatusSchema,
|
|
21710
|
+
/**
|
|
21711
|
+
* Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
|
|
21712
|
+
*
|
|
21713
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21714
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21715
|
+
*/
|
|
21716
|
+
durability: "session"
|
|
21451
21717
|
};
|
|
21452
21718
|
var EventItemSchema = object({
|
|
21453
21719
|
id: string(),
|
|
@@ -21728,7 +21994,14 @@ var fanControlCapability = {
|
|
|
21728
21994
|
* Runtime-state slice — mirrored by the kernel. UI fan speed
|
|
21729
21995
|
* sliders read `percentage` for live updates.
|
|
21730
21996
|
*/
|
|
21731
|
-
runtimeState: FanControlStatusSchema
|
|
21997
|
+
runtimeState: FanControlStatusSchema,
|
|
21998
|
+
/**
|
|
21999
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
22000
|
+
*
|
|
22001
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22002
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22003
|
+
*/
|
|
22004
|
+
durability: "session"
|
|
21732
22005
|
};
|
|
21733
22006
|
/**
|
|
21734
22007
|
* Per-device feature/identity probe slice. Holds the runtime-resolved
|
|
@@ -21804,7 +22077,14 @@ onProbeChanged: { data: object({
|
|
|
21804
22077
|
schema: FeatureProbeStatusSchema,
|
|
21805
22078
|
kind: "push"
|
|
21806
22079
|
},
|
|
21807
|
-
runtimeState: FeatureProbeStatusSchema
|
|
22080
|
+
runtimeState: FeatureProbeStatusSchema,
|
|
22081
|
+
/**
|
|
22082
|
+
* Runtime-state durability: **session** — per-session by definition — `lastProbedAt` means "this worker completed a probe THIS session", which is why the mirror seed already blanks it. Persisting it only creates something to blank.
|
|
22083
|
+
*
|
|
22084
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22085
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22086
|
+
*/
|
|
22087
|
+
durability: "session"
|
|
21808
22088
|
};
|
|
21809
22089
|
/**
|
|
21810
22090
|
* Water leak / moisture sensor. Boolean "is liquid currently
|
|
@@ -21831,7 +22111,17 @@ var floodCapability = {
|
|
|
21831
22111
|
schema: FloodStatusSchema,
|
|
21832
22112
|
kind: "push"
|
|
21833
22113
|
},
|
|
21834
|
-
runtimeState: FloodStatusSchema
|
|
22114
|
+
runtimeState: FloodStatusSchema,
|
|
22115
|
+
/**
|
|
22116
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
22117
|
+
*
|
|
22118
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22119
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22120
|
+
*/
|
|
22121
|
+
durability: "restored",
|
|
22122
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22123
|
+
* whether persisting is worth a SQLite commit. */
|
|
22124
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21835
22125
|
};
|
|
21836
22126
|
/**
|
|
21837
22127
|
* Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
|
|
@@ -21854,7 +22144,17 @@ var gasCapability = {
|
|
|
21854
22144
|
schema: GasStatusSchema,
|
|
21855
22145
|
kind: "push"
|
|
21856
22146
|
},
|
|
21857
|
-
runtimeState: GasStatusSchema
|
|
22147
|
+
runtimeState: GasStatusSchema,
|
|
22148
|
+
/**
|
|
22149
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
22150
|
+
*
|
|
22151
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22152
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22153
|
+
*/
|
|
22154
|
+
durability: "restored",
|
|
22155
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22156
|
+
* whether persisting is worth a SQLite commit. */
|
|
22157
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21858
22158
|
};
|
|
21859
22159
|
/**
|
|
21860
22160
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
@@ -21930,7 +22230,14 @@ var humidifierCapability = {
|
|
|
21930
22230
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
21931
22231
|
* slice for live humidity / mode changes.
|
|
21932
22232
|
*/
|
|
21933
|
-
runtimeState: HumidifierStatusSchema
|
|
22233
|
+
runtimeState: HumidifierStatusSchema,
|
|
22234
|
+
/**
|
|
22235
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
22236
|
+
*
|
|
22237
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22238
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22239
|
+
*/
|
|
22240
|
+
durability: "session"
|
|
21934
22241
|
};
|
|
21935
22242
|
/**
|
|
21936
22243
|
* Single-metric humidity reading. Drives Home Assistant `sensor`
|
|
@@ -21966,7 +22273,17 @@ var humiditySensorCapability = {
|
|
|
21966
22273
|
schema: HumiditySensorStatusSchema,
|
|
21967
22274
|
kind: "push"
|
|
21968
22275
|
},
|
|
21969
|
-
runtimeState: HumiditySensorStatusSchema
|
|
22276
|
+
runtimeState: HumiditySensorStatusSchema,
|
|
22277
|
+
/**
|
|
22278
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
|
|
22279
|
+
*
|
|
22280
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22281
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22282
|
+
*/
|
|
22283
|
+
durability: "restored",
|
|
22284
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22285
|
+
* whether persisting is worth a SQLite commit. */
|
|
22286
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21970
22287
|
};
|
|
21971
22288
|
/**
|
|
21972
22289
|
* Image display cap. Models a single still image exposed by an integration —
|
|
@@ -22004,7 +22321,14 @@ var imageCapability = {
|
|
|
22004
22321
|
* Runtime-state slice — mirrored by the kernel. The UI reads `url`
|
|
22005
22322
|
* directly and renders the still image.
|
|
22006
22323
|
*/
|
|
22007
|
-
runtimeState: ImageStatusSchema
|
|
22324
|
+
runtimeState: ImageStatusSchema,
|
|
22325
|
+
/**
|
|
22326
|
+
* Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
|
|
22327
|
+
*
|
|
22328
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22329
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22330
|
+
*/
|
|
22331
|
+
durability: "session"
|
|
22008
22332
|
};
|
|
22009
22333
|
/**
|
|
22010
22334
|
* Vendor-neutral image / picture-adjustment cap — the per-camera config
|
|
@@ -22153,7 +22477,17 @@ var imageSettingsCapability = {
|
|
|
22153
22477
|
schema: ImageSettingsStatusSchema,
|
|
22154
22478
|
kind: "poll"
|
|
22155
22479
|
},
|
|
22156
|
-
runtimeState: ImageSettingsStatusSchema
|
|
22480
|
+
runtimeState: ImageSettingsStatusSchema,
|
|
22481
|
+
/**
|
|
22482
|
+
* Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
|
|
22483
|
+
*
|
|
22484
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22485
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22486
|
+
*/
|
|
22487
|
+
durability: "restored",
|
|
22488
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22489
|
+
* whether persisting is worth a SQLite commit. */
|
|
22490
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22157
22491
|
};
|
|
22158
22492
|
/**
|
|
22159
22493
|
* integrations — system-scoped singleton capability for integration
|
|
@@ -22493,7 +22827,14 @@ var lawnMowerControlCapability = {
|
|
|
22493
22827
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
22494
22828
|
* slice for live activity + battery changes.
|
|
22495
22829
|
*/
|
|
22496
|
-
runtimeState: LawnMowerControlStatusSchema
|
|
22830
|
+
runtimeState: LawnMowerControlStatusSchema,
|
|
22831
|
+
/**
|
|
22832
|
+
* Runtime-state durability: **session** — as `vacuum-control`.
|
|
22833
|
+
*
|
|
22834
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22835
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22836
|
+
*/
|
|
22837
|
+
durability: "session"
|
|
22497
22838
|
};
|
|
22498
22839
|
/**
|
|
22499
22840
|
* local-network — hub-only singleton.
|
|
@@ -22699,7 +23040,17 @@ var lockControlCapability = {
|
|
|
22699
23040
|
* read `state` and disable themselves during `locking`/`unlocking`
|
|
22700
23041
|
* transitions.
|
|
22701
23042
|
*/
|
|
22702
|
-
runtimeState: LockControlStatusSchema
|
|
23043
|
+
runtimeState: LockControlStatusSchema,
|
|
23044
|
+
/**
|
|
23045
|
+
* Runtime-state durability: **restored** — a lock left locked must still read locked.
|
|
23046
|
+
*
|
|
23047
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23048
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23049
|
+
*/
|
|
23050
|
+
durability: "restored",
|
|
23051
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23052
|
+
* whether persisting is worth a SQLite commit. */
|
|
23053
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22703
23054
|
};
|
|
22704
23055
|
/**
|
|
22705
23056
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
@@ -22861,7 +23212,14 @@ var mediaPlayerCapability = {
|
|
|
22861
23212
|
* full slice for live now-playing, volume, and progress updates
|
|
22862
23213
|
* without polling.
|
|
22863
23214
|
*/
|
|
22864
|
-
runtimeState: MediaPlayerStatusSchema
|
|
23215
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
23216
|
+
/**
|
|
23217
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
23218
|
+
*
|
|
23219
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23220
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23221
|
+
*/
|
|
23222
|
+
durability: "session"
|
|
22865
23223
|
};
|
|
22866
23224
|
/**
|
|
22867
23225
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -23125,7 +23483,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
23125
23483
|
* `device.state.motion.value`. Reads never invoke the provider, so
|
|
23126
23484
|
* UIs and other addons can poll the cached state safely.
|
|
23127
23485
|
*/
|
|
23128
|
-
runtimeState: MotionStatusSchema
|
|
23486
|
+
runtimeState: MotionStatusSchema,
|
|
23487
|
+
/**
|
|
23488
|
+
* Runtime-state durability: **session** — self-clearing by construction (`autoClearAfterMs`); a restored `detected: true` is a frozen event, and the next frame re-publishes the real one.
|
|
23489
|
+
*
|
|
23490
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23491
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23492
|
+
*/
|
|
23493
|
+
durability: "session"
|
|
23129
23494
|
};
|
|
23130
23495
|
/**
|
|
23131
23496
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -23190,7 +23555,14 @@ var motionTriggerCapability = {
|
|
|
23190
23555
|
schema: MotionTriggerStatusSchema,
|
|
23191
23556
|
kind: "command-driven"
|
|
23192
23557
|
},
|
|
23193
|
-
runtimeState: MotionTriggerRuntimeStateSchema
|
|
23558
|
+
runtimeState: MotionTriggerRuntimeStateSchema,
|
|
23559
|
+
/**
|
|
23560
|
+
* Runtime-state durability: **session** — the authority for motion-trigger enablement is the provider's own config; the slice is a mirror of it, re-published on connect.
|
|
23561
|
+
*
|
|
23562
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23563
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23564
|
+
*/
|
|
23565
|
+
durability: "session"
|
|
23194
23566
|
};
|
|
23195
23567
|
/**
|
|
23196
23568
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
@@ -23257,7 +23629,17 @@ var motionZonesCapability = {
|
|
|
23257
23629
|
schema: MotionZoneStatusSchema,
|
|
23258
23630
|
kind: "poll"
|
|
23259
23631
|
},
|
|
23260
|
-
runtimeState: MotionZoneStatusSchema
|
|
23632
|
+
runtimeState: MotionZoneStatusSchema,
|
|
23633
|
+
/**
|
|
23634
|
+
* Runtime-state durability: **restored** — the 14 KB polygon list is the single largest slice on the fleet and has not changed since the operator drew it. Highest value per byte in the table.
|
|
23635
|
+
*
|
|
23636
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23637
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23638
|
+
*/
|
|
23639
|
+
durability: "restored",
|
|
23640
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23641
|
+
* whether persisting is worth a SQLite commit. */
|
|
23642
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23261
23643
|
};
|
|
23262
23644
|
/**
|
|
23263
23645
|
* On-camera AI object detection cap. Surfaces per-device the classes
|
|
@@ -23331,7 +23713,17 @@ var nativeObjectDetectionCapability = {
|
|
|
23331
23713
|
schema: NativeObjectDetectionStatusSchema,
|
|
23332
23714
|
kind: "push"
|
|
23333
23715
|
},
|
|
23334
|
-
runtimeState: NativeObjectDetectionRuntimeStateSchema
|
|
23716
|
+
runtimeState: NativeObjectDetectionRuntimeStateSchema,
|
|
23717
|
+
/**
|
|
23718
|
+
* Runtime-state durability: **restored** — `enabled` is an operator toggle on a camera whose refresh is a no-op and whose staleMs is Infinity. There is no hardware value to re-read — losing it loses the setting.
|
|
23719
|
+
*
|
|
23720
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23721
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23722
|
+
*/
|
|
23723
|
+
durability: "restored",
|
|
23724
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23725
|
+
* whether persisting is worth a SQLite commit. */
|
|
23726
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23335
23727
|
};
|
|
23336
23728
|
/**
|
|
23337
23729
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
@@ -23665,7 +24057,14 @@ onSent: { data: object({
|
|
|
23665
24057
|
* form reads `supports` to gate optional fields; history pane reads
|
|
23666
24058
|
* `lastSentAt` / `lastError` / `queueDepth`.
|
|
23667
24059
|
*/
|
|
23668
|
-
runtimeState: NotifierStatusSchema
|
|
24060
|
+
runtimeState: NotifierStatusSchema,
|
|
24061
|
+
/**
|
|
24062
|
+
* Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
|
|
24063
|
+
*
|
|
24064
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24065
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24066
|
+
*/
|
|
24067
|
+
durability: "session"
|
|
23669
24068
|
};
|
|
23670
24069
|
/**
|
|
23671
24070
|
* Generic numeric sensor — last-resort fallback when no typed numeric
|
|
@@ -23708,7 +24107,17 @@ var numericSensorCapability = {
|
|
|
23708
24107
|
schema: NumericSensorStatusSchema,
|
|
23709
24108
|
kind: "push"
|
|
23710
24109
|
},
|
|
23711
|
-
runtimeState: NumericSensorStatusSchema
|
|
24110
|
+
runtimeState: NumericSensorStatusSchema,
|
|
24111
|
+
/**
|
|
24112
|
+
* Runtime-state durability: **restored** — polled value, low churn once the clock is excluded (251 of 669 writes were the clock alone); restoring it removes the cold window before the first poll.
|
|
24113
|
+
*
|
|
24114
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24115
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24116
|
+
*/
|
|
24117
|
+
durability: "restored",
|
|
24118
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24119
|
+
* whether persisting is worth a SQLite commit. */
|
|
24120
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23712
24121
|
};
|
|
23713
24122
|
/**
|
|
23714
24123
|
* Generic on-screen-display (video overlay) cap. Each camera exposes
|
|
@@ -24093,7 +24502,14 @@ var petFeederCapability = {
|
|
|
24093
24502
|
* the full slice via `device.state.petFeeder.value` and refresh on
|
|
24094
24503
|
* every poll without re-querying the provider.
|
|
24095
24504
|
*/
|
|
24096
|
-
runtimeState: PetFeederStatusSchema
|
|
24505
|
+
runtimeState: PetFeederStatusSchema,
|
|
24506
|
+
/**
|
|
24507
|
+
* Runtime-state durability: **session** — live appliance state re-published on connect.
|
|
24508
|
+
*
|
|
24509
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24510
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24511
|
+
*/
|
|
24512
|
+
durability: "session"
|
|
24097
24513
|
};
|
|
24098
24514
|
var VehicleSchema = object({
|
|
24099
24515
|
id: string(),
|
|
@@ -24405,7 +24821,17 @@ var powerMeterCapability = {
|
|
|
24405
24821
|
schema: PowerMeterStatusSchema,
|
|
24406
24822
|
kind: "push"
|
|
24407
24823
|
},
|
|
24408
|
-
runtimeState: PowerMeterStatusSchema
|
|
24824
|
+
runtimeState: PowerMeterStatusSchema,
|
|
24825
|
+
/**
|
|
24826
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
|
|
24827
|
+
*
|
|
24828
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24829
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24830
|
+
*/
|
|
24831
|
+
durability: "restored",
|
|
24832
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24833
|
+
* whether persisting is worth a SQLite commit. */
|
|
24834
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24409
24835
|
};
|
|
24410
24836
|
/**
|
|
24411
24837
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
@@ -24462,7 +24888,17 @@ var presenceCapability = {
|
|
|
24462
24888
|
* the map pin is rendered (use `DeviceFeature.PresenceGps` for the
|
|
24463
24889
|
* pre-fetch fast-path check).
|
|
24464
24890
|
*/
|
|
24465
|
-
runtimeState: PresenceStatusSchema
|
|
24891
|
+
runtimeState: PresenceStatusSchema,
|
|
24892
|
+
/**
|
|
24893
|
+
* Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
|
|
24894
|
+
*
|
|
24895
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24896
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24897
|
+
*/
|
|
24898
|
+
durability: "restored",
|
|
24899
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24900
|
+
* whether persisting is worth a SQLite commit. */
|
|
24901
|
+
volatileStateFields: ["lastChangedAt"]
|
|
24466
24902
|
};
|
|
24467
24903
|
/**
|
|
24468
24904
|
* Atmospheric pressure reading in hectopascals. Drives Home Assistant
|
|
@@ -24498,7 +24934,17 @@ var pressureSensorCapability = {
|
|
|
24498
24934
|
schema: PressureSensorStatusSchema,
|
|
24499
24935
|
kind: "push"
|
|
24500
24936
|
},
|
|
24501
|
-
runtimeState: PressureSensorStatusSchema
|
|
24937
|
+
runtimeState: PressureSensorStatusSchema,
|
|
24938
|
+
/**
|
|
24939
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
24940
|
+
*
|
|
24941
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24942
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24943
|
+
*/
|
|
24944
|
+
durability: "restored",
|
|
24945
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24946
|
+
* whether persisting is worth a SQLite commit. */
|
|
24947
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24502
24948
|
};
|
|
24503
24949
|
/**
|
|
24504
24950
|
* PRIVACY — what the camera deliberately does not capture. Two planes:
|
|
@@ -24628,7 +25074,17 @@ var privacyMaskCapability = {
|
|
|
24628
25074
|
schema: PrivacyMaskStatusSchema,
|
|
24629
25075
|
kind: "poll"
|
|
24630
25076
|
},
|
|
24631
|
-
runtimeState: PrivacyMaskStatusSchema
|
|
25077
|
+
runtimeState: PrivacyMaskStatusSchema,
|
|
25078
|
+
/**
|
|
25079
|
+
* Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
|
|
25080
|
+
*
|
|
25081
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25082
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25083
|
+
*/
|
|
25084
|
+
durability: "restored",
|
|
25085
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25086
|
+
* whether persisting is worth a SQLite commit. */
|
|
25087
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24632
25088
|
};
|
|
24633
25089
|
var PtzPresetSchema = object({
|
|
24634
25090
|
id: string(),
|
|
@@ -24794,7 +25250,14 @@ var ptzAutotrackCapability = {
|
|
|
24794
25250
|
* fetch / cache / fallback logic out of the four cap methods —
|
|
24795
25251
|
* they become trampolines over `runtimeState`.
|
|
24796
25252
|
*/
|
|
24797
|
-
runtimeState: PtzAutotrackRuntimeStateSchema
|
|
25253
|
+
runtimeState: PtzAutotrackRuntimeStateSchema,
|
|
25254
|
+
/**
|
|
25255
|
+
* Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
|
|
25256
|
+
*
|
|
25257
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25258
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25259
|
+
*/
|
|
25260
|
+
durability: "session"
|
|
24798
25261
|
};
|
|
24799
25262
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
24800
25263
|
kind: "mutation",
|
|
@@ -25141,13 +25604,24 @@ method(object({
|
|
|
25141
25604
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25142
25605
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25143
25606
|
/**
|
|
25144
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25607
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25608
|
+
*
|
|
25609
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
25610
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
25611
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
25612
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
25613
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
25614
|
+
* the render side knows the segments, so the translation lives there
|
|
25615
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
25616
|
+
*
|
|
25617
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
25618
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
25619
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
25620
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
25621
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
25145
25622
|
*
|
|
25146
|
-
* Relative and not absolute epoch
|
|
25147
|
-
*
|
|
25148
|
-
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25149
|
-
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25150
|
-
* selects nothing — silently, as a uniform timelapse.
|
|
25623
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
25624
|
+
* call site responsible for the same subtraction.
|
|
25151
25625
|
*/
|
|
25152
25626
|
var ExportDenseRangeSchema = object({
|
|
25153
25627
|
fromSec: number().nonnegative(),
|
|
@@ -25433,7 +25907,14 @@ var sceneMonitorCapability = {
|
|
|
25433
25907
|
schema: SceneMonitorStatusSchema,
|
|
25434
25908
|
kind: "push"
|
|
25435
25909
|
},
|
|
25436
|
-
runtimeState: SceneMonitorStatusSchema
|
|
25910
|
+
runtimeState: SceneMonitorStatusSchema,
|
|
25911
|
+
/**
|
|
25912
|
+
* Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
|
|
25913
|
+
*
|
|
25914
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25915
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25916
|
+
*/
|
|
25917
|
+
durability: "session"
|
|
25437
25918
|
};
|
|
25438
25919
|
/**
|
|
25439
25920
|
* Per-stage gating mode applied to the zones a rule references.
|
|
@@ -25577,7 +26058,14 @@ var scriptRunnerCapability = {
|
|
|
25577
26058
|
* `isRunning` to render a spinner during execution and surfaces
|
|
25578
26059
|
* `lastError` / `lastRunSuccess` in the recent-runs panel.
|
|
25579
26060
|
*/
|
|
25580
|
-
runtimeState: ScriptRunnerStatusSchema
|
|
26061
|
+
runtimeState: ScriptRunnerStatusSchema,
|
|
26062
|
+
/**
|
|
26063
|
+
* Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
|
|
26064
|
+
*
|
|
26065
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26066
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26067
|
+
*/
|
|
26068
|
+
durability: "session"
|
|
25581
26069
|
};
|
|
25582
26070
|
/**
|
|
25583
26071
|
* Smoke alarm sensor — boolean "is smoke currently detected" with
|
|
@@ -25604,7 +26092,17 @@ var smokeCapability = {
|
|
|
25604
26092
|
schema: SmokeStatusSchema,
|
|
25605
26093
|
kind: "push"
|
|
25606
26094
|
},
|
|
25607
|
-
runtimeState: SmokeStatusSchema
|
|
26095
|
+
runtimeState: SmokeStatusSchema,
|
|
26096
|
+
/**
|
|
26097
|
+
* Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
|
|
26098
|
+
*
|
|
26099
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26100
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26101
|
+
*/
|
|
26102
|
+
durability: "restored",
|
|
26103
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26104
|
+
* whether persisting is worth a SQLite commit. */
|
|
26105
|
+
volatileStateFields: ["lastChangedAt"]
|
|
25608
26106
|
};
|
|
25609
26107
|
/**
|
|
25610
26108
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
@@ -25777,7 +26275,17 @@ var streamParamsCapability = {
|
|
|
25777
26275
|
schema: StreamParamsStatusSchema,
|
|
25778
26276
|
kind: "poll"
|
|
25779
26277
|
},
|
|
25780
|
-
runtimeState: StreamParamsStatusSchema
|
|
26278
|
+
runtimeState: StreamParamsStatusSchema,
|
|
26279
|
+
/**
|
|
26280
|
+
* Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
|
|
26281
|
+
*
|
|
26282
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26283
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26284
|
+
*/
|
|
26285
|
+
durability: "restored",
|
|
26286
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26287
|
+
* whether persisting is worth a SQLite commit. */
|
|
26288
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25781
26289
|
};
|
|
25782
26290
|
/**
|
|
25783
26291
|
* Generic on/off switch cap for accessory children (siren, floodlight,
|
|
@@ -25823,6 +26331,16 @@ var switchCapability = {
|
|
|
25823
26331
|
* not need to re-query the provider after a setState mutation.
|
|
25824
26332
|
*/
|
|
25825
26333
|
runtimeState: SwitchStatusSchema,
|
|
26334
|
+
/**
|
|
26335
|
+
* Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
|
|
26336
|
+
*
|
|
26337
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26338
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26339
|
+
*/
|
|
26340
|
+
durability: "restored",
|
|
26341
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26342
|
+
* whether persisting is worth a SQLite commit. */
|
|
26343
|
+
volatileStateFields: ["lastChangedAt"],
|
|
25826
26344
|
settings: { bindings: [{
|
|
25827
26345
|
kind: "scalar",
|
|
25828
26346
|
statusPath: "on",
|
|
@@ -25902,7 +26420,17 @@ var tamperCapability = {
|
|
|
25902
26420
|
schema: TamperStatusSchema,
|
|
25903
26421
|
kind: "push"
|
|
25904
26422
|
},
|
|
25905
|
-
runtimeState: TamperStatusSchema
|
|
26423
|
+
runtimeState: TamperStatusSchema,
|
|
26424
|
+
/**
|
|
26425
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
26426
|
+
*
|
|
26427
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26428
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26429
|
+
*/
|
|
26430
|
+
durability: "restored",
|
|
26431
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26432
|
+
* whether persisting is worth a SQLite commit. */
|
|
26433
|
+
volatileStateFields: ["lastChangedAt"]
|
|
25906
26434
|
};
|
|
25907
26435
|
/**
|
|
25908
26436
|
* Single-metric temperature reading. Drives Home Assistant `sensor`
|
|
@@ -25947,7 +26475,17 @@ var temperatureSensorCapability = {
|
|
|
25947
26475
|
schema: TemperatureSensorStatusSchema,
|
|
25948
26476
|
kind: "push"
|
|
25949
26477
|
},
|
|
25950
|
-
runtimeState: TemperatureSensorStatusSchema
|
|
26478
|
+
runtimeState: TemperatureSensorStatusSchema,
|
|
26479
|
+
/**
|
|
26480
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
|
|
26481
|
+
*
|
|
26482
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26483
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26484
|
+
*/
|
|
26485
|
+
durability: "restored",
|
|
26486
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26487
|
+
* whether persisting is worth a SQLite commit. */
|
|
26488
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25951
26489
|
};
|
|
25952
26490
|
/**
|
|
25953
26491
|
* toast — system-scoped singleton capability that streams toast
|
|
@@ -26016,7 +26554,14 @@ var updateCapability = {
|
|
|
26016
26554
|
schema: UpdateStatusSchema,
|
|
26017
26555
|
kind: "poll"
|
|
26018
26556
|
},
|
|
26019
|
-
runtimeState: UpdateStatusSchema
|
|
26557
|
+
runtimeState: UpdateStatusSchema,
|
|
26558
|
+
/**
|
|
26559
|
+
* Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
|
|
26560
|
+
*
|
|
26561
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26562
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26563
|
+
*/
|
|
26564
|
+
durability: "session"
|
|
26020
26565
|
};
|
|
26021
26566
|
var UserSummarySchema = object({
|
|
26022
26567
|
id: string(),
|
|
@@ -26350,7 +26895,14 @@ var vacuumControlCapability = {
|
|
|
26350
26895
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
26351
26896
|
* slice for live state + battery + fan-speed changes.
|
|
26352
26897
|
*/
|
|
26353
|
-
runtimeState: VacuumControlStatusSchema
|
|
26898
|
+
runtimeState: VacuumControlStatusSchema,
|
|
26899
|
+
/**
|
|
26900
|
+
* Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
|
|
26901
|
+
*
|
|
26902
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26903
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26904
|
+
*/
|
|
26905
|
+
durability: "session"
|
|
26354
26906
|
};
|
|
26355
26907
|
var ValveStatusSchema = object({
|
|
26356
26908
|
/** Lifecycle state of the valve. */
|
|
@@ -26402,7 +26954,14 @@ var valveCapability = {
|
|
|
26402
26954
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
26403
26955
|
* slice for live position changes during a move.
|
|
26404
26956
|
*/
|
|
26405
|
-
runtimeState: ValveStatusSchema
|
|
26957
|
+
runtimeState: ValveStatusSchema,
|
|
26958
|
+
/**
|
|
26959
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
26960
|
+
*
|
|
26961
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26962
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26963
|
+
*/
|
|
26964
|
+
durability: "session"
|
|
26406
26965
|
};
|
|
26407
26966
|
/**
|
|
26408
26967
|
* Vibration / shake / impact sensor. Drives Home Assistant
|
|
@@ -26424,7 +26983,17 @@ var vibrationCapability = {
|
|
|
26424
26983
|
schema: VibrationStatusSchema,
|
|
26425
26984
|
kind: "push"
|
|
26426
26985
|
},
|
|
26427
|
-
runtimeState: VibrationStatusSchema
|
|
26986
|
+
runtimeState: VibrationStatusSchema,
|
|
26987
|
+
/**
|
|
26988
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
26989
|
+
*
|
|
26990
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26991
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26992
|
+
*/
|
|
26993
|
+
durability: "restored",
|
|
26994
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26995
|
+
* whether persisting is worth a SQLite commit. */
|
|
26996
|
+
volatileStateFields: ["lastChangedAt"]
|
|
26428
26997
|
};
|
|
26429
26998
|
/**
|
|
26430
26999
|
* Water heater / boiler cap. Models HA `water_heater.*` entities — a
|
|
@@ -26498,7 +27067,14 @@ var waterHeaterCapability = {
|
|
|
26498
27067
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
26499
27068
|
* slice for live temperature / mode / away changes.
|
|
26500
27069
|
*/
|
|
26501
|
-
runtimeState: WaterHeaterStatusSchema
|
|
27070
|
+
runtimeState: WaterHeaterStatusSchema,
|
|
27071
|
+
/**
|
|
27072
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
27073
|
+
*
|
|
27074
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27075
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27076
|
+
*/
|
|
27077
|
+
durability: "session"
|
|
26502
27078
|
};
|
|
26503
27079
|
/**
|
|
26504
27080
|
* Weather provider cap. Models HA `weather.*` entities — a read-only
|
|
@@ -26557,7 +27133,14 @@ var weatherCapability = {
|
|
|
26557
27133
|
* Runtime-state slice — mirrored by the kernel. The UI reads the
|
|
26558
27134
|
* current conditions directly from the slice on each weather push.
|
|
26559
27135
|
*/
|
|
26560
|
-
runtimeState: WeatherStatusSchema
|
|
27136
|
+
runtimeState: WeatherStatusSchema,
|
|
27137
|
+
/**
|
|
27138
|
+
* Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
|
|
27139
|
+
*
|
|
27140
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27141
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27142
|
+
*/
|
|
27143
|
+
durability: "session"
|
|
26561
27144
|
};
|
|
26562
27145
|
/**
|
|
26563
27146
|
* Per-zone occupancy aggregation produced by the analytics frame
|
|
@@ -26719,7 +27302,14 @@ var zoneAnalyticsCapability = {
|
|
|
26719
27302
|
* automatically; the explicit `getCurrentSnapshot` cap method is
|
|
26720
27303
|
* still useful for one-off polls without a subscription.
|
|
26721
27304
|
*/
|
|
26722
|
-
runtimeState: CameraOccupancySnapshotSchema
|
|
27305
|
+
runtimeState: CameraOccupancySnapshotSchema,
|
|
27306
|
+
/**
|
|
27307
|
+
* Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
|
|
27308
|
+
*
|
|
27309
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27310
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27311
|
+
*/
|
|
27312
|
+
durability: "session"
|
|
26723
27313
|
};
|
|
26724
27314
|
/**
|
|
26725
27315
|
* Stages a {@link ZoneRule} can apply to. Discriminator on the rules
|
|
@@ -26797,7 +27387,14 @@ var zoneRulesCapability = {
|
|
|
26797
27387
|
motion: array(ZoneRuleSchema).readonly(),
|
|
26798
27388
|
detection: array(ZoneRuleSchema).readonly(),
|
|
26799
27389
|
package: array(ZoneRuleSchema).readonly()
|
|
26800
|
-
})
|
|
27390
|
+
}),
|
|
27391
|
+
/**
|
|
27392
|
+
* Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
|
|
27393
|
+
*
|
|
27394
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27395
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27396
|
+
*/
|
|
27397
|
+
durability: "restored"
|
|
26801
27398
|
};
|
|
26802
27399
|
/**
|
|
26803
27400
|
* Accessory device helpers — shared across drivers.
|
|
@@ -33484,6 +34081,7 @@ Object.freeze({
|
|
|
33484
34081
|
"network-access": "ingress",
|
|
33485
34082
|
"smtp-provider": "email"
|
|
33486
34083
|
});
|
|
34084
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
33487
34085
|
new Set(["devices", "classes"]);
|
|
33488
34086
|
/**
|
|
33489
34087
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -33761,25 +34359,32 @@ object({
|
|
|
33761
34359
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
33762
34360
|
object({
|
|
33763
34361
|
/**
|
|
33764
|
-
* How
|
|
34362
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
34363
|
+
* detection result.
|
|
33765
34364
|
*
|
|
33766
|
-
*
|
|
33767
|
-
*
|
|
33768
|
-
*
|
|
33769
|
-
*
|
|
33770
|
-
*
|
|
34365
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
34366
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
34367
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
34368
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
34369
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
34370
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
34371
|
+
*
|
|
34372
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
34373
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
34374
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
34375
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
34376
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
33771
34377
|
*/
|
|
33772
|
-
|
|
34378
|
+
holdFrames: number().int().min(1).max(64),
|
|
33773
34379
|
/**
|
|
33774
34380
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
33775
34381
|
*
|
|
33776
|
-
*
|
|
33777
|
-
*
|
|
33778
|
-
*
|
|
33779
|
-
*
|
|
33780
|
-
*
|
|
33781
|
-
*
|
|
33782
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
34382
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
34383
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
34384
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
34385
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
34386
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
34387
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
33783
34388
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
33784
34389
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
33785
34390
|
* to replace).
|
|
@@ -33805,22 +34410,45 @@ object({
|
|
|
33805
34410
|
* there is the signal that some caller names frames outside the inference set
|
|
33806
34411
|
* and that this must go back to `all`.
|
|
33807
34412
|
*/
|
|
33808
|
-
admission: NativeLeaseAdmissionSchema
|
|
34413
|
+
admission: NativeLeaseAdmissionSchema,
|
|
34414
|
+
/**
|
|
34415
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
34416
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
34417
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
34418
|
+
*
|
|
34419
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
34420
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
34421
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
34422
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
34423
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
34424
|
+
* was interrogated per SUBJECT.
|
|
34425
|
+
*
|
|
34426
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
34427
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34428
|
+
* reproduce that.
|
|
34429
|
+
*/
|
|
34430
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
33809
34431
|
});
|
|
33810
34432
|
/**
|
|
33811
|
-
* The values in force when the operator has set nothing
|
|
33812
|
-
*
|
|
33813
|
-
*
|
|
34433
|
+
* The values in force when the operator has set nothing.
|
|
34434
|
+
*
|
|
34435
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
34436
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
34437
|
+
* in the same change that redefines it would make a regression and a retune
|
|
34438
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
34439
|
+
* live traffic.
|
|
33814
34440
|
*/
|
|
33815
34441
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
33816
|
-
|
|
34442
|
+
holdFrames: 8,
|
|
33817
34443
|
budgetMb: 1024,
|
|
33818
34444
|
activityMs: 15e3,
|
|
34445
|
+
tileBudgetMb: 64,
|
|
33819
34446
|
admission: "inferred"
|
|
33820
34447
|
};
|
|
33821
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
34448
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
33822
34449
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
33823
34450
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34451
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
33824
34452
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
33825
34453
|
//#endregion
|
|
33826
34454
|
//#region src/config.ts
|