@camstack/addon-provider-tuya 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.mjs
CHANGED
|
@@ -11590,7 +11590,14 @@ var cameraStreamsCapability = {
|
|
|
11590
11590
|
low: string().optional()
|
|
11591
11591
|
}),
|
|
11592
11592
|
lastChangedAt: number()
|
|
11593
|
-
})
|
|
11593
|
+
}),
|
|
11594
|
+
/**
|
|
11595
|
+
* 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.
|
|
11596
|
+
*
|
|
11597
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11598
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11599
|
+
*/
|
|
11600
|
+
durability: "session"
|
|
11594
11601
|
};
|
|
11595
11602
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
11596
11603
|
* agent is the reason placement is not fixed to the hub. */
|
|
@@ -12151,6 +12158,13 @@ var deviceDiscoveryCapability = {
|
|
|
12151
12158
|
kind: "poll"
|
|
12152
12159
|
},
|
|
12153
12160
|
runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
|
|
12161
|
+
/**
|
|
12162
|
+
* Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
|
|
12163
|
+
*
|
|
12164
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
12165
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
12166
|
+
*/
|
|
12167
|
+
durability: "session",
|
|
12154
12168
|
methods: {
|
|
12155
12169
|
/**
|
|
12156
12170
|
* Snapshot of the current `discovered` list. Returns the
|
|
@@ -14067,7 +14081,23 @@ var NotificationActionSchema = object({
|
|
|
14067
14081
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
14068
14082
|
* does not buy.
|
|
14069
14083
|
*/
|
|
14070
|
-
destructive: boolean().optional()
|
|
14084
|
+
destructive: boolean().optional(),
|
|
14085
|
+
/**
|
|
14086
|
+
* How the tap should REACH the url.
|
|
14087
|
+
*
|
|
14088
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
14089
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
14090
|
+
* That is right for a button whose answer the operator wants to read.
|
|
14091
|
+
*
|
|
14092
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
14093
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
14094
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
14095
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
14096
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
14097
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
14098
|
+
* a requirement.
|
|
14099
|
+
*/
|
|
14100
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
14071
14101
|
});
|
|
14072
14102
|
/**
|
|
14073
14103
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14919,7 +14949,17 @@ var alarmPanelCapability = {
|
|
|
14919
14949
|
* full slice; renders an arm button per `availableModes` entry and
|
|
14920
14950
|
* a PIN field iff `requiresCode === true`.
|
|
14921
14951
|
*/
|
|
14922
|
-
runtimeState: AlarmPanelStatusSchema
|
|
14952
|
+
runtimeState: AlarmPanelStatusSchema,
|
|
14953
|
+
/**
|
|
14954
|
+
* Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
|
|
14955
|
+
*
|
|
14956
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
14957
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
14958
|
+
*/
|
|
14959
|
+
durability: "restored",
|
|
14960
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
14961
|
+
* whether persisting is worth a SQLite commit. */
|
|
14962
|
+
volatileStateFields: ["lastChangedAt"]
|
|
14923
14963
|
};
|
|
14924
14964
|
/**
|
|
14925
14965
|
* Shared geometry vocabulary for on-frame shape caps — privacy-mask,
|
|
@@ -15096,6 +15136,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
15096
15136
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
15097
15137
|
packageNames: array(string().min(1)).min(1).optional()
|
|
15098
15138
|
});
|
|
15139
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
15140
|
+
* outage the operator asked for once and forgot. */
|
|
15141
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
15099
15142
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
15100
15143
|
var NcScheduleSchema = object({
|
|
15101
15144
|
windows: array(object({
|
|
@@ -15472,15 +15515,15 @@ var NcConditionsSchema = object({
|
|
|
15472
15515
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
15473
15516
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
15474
15517
|
*
|
|
15475
|
-
*
|
|
15476
|
-
* rather than an
|
|
15477
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
15478
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
15518
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
15519
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
15520
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
15521
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
15479
15522
|
* condition fields it does not know when a rule is saved from the phone.
|
|
15480
15523
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
15481
|
-
* operator loses a rule's conditions by opening it — so the
|
|
15482
|
-
*
|
|
15483
|
-
*
|
|
15524
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
15525
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
15526
|
+
* follows here.
|
|
15484
15527
|
*/
|
|
15485
15528
|
audio: NcAudioConditionSchema.optional()
|
|
15486
15529
|
});
|
|
@@ -15716,6 +15759,30 @@ var NcRuleInputSchema = object({
|
|
|
15716
15759
|
*/
|
|
15717
15760
|
snoozeAllowGlobal: boolean().optional(),
|
|
15718
15761
|
/**
|
|
15762
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
15763
|
+
* minutes.
|
|
15764
|
+
*
|
|
15765
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
15766
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
15767
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
15768
|
+
* would collapse the first two:
|
|
15769
|
+
*
|
|
15770
|
+
* | value | meaning |
|
|
15771
|
+
* | --- | --- |
|
|
15772
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
15773
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
15774
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
15775
|
+
*
|
|
15776
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
15777
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
15778
|
+
* would push its own tap-through actions off the notification.
|
|
15779
|
+
*
|
|
15780
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
15781
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
15782
|
+
* window from anywhere (D133).
|
|
15783
|
+
*/
|
|
15784
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
15785
|
+
/**
|
|
15719
15786
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
15720
15787
|
*
|
|
15721
15788
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -15815,6 +15882,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
15815
15882
|
"device",
|
|
15816
15883
|
"package",
|
|
15817
15884
|
"occupancy",
|
|
15885
|
+
"audio",
|
|
15818
15886
|
"system"
|
|
15819
15887
|
]),
|
|
15820
15888
|
label: string(),
|
|
@@ -15833,6 +15901,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
15833
15901
|
"crossingSelect",
|
|
15834
15902
|
"polygonDraw",
|
|
15835
15903
|
"occupancy",
|
|
15904
|
+
"audio",
|
|
15836
15905
|
"deviceState",
|
|
15837
15906
|
"systemEvent"
|
|
15838
15907
|
]),
|
|
@@ -15984,7 +16053,20 @@ var NcSnoozeInputSchema = object({
|
|
|
15984
16053
|
ruleId: string().optional(),
|
|
15985
16054
|
/** Required when `scope: 'device'`. */
|
|
15986
16055
|
deviceId: number().int().optional(),
|
|
15987
|
-
|
|
16056
|
+
/**
|
|
16057
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
16058
|
+
*
|
|
16059
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
16060
|
+
* what every window authored before this field meant, so no persisted row
|
|
16061
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
16062
|
+
*
|
|
16063
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
16064
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
16065
|
+
* not at whichever of their four rules happened to produce the notification
|
|
16066
|
+
* they are dismissing.
|
|
16067
|
+
*/
|
|
16068
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
16069
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
15988
16070
|
/**
|
|
15989
16071
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
15990
16072
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -16009,6 +16091,10 @@ var NcSnoozeSchema = object({
|
|
|
16009
16091
|
scope: NcSnoozeScopeSchema,
|
|
16010
16092
|
ruleId: string().optional(),
|
|
16011
16093
|
deviceId: number().int().optional(),
|
|
16094
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
16095
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
16096
|
+
* no SQLite column: nothing queries a window by class. */
|
|
16097
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
16012
16098
|
startedAt: number(),
|
|
16013
16099
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
16014
16100
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -18109,7 +18195,14 @@ var zonesCapability = {
|
|
|
18109
18195
|
* handle. Slice shape is `{ zones: Zone[] }` so future extensions
|
|
18110
18196
|
* (e.g. zone groupings) can sit alongside the polygon list.
|
|
18111
18197
|
*/
|
|
18112
|
-
runtimeState: object({ zones: array(ZoneSchema).readonly() })
|
|
18198
|
+
runtimeState: object({ zones: array(ZoneSchema).readonly() }),
|
|
18199
|
+
/**
|
|
18200
|
+
* 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.
|
|
18201
|
+
*
|
|
18202
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
18203
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
18204
|
+
*/
|
|
18205
|
+
durability: "restored"
|
|
18113
18206
|
};
|
|
18114
18207
|
/**
|
|
18115
18208
|
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
@@ -20908,7 +21001,17 @@ var airQualitySensorCapability = {
|
|
|
20908
21001
|
schema: AirQualitySensorStatusSchema,
|
|
20909
21002
|
kind: "push"
|
|
20910
21003
|
},
|
|
20911
|
-
runtimeState: AirQualitySensorStatusSchema
|
|
21004
|
+
runtimeState: AirQualitySensorStatusSchema,
|
|
21005
|
+
/**
|
|
21006
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
21007
|
+
*
|
|
21008
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21009
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21010
|
+
*/
|
|
21011
|
+
durability: "restored",
|
|
21012
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21013
|
+
* whether persisting is worth a SQLite commit. */
|
|
21014
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
20912
21015
|
};
|
|
20913
21016
|
/**
|
|
20914
21017
|
* Ambient illuminance reading in lux. Drives Home Assistant `sensor`
|
|
@@ -20940,7 +21043,17 @@ var ambientLightSensorCapability = {
|
|
|
20940
21043
|
schema: AmbientLightSensorStatusSchema,
|
|
20941
21044
|
kind: "push"
|
|
20942
21045
|
},
|
|
20943
|
-
runtimeState: AmbientLightSensorStatusSchema
|
|
21046
|
+
runtimeState: AmbientLightSensorStatusSchema,
|
|
21047
|
+
/**
|
|
21048
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
21049
|
+
*
|
|
21050
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21051
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21052
|
+
*/
|
|
21053
|
+
durability: "restored",
|
|
21054
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21055
|
+
* whether persisting is worth a SQLite commit. */
|
|
21056
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
20944
21057
|
};
|
|
20945
21058
|
/**
|
|
20946
21059
|
* Per-class audio metrics aggregated over a sliding window.
|
|
@@ -21058,7 +21171,14 @@ var audioMetricsCapability = {
|
|
|
21058
21171
|
}), AudioMetricsHistorySchema)
|
|
21059
21172
|
},
|
|
21060
21173
|
/** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
|
|
21061
|
-
runtimeState: AudioMetricsSnapshotSchema
|
|
21174
|
+
runtimeState: AudioMetricsSnapshotSchema,
|
|
21175
|
+
/**
|
|
21176
|
+
* 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.
|
|
21177
|
+
*
|
|
21178
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21179
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21180
|
+
*/
|
|
21181
|
+
durability: "session"
|
|
21062
21182
|
};
|
|
21063
21183
|
/**
|
|
21064
21184
|
* Automation-control cap. Models HA `automation.*` entities on
|
|
@@ -21120,7 +21240,14 @@ var automationControlCapability = {
|
|
|
21120
21240
|
* reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
|
|
21121
21241
|
* (badge) directly.
|
|
21122
21242
|
*/
|
|
21123
|
-
runtimeState: AutomationControlStatusSchema
|
|
21243
|
+
runtimeState: AutomationControlStatusSchema,
|
|
21244
|
+
/**
|
|
21245
|
+
* 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.
|
|
21246
|
+
*
|
|
21247
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21248
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21249
|
+
*/
|
|
21250
|
+
durability: "session"
|
|
21124
21251
|
};
|
|
21125
21252
|
/**
|
|
21126
21253
|
* Battery status snapshot. Emitted by providers whose device is
|
|
@@ -21226,7 +21353,17 @@ onStatusChanged: { data: object({
|
|
|
21226
21353
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
21227
21354
|
* the underlying driver.
|
|
21228
21355
|
*/
|
|
21229
|
-
runtimeState: BatteryStatusSchema
|
|
21356
|
+
runtimeState: BatteryStatusSchema,
|
|
21357
|
+
/**
|
|
21358
|
+
* 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.
|
|
21359
|
+
*
|
|
21360
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21361
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21362
|
+
*/
|
|
21363
|
+
durability: "restored",
|
|
21364
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21365
|
+
* whether persisting is worth a SQLite commit. */
|
|
21366
|
+
volatileStateFields: ["lastUpdated"]
|
|
21230
21367
|
};
|
|
21231
21368
|
/**
|
|
21232
21369
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
@@ -21255,7 +21392,17 @@ var binaryCapability = {
|
|
|
21255
21392
|
schema: BinaryStatusSchema,
|
|
21256
21393
|
kind: "push"
|
|
21257
21394
|
},
|
|
21258
|
-
runtimeState: BinaryStatusSchema
|
|
21395
|
+
runtimeState: BinaryStatusSchema,
|
|
21396
|
+
/**
|
|
21397
|
+
* Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
|
|
21398
|
+
*
|
|
21399
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21400
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21401
|
+
*/
|
|
21402
|
+
durability: "restored",
|
|
21403
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21404
|
+
* whether persisting is worth a SQLite commit. */
|
|
21405
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21259
21406
|
};
|
|
21260
21407
|
/**
|
|
21261
21408
|
* Dimmable-light brightness control. Co-exists with `switch` on the
|
|
@@ -21308,7 +21455,14 @@ onBrightnessChanged: { data: object({
|
|
|
21308
21455
|
* by the kernel. Read via `device.state.brightness.value` so UI
|
|
21309
21456
|
* sliders surface the current level without polling the provider.
|
|
21310
21457
|
*/
|
|
21311
|
-
runtimeState: BrightnessStatusSchema
|
|
21458
|
+
runtimeState: BrightnessStatusSchema,
|
|
21459
|
+
/**
|
|
21460
|
+
* Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
|
|
21461
|
+
*
|
|
21462
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21463
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21464
|
+
*/
|
|
21465
|
+
durability: "session"
|
|
21312
21466
|
};
|
|
21313
21467
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
21314
21468
|
kind: "mutation",
|
|
@@ -21396,7 +21550,17 @@ var carbonMonoxideCapability = {
|
|
|
21396
21550
|
schema: CarbonMonoxideStatusSchema,
|
|
21397
21551
|
kind: "push"
|
|
21398
21552
|
},
|
|
21399
|
-
runtimeState: CarbonMonoxideStatusSchema
|
|
21553
|
+
runtimeState: CarbonMonoxideStatusSchema,
|
|
21554
|
+
/**
|
|
21555
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
21556
|
+
*
|
|
21557
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21558
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21559
|
+
*/
|
|
21560
|
+
durability: "restored",
|
|
21561
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21562
|
+
* whether persisting is worth a SQLite commit. */
|
|
21563
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21400
21564
|
};
|
|
21401
21565
|
/**
|
|
21402
21566
|
* HVAC / climate control cap. Models the full surface of a HA
|
|
@@ -21556,7 +21720,14 @@ var climateControlCapability = {
|
|
|
21556
21720
|
* the full slice via `device.state.climate-control.value` and refresh
|
|
21557
21721
|
* on every push without re-querying the provider.
|
|
21558
21722
|
*/
|
|
21559
|
-
runtimeState: ClimateControlStatusSchema
|
|
21723
|
+
runtimeState: ClimateControlStatusSchema,
|
|
21724
|
+
/**
|
|
21725
|
+
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
21726
|
+
*
|
|
21727
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21728
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21729
|
+
*/
|
|
21730
|
+
durability: "session"
|
|
21560
21731
|
};
|
|
21561
21732
|
/**
|
|
21562
21733
|
* Color-light cap. Coexists with `switch` (on/off) and `brightness`
|
|
@@ -21666,7 +21837,14 @@ onColorChanged: { data: object({
|
|
|
21666
21837
|
* kernel. Read via `device.state.color.value` so UI pickers surface
|
|
21667
21838
|
* the current chromaticity without polling the provider.
|
|
21668
21839
|
*/
|
|
21669
|
-
runtimeState: ColorStatusSchema
|
|
21840
|
+
runtimeState: ColorStatusSchema,
|
|
21841
|
+
/**
|
|
21842
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
21843
|
+
*
|
|
21844
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21845
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21846
|
+
*/
|
|
21847
|
+
durability: "session"
|
|
21670
21848
|
};
|
|
21671
21849
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
21672
21850
|
object({
|
|
@@ -21732,7 +21910,17 @@ var connectivityCapability = {
|
|
|
21732
21910
|
schema: ConnectivityStatusSchema,
|
|
21733
21911
|
kind: "push"
|
|
21734
21912
|
},
|
|
21735
|
-
runtimeState: ConnectivityStatusSchema
|
|
21913
|
+
runtimeState: ConnectivityStatusSchema,
|
|
21914
|
+
/**
|
|
21915
|
+
* Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
|
|
21916
|
+
*
|
|
21917
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21918
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21919
|
+
*/
|
|
21920
|
+
durability: "restored",
|
|
21921
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21922
|
+
* whether persisting is worth a SQLite commit. */
|
|
21923
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21736
21924
|
};
|
|
21737
21925
|
/**
|
|
21738
21926
|
* Generic device-consumables capability — surfaces a device's
|
|
@@ -21814,7 +22002,14 @@ reset: method(object({
|
|
|
21814
22002
|
}
|
|
21815
22003
|
}
|
|
21816
22004
|
},
|
|
21817
|
-
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
|
|
22005
|
+
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
|
|
22006
|
+
/**
|
|
22007
|
+
* Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
|
|
22008
|
+
*
|
|
22009
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22010
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22011
|
+
*/
|
|
22012
|
+
durability: "session"
|
|
21818
22013
|
};
|
|
21819
22014
|
/**
|
|
21820
22015
|
* Door / window / opening / garage / valve contact sensor. Boolean
|
|
@@ -21845,7 +22040,17 @@ var contactCapability = {
|
|
|
21845
22040
|
schema: ContactStatusSchema,
|
|
21846
22041
|
kind: "push"
|
|
21847
22042
|
},
|
|
21848
|
-
runtimeState: ContactStatusSchema
|
|
22043
|
+
runtimeState: ContactStatusSchema,
|
|
22044
|
+
/**
|
|
22045
|
+
* Runtime-state durability: **restored** — a door left open across a restart must still read open.
|
|
22046
|
+
*
|
|
22047
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22048
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22049
|
+
*/
|
|
22050
|
+
durability: "restored",
|
|
22051
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22052
|
+
* whether persisting is worth a SQLite commit. */
|
|
22053
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21849
22054
|
};
|
|
21850
22055
|
/**
|
|
21851
22056
|
* Status slice — flat object (the framework's `runtimeState` contract
|
|
@@ -21951,7 +22156,14 @@ var controlCapability = {
|
|
|
21951
22156
|
* dropdown / text field / date picker) read the slice's discriminant
|
|
21952
22157
|
* and value directly without polling the provider.
|
|
21953
22158
|
*/
|
|
21954
|
-
runtimeState: ControlStatusSchema
|
|
22159
|
+
runtimeState: ControlStatusSchema,
|
|
22160
|
+
/**
|
|
22161
|
+
* Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
|
|
22162
|
+
*
|
|
22163
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22164
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22165
|
+
*/
|
|
22166
|
+
durability: "session"
|
|
21955
22167
|
};
|
|
21956
22168
|
var CoverStatusSchema = object({
|
|
21957
22169
|
/** Lifecycle state of the cover. */
|
|
@@ -22012,7 +22224,17 @@ var coverCapability = {
|
|
|
22012
22224
|
* Runtime-state slice — mirrored by the kernel. UI controls watch
|
|
22013
22225
|
* the slice for live position changes during a move.
|
|
22014
22226
|
*/
|
|
22015
|
-
runtimeState: CoverStatusSchema
|
|
22227
|
+
runtimeState: CoverStatusSchema,
|
|
22228
|
+
/**
|
|
22229
|
+
* Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
|
|
22230
|
+
*
|
|
22231
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22232
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22233
|
+
*/
|
|
22234
|
+
durability: "restored",
|
|
22235
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22236
|
+
* whether persisting is worth a SQLite commit. */
|
|
22237
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22016
22238
|
};
|
|
22017
22239
|
/**
|
|
22018
22240
|
* Vendor-neutral day/night (IR-cut) control — the per-camera config cap
|
|
@@ -22106,7 +22328,17 @@ var dayNightCapability = {
|
|
|
22106
22328
|
schema: DayNightStatusSchema,
|
|
22107
22329
|
kind: "poll"
|
|
22108
22330
|
},
|
|
22109
|
-
runtimeState: DayNightStatusSchema
|
|
22331
|
+
runtimeState: DayNightStatusSchema,
|
|
22332
|
+
/**
|
|
22333
|
+
* Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
|
|
22334
|
+
*
|
|
22335
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22336
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22337
|
+
*/
|
|
22338
|
+
durability: "restored",
|
|
22339
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22340
|
+
* whether persisting is worth a SQLite commit. */
|
|
22341
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22110
22342
|
};
|
|
22111
22343
|
/**
|
|
22112
22344
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
@@ -22153,7 +22385,17 @@ onStatusChanged: { data: object({
|
|
|
22153
22385
|
schema: DeviceStatusSchema,
|
|
22154
22386
|
kind: "push"
|
|
22155
22387
|
},
|
|
22156
|
-
runtimeState: DeviceStatusSchema
|
|
22388
|
+
runtimeState: DeviceStatusSchema,
|
|
22389
|
+
/**
|
|
22390
|
+
* 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.
|
|
22391
|
+
*
|
|
22392
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22393
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22394
|
+
*/
|
|
22395
|
+
durability: "restored",
|
|
22396
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22397
|
+
* whether persisting is worth a SQLite commit. */
|
|
22398
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22157
22399
|
};
|
|
22158
22400
|
/**
|
|
22159
22401
|
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
@@ -22215,7 +22457,14 @@ onPressed: { data: DoorbellPressEventSchema } },
|
|
|
22215
22457
|
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
22216
22458
|
* without subscribing.
|
|
22217
22459
|
*/
|
|
22218
|
-
runtimeState: DoorbellStatusSchema
|
|
22460
|
+
runtimeState: DoorbellStatusSchema,
|
|
22461
|
+
/**
|
|
22462
|
+
* 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.
|
|
22463
|
+
*
|
|
22464
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22465
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22466
|
+
*/
|
|
22467
|
+
durability: "restored"
|
|
22219
22468
|
};
|
|
22220
22469
|
/**
|
|
22221
22470
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -22255,7 +22504,17 @@ var enumSensorCapability = {
|
|
|
22255
22504
|
schema: EnumSensorStatusSchema,
|
|
22256
22505
|
kind: "push"
|
|
22257
22506
|
},
|
|
22258
|
-
runtimeState: EnumSensorStatusSchema
|
|
22507
|
+
runtimeState: EnumSensorStatusSchema,
|
|
22508
|
+
/**
|
|
22509
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
|
|
22510
|
+
*
|
|
22511
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22512
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22513
|
+
*/
|
|
22514
|
+
durability: "restored",
|
|
22515
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22516
|
+
* whether persisting is worth a SQLite commit. */
|
|
22517
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22259
22518
|
};
|
|
22260
22519
|
/**
|
|
22261
22520
|
* Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
|
|
@@ -22291,7 +22550,14 @@ var eventEmitterCapability = {
|
|
|
22291
22550
|
schema: EventEmitterStatusSchema,
|
|
22292
22551
|
kind: "push"
|
|
22293
22552
|
},
|
|
22294
|
-
runtimeState: EventEmitterStatusSchema
|
|
22553
|
+
runtimeState: EventEmitterStatusSchema,
|
|
22554
|
+
/**
|
|
22555
|
+
* Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
|
|
22556
|
+
*
|
|
22557
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22558
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22559
|
+
*/
|
|
22560
|
+
durability: "session"
|
|
22295
22561
|
};
|
|
22296
22562
|
var EventItemSchema = object({
|
|
22297
22563
|
id: string(),
|
|
@@ -22572,7 +22838,14 @@ var fanControlCapability = {
|
|
|
22572
22838
|
* Runtime-state slice — mirrored by the kernel. UI fan speed
|
|
22573
22839
|
* sliders read `percentage` for live updates.
|
|
22574
22840
|
*/
|
|
22575
|
-
runtimeState: FanControlStatusSchema
|
|
22841
|
+
runtimeState: FanControlStatusSchema,
|
|
22842
|
+
/**
|
|
22843
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
22844
|
+
*
|
|
22845
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22846
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22847
|
+
*/
|
|
22848
|
+
durability: "session"
|
|
22576
22849
|
};
|
|
22577
22850
|
/**
|
|
22578
22851
|
* Per-device feature/identity probe slice. Holds the runtime-resolved
|
|
@@ -22648,7 +22921,14 @@ onProbeChanged: { data: object({
|
|
|
22648
22921
|
schema: FeatureProbeStatusSchema,
|
|
22649
22922
|
kind: "push"
|
|
22650
22923
|
},
|
|
22651
|
-
runtimeState: FeatureProbeStatusSchema
|
|
22924
|
+
runtimeState: FeatureProbeStatusSchema,
|
|
22925
|
+
/**
|
|
22926
|
+
* 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.
|
|
22927
|
+
*
|
|
22928
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22929
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22930
|
+
*/
|
|
22931
|
+
durability: "session"
|
|
22652
22932
|
};
|
|
22653
22933
|
/**
|
|
22654
22934
|
* Water leak / moisture sensor. Boolean "is liquid currently
|
|
@@ -22675,7 +22955,17 @@ var floodCapability = {
|
|
|
22675
22955
|
schema: FloodStatusSchema,
|
|
22676
22956
|
kind: "push"
|
|
22677
22957
|
},
|
|
22678
|
-
runtimeState: FloodStatusSchema
|
|
22958
|
+
runtimeState: FloodStatusSchema,
|
|
22959
|
+
/**
|
|
22960
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
22961
|
+
*
|
|
22962
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22963
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22964
|
+
*/
|
|
22965
|
+
durability: "restored",
|
|
22966
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22967
|
+
* whether persisting is worth a SQLite commit. */
|
|
22968
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22679
22969
|
};
|
|
22680
22970
|
/**
|
|
22681
22971
|
* Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
|
|
@@ -22698,7 +22988,17 @@ var gasCapability = {
|
|
|
22698
22988
|
schema: GasStatusSchema,
|
|
22699
22989
|
kind: "push"
|
|
22700
22990
|
},
|
|
22701
|
-
runtimeState: GasStatusSchema
|
|
22991
|
+
runtimeState: GasStatusSchema,
|
|
22992
|
+
/**
|
|
22993
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
22994
|
+
*
|
|
22995
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22996
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22997
|
+
*/
|
|
22998
|
+
durability: "restored",
|
|
22999
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23000
|
+
* whether persisting is worth a SQLite commit. */
|
|
23001
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22702
23002
|
};
|
|
22703
23003
|
/**
|
|
22704
23004
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
@@ -22774,7 +23074,14 @@ var humidifierCapability = {
|
|
|
22774
23074
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
22775
23075
|
* slice for live humidity / mode changes.
|
|
22776
23076
|
*/
|
|
22777
|
-
runtimeState: HumidifierStatusSchema
|
|
23077
|
+
runtimeState: HumidifierStatusSchema,
|
|
23078
|
+
/**
|
|
23079
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
23080
|
+
*
|
|
23081
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23082
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23083
|
+
*/
|
|
23084
|
+
durability: "session"
|
|
22778
23085
|
};
|
|
22779
23086
|
/**
|
|
22780
23087
|
* Single-metric humidity reading. Drives Home Assistant `sensor`
|
|
@@ -22810,7 +23117,17 @@ var humiditySensorCapability = {
|
|
|
22810
23117
|
schema: HumiditySensorStatusSchema,
|
|
22811
23118
|
kind: "push"
|
|
22812
23119
|
},
|
|
22813
|
-
runtimeState: HumiditySensorStatusSchema
|
|
23120
|
+
runtimeState: HumiditySensorStatusSchema,
|
|
23121
|
+
/**
|
|
23122
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
|
|
23123
|
+
*
|
|
23124
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23125
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23126
|
+
*/
|
|
23127
|
+
durability: "restored",
|
|
23128
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23129
|
+
* whether persisting is worth a SQLite commit. */
|
|
23130
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22814
23131
|
};
|
|
22815
23132
|
/**
|
|
22816
23133
|
* Image display cap. Models a single still image exposed by an integration —
|
|
@@ -22848,7 +23165,14 @@ var imageCapability = {
|
|
|
22848
23165
|
* Runtime-state slice — mirrored by the kernel. The UI reads `url`
|
|
22849
23166
|
* directly and renders the still image.
|
|
22850
23167
|
*/
|
|
22851
|
-
runtimeState: ImageStatusSchema
|
|
23168
|
+
runtimeState: ImageStatusSchema,
|
|
23169
|
+
/**
|
|
23170
|
+
* Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
|
|
23171
|
+
*
|
|
23172
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23173
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23174
|
+
*/
|
|
23175
|
+
durability: "session"
|
|
22852
23176
|
};
|
|
22853
23177
|
/**
|
|
22854
23178
|
* Vendor-neutral image / picture-adjustment cap — the per-camera config
|
|
@@ -22997,7 +23321,17 @@ var imageSettingsCapability = {
|
|
|
22997
23321
|
schema: ImageSettingsStatusSchema,
|
|
22998
23322
|
kind: "poll"
|
|
22999
23323
|
},
|
|
23000
|
-
runtimeState: ImageSettingsStatusSchema
|
|
23324
|
+
runtimeState: ImageSettingsStatusSchema,
|
|
23325
|
+
/**
|
|
23326
|
+
* Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
|
|
23327
|
+
*
|
|
23328
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23329
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23330
|
+
*/
|
|
23331
|
+
durability: "restored",
|
|
23332
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23333
|
+
* whether persisting is worth a SQLite commit. */
|
|
23334
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23001
23335
|
};
|
|
23002
23336
|
/**
|
|
23003
23337
|
* integrations — system-scoped singleton capability for integration
|
|
@@ -23337,7 +23671,14 @@ var lawnMowerControlCapability = {
|
|
|
23337
23671
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
23338
23672
|
* slice for live activity + battery changes.
|
|
23339
23673
|
*/
|
|
23340
|
-
runtimeState: LawnMowerControlStatusSchema
|
|
23674
|
+
runtimeState: LawnMowerControlStatusSchema,
|
|
23675
|
+
/**
|
|
23676
|
+
* Runtime-state durability: **session** — as `vacuum-control`.
|
|
23677
|
+
*
|
|
23678
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23679
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23680
|
+
*/
|
|
23681
|
+
durability: "session"
|
|
23341
23682
|
};
|
|
23342
23683
|
/**
|
|
23343
23684
|
* local-network — hub-only singleton.
|
|
@@ -23543,7 +23884,17 @@ var lockControlCapability = {
|
|
|
23543
23884
|
* read `state` and disable themselves during `locking`/`unlocking`
|
|
23544
23885
|
* transitions.
|
|
23545
23886
|
*/
|
|
23546
|
-
runtimeState: LockControlStatusSchema
|
|
23887
|
+
runtimeState: LockControlStatusSchema,
|
|
23888
|
+
/**
|
|
23889
|
+
* Runtime-state durability: **restored** — a lock left locked must still read locked.
|
|
23890
|
+
*
|
|
23891
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23892
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23893
|
+
*/
|
|
23894
|
+
durability: "restored",
|
|
23895
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23896
|
+
* whether persisting is worth a SQLite commit. */
|
|
23897
|
+
volatileStateFields: ["lastChangedAt"]
|
|
23547
23898
|
};
|
|
23548
23899
|
/**
|
|
23549
23900
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
@@ -23705,7 +24056,14 @@ var mediaPlayerCapability = {
|
|
|
23705
24056
|
* full slice for live now-playing, volume, and progress updates
|
|
23706
24057
|
* without polling.
|
|
23707
24058
|
*/
|
|
23708
|
-
runtimeState: MediaPlayerStatusSchema
|
|
24059
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
24060
|
+
/**
|
|
24061
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
24062
|
+
*
|
|
24063
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24064
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24065
|
+
*/
|
|
24066
|
+
durability: "session"
|
|
23709
24067
|
};
|
|
23710
24068
|
/**
|
|
23711
24069
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -23969,7 +24327,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
23969
24327
|
* `device.state.motion.value`. Reads never invoke the provider, so
|
|
23970
24328
|
* UIs and other addons can poll the cached state safely.
|
|
23971
24329
|
*/
|
|
23972
|
-
runtimeState: MotionStatusSchema
|
|
24330
|
+
runtimeState: MotionStatusSchema,
|
|
24331
|
+
/**
|
|
24332
|
+
* 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.
|
|
24333
|
+
*
|
|
24334
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24335
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24336
|
+
*/
|
|
24337
|
+
durability: "session"
|
|
23973
24338
|
};
|
|
23974
24339
|
/**
|
|
23975
24340
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -24034,7 +24399,14 @@ var motionTriggerCapability = {
|
|
|
24034
24399
|
schema: MotionTriggerStatusSchema,
|
|
24035
24400
|
kind: "command-driven"
|
|
24036
24401
|
},
|
|
24037
|
-
runtimeState: MotionTriggerRuntimeStateSchema
|
|
24402
|
+
runtimeState: MotionTriggerRuntimeStateSchema,
|
|
24403
|
+
/**
|
|
24404
|
+
* 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.
|
|
24405
|
+
*
|
|
24406
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24407
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24408
|
+
*/
|
|
24409
|
+
durability: "session"
|
|
24038
24410
|
};
|
|
24039
24411
|
/**
|
|
24040
24412
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
@@ -24101,7 +24473,17 @@ var motionZonesCapability = {
|
|
|
24101
24473
|
schema: MotionZoneStatusSchema,
|
|
24102
24474
|
kind: "poll"
|
|
24103
24475
|
},
|
|
24104
|
-
runtimeState: MotionZoneStatusSchema
|
|
24476
|
+
runtimeState: MotionZoneStatusSchema,
|
|
24477
|
+
/**
|
|
24478
|
+
* 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.
|
|
24479
|
+
*
|
|
24480
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24481
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24482
|
+
*/
|
|
24483
|
+
durability: "restored",
|
|
24484
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24485
|
+
* whether persisting is worth a SQLite commit. */
|
|
24486
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24105
24487
|
};
|
|
24106
24488
|
/**
|
|
24107
24489
|
* On-camera AI object detection cap. Surfaces per-device the classes
|
|
@@ -24175,7 +24557,17 @@ var nativeObjectDetectionCapability = {
|
|
|
24175
24557
|
schema: NativeObjectDetectionStatusSchema,
|
|
24176
24558
|
kind: "push"
|
|
24177
24559
|
},
|
|
24178
|
-
runtimeState: NativeObjectDetectionRuntimeStateSchema
|
|
24560
|
+
runtimeState: NativeObjectDetectionRuntimeStateSchema,
|
|
24561
|
+
/**
|
|
24562
|
+
* 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.
|
|
24563
|
+
*
|
|
24564
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24565
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24566
|
+
*/
|
|
24567
|
+
durability: "restored",
|
|
24568
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24569
|
+
* whether persisting is worth a SQLite commit. */
|
|
24570
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24179
24571
|
};
|
|
24180
24572
|
/**
|
|
24181
24573
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
@@ -24509,7 +24901,14 @@ onSent: { data: object({
|
|
|
24509
24901
|
* form reads `supports` to gate optional fields; history pane reads
|
|
24510
24902
|
* `lastSentAt` / `lastError` / `queueDepth`.
|
|
24511
24903
|
*/
|
|
24512
|
-
runtimeState: NotifierStatusSchema
|
|
24904
|
+
runtimeState: NotifierStatusSchema,
|
|
24905
|
+
/**
|
|
24906
|
+
* Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
|
|
24907
|
+
*
|
|
24908
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24909
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24910
|
+
*/
|
|
24911
|
+
durability: "session"
|
|
24513
24912
|
};
|
|
24514
24913
|
/**
|
|
24515
24914
|
* Generic numeric sensor — last-resort fallback when no typed numeric
|
|
@@ -24552,7 +24951,17 @@ var numericSensorCapability = {
|
|
|
24552
24951
|
schema: NumericSensorStatusSchema,
|
|
24553
24952
|
kind: "push"
|
|
24554
24953
|
},
|
|
24555
|
-
runtimeState: NumericSensorStatusSchema
|
|
24954
|
+
runtimeState: NumericSensorStatusSchema,
|
|
24955
|
+
/**
|
|
24956
|
+
* 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.
|
|
24957
|
+
*
|
|
24958
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24959
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24960
|
+
*/
|
|
24961
|
+
durability: "restored",
|
|
24962
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24963
|
+
* whether persisting is worth a SQLite commit. */
|
|
24964
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24556
24965
|
};
|
|
24557
24966
|
/**
|
|
24558
24967
|
* Generic on-screen-display (video overlay) cap. Each camera exposes
|
|
@@ -24937,7 +25346,14 @@ var petFeederCapability = {
|
|
|
24937
25346
|
* the full slice via `device.state.petFeeder.value` and refresh on
|
|
24938
25347
|
* every poll without re-querying the provider.
|
|
24939
25348
|
*/
|
|
24940
|
-
runtimeState: PetFeederStatusSchema
|
|
25349
|
+
runtimeState: PetFeederStatusSchema,
|
|
25350
|
+
/**
|
|
25351
|
+
* Runtime-state durability: **session** — live appliance state re-published on connect.
|
|
25352
|
+
*
|
|
25353
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25354
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25355
|
+
*/
|
|
25356
|
+
durability: "session"
|
|
24941
25357
|
};
|
|
24942
25358
|
var VehicleSchema = object({
|
|
24943
25359
|
id: string(),
|
|
@@ -25249,7 +25665,17 @@ var powerMeterCapability = {
|
|
|
25249
25665
|
schema: PowerMeterStatusSchema,
|
|
25250
25666
|
kind: "push"
|
|
25251
25667
|
},
|
|
25252
|
-
runtimeState: PowerMeterStatusSchema
|
|
25668
|
+
runtimeState: PowerMeterStatusSchema,
|
|
25669
|
+
/**
|
|
25670
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
|
|
25671
|
+
*
|
|
25672
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25673
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25674
|
+
*/
|
|
25675
|
+
durability: "restored",
|
|
25676
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25677
|
+
* whether persisting is worth a SQLite commit. */
|
|
25678
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25253
25679
|
};
|
|
25254
25680
|
/**
|
|
25255
25681
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
@@ -25306,7 +25732,17 @@ var presenceCapability = {
|
|
|
25306
25732
|
* the map pin is rendered (use `DeviceFeature.PresenceGps` for the
|
|
25307
25733
|
* pre-fetch fast-path check).
|
|
25308
25734
|
*/
|
|
25309
|
-
runtimeState: PresenceStatusSchema
|
|
25735
|
+
runtimeState: PresenceStatusSchema,
|
|
25736
|
+
/**
|
|
25737
|
+
* Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
|
|
25738
|
+
*
|
|
25739
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25740
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25741
|
+
*/
|
|
25742
|
+
durability: "restored",
|
|
25743
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25744
|
+
* whether persisting is worth a SQLite commit. */
|
|
25745
|
+
volatileStateFields: ["lastChangedAt"]
|
|
25310
25746
|
};
|
|
25311
25747
|
/**
|
|
25312
25748
|
* Atmospheric pressure reading in hectopascals. Drives Home Assistant
|
|
@@ -25342,7 +25778,17 @@ var pressureSensorCapability = {
|
|
|
25342
25778
|
schema: PressureSensorStatusSchema,
|
|
25343
25779
|
kind: "push"
|
|
25344
25780
|
},
|
|
25345
|
-
runtimeState: PressureSensorStatusSchema
|
|
25781
|
+
runtimeState: PressureSensorStatusSchema,
|
|
25782
|
+
/**
|
|
25783
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
25784
|
+
*
|
|
25785
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25786
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25787
|
+
*/
|
|
25788
|
+
durability: "restored",
|
|
25789
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25790
|
+
* whether persisting is worth a SQLite commit. */
|
|
25791
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25346
25792
|
};
|
|
25347
25793
|
/**
|
|
25348
25794
|
* PRIVACY — what the camera deliberately does not capture. Two planes:
|
|
@@ -25472,7 +25918,17 @@ var privacyMaskCapability = {
|
|
|
25472
25918
|
schema: PrivacyMaskStatusSchema,
|
|
25473
25919
|
kind: "poll"
|
|
25474
25920
|
},
|
|
25475
|
-
runtimeState: PrivacyMaskStatusSchema
|
|
25921
|
+
runtimeState: PrivacyMaskStatusSchema,
|
|
25922
|
+
/**
|
|
25923
|
+
* Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
|
|
25924
|
+
*
|
|
25925
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25926
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25927
|
+
*/
|
|
25928
|
+
durability: "restored",
|
|
25929
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25930
|
+
* whether persisting is worth a SQLite commit. */
|
|
25931
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25476
25932
|
};
|
|
25477
25933
|
var PtzPresetSchema = object({
|
|
25478
25934
|
id: string(),
|
|
@@ -25638,7 +26094,14 @@ var ptzAutotrackCapability = {
|
|
|
25638
26094
|
* fetch / cache / fallback logic out of the four cap methods —
|
|
25639
26095
|
* they become trampolines over `runtimeState`.
|
|
25640
26096
|
*/
|
|
25641
|
-
runtimeState: PtzAutotrackRuntimeStateSchema
|
|
26097
|
+
runtimeState: PtzAutotrackRuntimeStateSchema,
|
|
26098
|
+
/**
|
|
26099
|
+
* Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
|
|
26100
|
+
*
|
|
26101
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26102
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26103
|
+
*/
|
|
26104
|
+
durability: "session"
|
|
25642
26105
|
};
|
|
25643
26106
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
25644
26107
|
kind: "mutation",
|
|
@@ -25985,13 +26448,24 @@ method(object({
|
|
|
25985
26448
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25986
26449
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25987
26450
|
/**
|
|
25988
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
26451
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
26452
|
+
*
|
|
26453
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
26454
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
26455
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
26456
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
26457
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
26458
|
+
* the render side knows the segments, so the translation lives there
|
|
26459
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
26460
|
+
*
|
|
26461
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
26462
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
26463
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
26464
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
26465
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
25989
26466
|
*
|
|
25990
|
-
* Relative and not absolute epoch
|
|
25991
|
-
*
|
|
25992
|
-
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25993
|
-
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25994
|
-
* selects nothing — silently, as a uniform timelapse.
|
|
26467
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
26468
|
+
* call site responsible for the same subtraction.
|
|
25995
26469
|
*/
|
|
25996
26470
|
var ExportDenseRangeSchema = object({
|
|
25997
26471
|
fromSec: number().nonnegative(),
|
|
@@ -26277,7 +26751,14 @@ var sceneMonitorCapability = {
|
|
|
26277
26751
|
schema: SceneMonitorStatusSchema,
|
|
26278
26752
|
kind: "push"
|
|
26279
26753
|
},
|
|
26280
|
-
runtimeState: SceneMonitorStatusSchema
|
|
26754
|
+
runtimeState: SceneMonitorStatusSchema,
|
|
26755
|
+
/**
|
|
26756
|
+
* Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
|
|
26757
|
+
*
|
|
26758
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26759
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26760
|
+
*/
|
|
26761
|
+
durability: "session"
|
|
26281
26762
|
};
|
|
26282
26763
|
/**
|
|
26283
26764
|
* Per-stage gating mode applied to the zones a rule references.
|
|
@@ -26421,7 +26902,14 @@ var scriptRunnerCapability = {
|
|
|
26421
26902
|
* `isRunning` to render a spinner during execution and surfaces
|
|
26422
26903
|
* `lastError` / `lastRunSuccess` in the recent-runs panel.
|
|
26423
26904
|
*/
|
|
26424
|
-
runtimeState: ScriptRunnerStatusSchema
|
|
26905
|
+
runtimeState: ScriptRunnerStatusSchema,
|
|
26906
|
+
/**
|
|
26907
|
+
* Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
|
|
26908
|
+
*
|
|
26909
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26910
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26911
|
+
*/
|
|
26912
|
+
durability: "session"
|
|
26425
26913
|
};
|
|
26426
26914
|
/**
|
|
26427
26915
|
* Smoke alarm sensor — boolean "is smoke currently detected" with
|
|
@@ -26448,7 +26936,17 @@ var smokeCapability = {
|
|
|
26448
26936
|
schema: SmokeStatusSchema,
|
|
26449
26937
|
kind: "push"
|
|
26450
26938
|
},
|
|
26451
|
-
runtimeState: SmokeStatusSchema
|
|
26939
|
+
runtimeState: SmokeStatusSchema,
|
|
26940
|
+
/**
|
|
26941
|
+
* Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
|
|
26942
|
+
*
|
|
26943
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26944
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26945
|
+
*/
|
|
26946
|
+
durability: "restored",
|
|
26947
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26948
|
+
* whether persisting is worth a SQLite commit. */
|
|
26949
|
+
volatileStateFields: ["lastChangedAt"]
|
|
26452
26950
|
};
|
|
26453
26951
|
/**
|
|
26454
26952
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
@@ -26621,7 +27119,17 @@ var streamParamsCapability = {
|
|
|
26621
27119
|
schema: StreamParamsStatusSchema,
|
|
26622
27120
|
kind: "poll"
|
|
26623
27121
|
},
|
|
26624
|
-
runtimeState: StreamParamsStatusSchema
|
|
27122
|
+
runtimeState: StreamParamsStatusSchema,
|
|
27123
|
+
/**
|
|
27124
|
+
* Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
|
|
27125
|
+
*
|
|
27126
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27127
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27128
|
+
*/
|
|
27129
|
+
durability: "restored",
|
|
27130
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27131
|
+
* whether persisting is worth a SQLite commit. */
|
|
27132
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
26625
27133
|
};
|
|
26626
27134
|
/**
|
|
26627
27135
|
* Generic on/off switch cap for accessory children (siren, floodlight,
|
|
@@ -26667,6 +27175,16 @@ var switchCapability = {
|
|
|
26667
27175
|
* not need to re-query the provider after a setState mutation.
|
|
26668
27176
|
*/
|
|
26669
27177
|
runtimeState: SwitchStatusSchema,
|
|
27178
|
+
/**
|
|
27179
|
+
* Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
|
|
27180
|
+
*
|
|
27181
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27182
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27183
|
+
*/
|
|
27184
|
+
durability: "restored",
|
|
27185
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27186
|
+
* whether persisting is worth a SQLite commit. */
|
|
27187
|
+
volatileStateFields: ["lastChangedAt"],
|
|
26670
27188
|
settings: { bindings: [{
|
|
26671
27189
|
kind: "scalar",
|
|
26672
27190
|
statusPath: "on",
|
|
@@ -26746,7 +27264,17 @@ var tamperCapability = {
|
|
|
26746
27264
|
schema: TamperStatusSchema,
|
|
26747
27265
|
kind: "push"
|
|
26748
27266
|
},
|
|
26749
|
-
runtimeState: TamperStatusSchema
|
|
27267
|
+
runtimeState: TamperStatusSchema,
|
|
27268
|
+
/**
|
|
27269
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
27270
|
+
*
|
|
27271
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27272
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27273
|
+
*/
|
|
27274
|
+
durability: "restored",
|
|
27275
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27276
|
+
* whether persisting is worth a SQLite commit. */
|
|
27277
|
+
volatileStateFields: ["lastChangedAt"]
|
|
26750
27278
|
};
|
|
26751
27279
|
/**
|
|
26752
27280
|
* Single-metric temperature reading. Drives Home Assistant `sensor`
|
|
@@ -26791,7 +27319,17 @@ var temperatureSensorCapability = {
|
|
|
26791
27319
|
schema: TemperatureSensorStatusSchema,
|
|
26792
27320
|
kind: "push"
|
|
26793
27321
|
},
|
|
26794
|
-
runtimeState: TemperatureSensorStatusSchema
|
|
27322
|
+
runtimeState: TemperatureSensorStatusSchema,
|
|
27323
|
+
/**
|
|
27324
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
|
|
27325
|
+
*
|
|
27326
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27327
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27328
|
+
*/
|
|
27329
|
+
durability: "restored",
|
|
27330
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27331
|
+
* whether persisting is worth a SQLite commit. */
|
|
27332
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
26795
27333
|
};
|
|
26796
27334
|
/**
|
|
26797
27335
|
* toast — system-scoped singleton capability that streams toast
|
|
@@ -26860,7 +27398,14 @@ var updateCapability = {
|
|
|
26860
27398
|
schema: UpdateStatusSchema,
|
|
26861
27399
|
kind: "poll"
|
|
26862
27400
|
},
|
|
26863
|
-
runtimeState: UpdateStatusSchema
|
|
27401
|
+
runtimeState: UpdateStatusSchema,
|
|
27402
|
+
/**
|
|
27403
|
+
* Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
|
|
27404
|
+
*
|
|
27405
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27406
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27407
|
+
*/
|
|
27408
|
+
durability: "session"
|
|
26864
27409
|
};
|
|
26865
27410
|
var UserSummarySchema = object({
|
|
26866
27411
|
id: string(),
|
|
@@ -27194,7 +27739,14 @@ var vacuumControlCapability = {
|
|
|
27194
27739
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
27195
27740
|
* slice for live state + battery + fan-speed changes.
|
|
27196
27741
|
*/
|
|
27197
|
-
runtimeState: VacuumControlStatusSchema
|
|
27742
|
+
runtimeState: VacuumControlStatusSchema,
|
|
27743
|
+
/**
|
|
27744
|
+
* Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
|
|
27745
|
+
*
|
|
27746
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27747
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27748
|
+
*/
|
|
27749
|
+
durability: "session"
|
|
27198
27750
|
};
|
|
27199
27751
|
var ValveStatusSchema = object({
|
|
27200
27752
|
/** Lifecycle state of the valve. */
|
|
@@ -27246,7 +27798,14 @@ var valveCapability = {
|
|
|
27246
27798
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
27247
27799
|
* slice for live position changes during a move.
|
|
27248
27800
|
*/
|
|
27249
|
-
runtimeState: ValveStatusSchema
|
|
27801
|
+
runtimeState: ValveStatusSchema,
|
|
27802
|
+
/**
|
|
27803
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
27804
|
+
*
|
|
27805
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27806
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27807
|
+
*/
|
|
27808
|
+
durability: "session"
|
|
27250
27809
|
};
|
|
27251
27810
|
/**
|
|
27252
27811
|
* Vibration / shake / impact sensor. Drives Home Assistant
|
|
@@ -27268,7 +27827,17 @@ var vibrationCapability = {
|
|
|
27268
27827
|
schema: VibrationStatusSchema,
|
|
27269
27828
|
kind: "push"
|
|
27270
27829
|
},
|
|
27271
|
-
runtimeState: VibrationStatusSchema
|
|
27830
|
+
runtimeState: VibrationStatusSchema,
|
|
27831
|
+
/**
|
|
27832
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
27833
|
+
*
|
|
27834
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27835
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27836
|
+
*/
|
|
27837
|
+
durability: "restored",
|
|
27838
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27839
|
+
* whether persisting is worth a SQLite commit. */
|
|
27840
|
+
volatileStateFields: ["lastChangedAt"]
|
|
27272
27841
|
};
|
|
27273
27842
|
/**
|
|
27274
27843
|
* Water heater / boiler cap. Models HA `water_heater.*` entities — a
|
|
@@ -27342,7 +27911,14 @@ var waterHeaterCapability = {
|
|
|
27342
27911
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
27343
27912
|
* slice for live temperature / mode / away changes.
|
|
27344
27913
|
*/
|
|
27345
|
-
runtimeState: WaterHeaterStatusSchema
|
|
27914
|
+
runtimeState: WaterHeaterStatusSchema,
|
|
27915
|
+
/**
|
|
27916
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
27917
|
+
*
|
|
27918
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27919
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27920
|
+
*/
|
|
27921
|
+
durability: "session"
|
|
27346
27922
|
};
|
|
27347
27923
|
/**
|
|
27348
27924
|
* Weather provider cap. Models HA `weather.*` entities — a read-only
|
|
@@ -27401,7 +27977,14 @@ var weatherCapability = {
|
|
|
27401
27977
|
* Runtime-state slice — mirrored by the kernel. The UI reads the
|
|
27402
27978
|
* current conditions directly from the slice on each weather push.
|
|
27403
27979
|
*/
|
|
27404
|
-
runtimeState: WeatherStatusSchema
|
|
27980
|
+
runtimeState: WeatherStatusSchema,
|
|
27981
|
+
/**
|
|
27982
|
+
* Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
|
|
27983
|
+
*
|
|
27984
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27985
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27986
|
+
*/
|
|
27987
|
+
durability: "session"
|
|
27405
27988
|
};
|
|
27406
27989
|
/**
|
|
27407
27990
|
* Per-zone occupancy aggregation produced by the analytics frame
|
|
@@ -27563,7 +28146,14 @@ var zoneAnalyticsCapability = {
|
|
|
27563
28146
|
* automatically; the explicit `getCurrentSnapshot` cap method is
|
|
27564
28147
|
* still useful for one-off polls without a subscription.
|
|
27565
28148
|
*/
|
|
27566
|
-
runtimeState: CameraOccupancySnapshotSchema
|
|
28149
|
+
runtimeState: CameraOccupancySnapshotSchema,
|
|
28150
|
+
/**
|
|
28151
|
+
* Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
|
|
28152
|
+
*
|
|
28153
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28154
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28155
|
+
*/
|
|
28156
|
+
durability: "session"
|
|
27567
28157
|
};
|
|
27568
28158
|
/**
|
|
27569
28159
|
* Stages a {@link ZoneRule} can apply to. Discriminator on the rules
|
|
@@ -27641,7 +28231,14 @@ var zoneRulesCapability = {
|
|
|
27641
28231
|
motion: array(ZoneRuleSchema).readonly(),
|
|
27642
28232
|
detection: array(ZoneRuleSchema).readonly(),
|
|
27643
28233
|
package: array(ZoneRuleSchema).readonly()
|
|
27644
|
-
})
|
|
28234
|
+
}),
|
|
28235
|
+
/**
|
|
28236
|
+
* Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
|
|
28237
|
+
*
|
|
28238
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28239
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28240
|
+
*/
|
|
28241
|
+
durability: "restored"
|
|
27645
28242
|
};
|
|
27646
28243
|
/**
|
|
27647
28244
|
* Accessory device helpers — shared across drivers.
|
|
@@ -34328,6 +34925,7 @@ Object.freeze({
|
|
|
34328
34925
|
"network-access": "ingress",
|
|
34329
34926
|
"smtp-provider": "email"
|
|
34330
34927
|
});
|
|
34928
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
34331
34929
|
new Set(["devices", "classes"]);
|
|
34332
34930
|
/**
|
|
34333
34931
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -34605,25 +35203,32 @@ object({
|
|
|
34605
35203
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
34606
35204
|
object({
|
|
34607
35205
|
/**
|
|
34608
|
-
* How
|
|
35206
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
35207
|
+
* detection result.
|
|
34609
35208
|
*
|
|
34610
|
-
*
|
|
34611
|
-
*
|
|
34612
|
-
*
|
|
34613
|
-
*
|
|
34614
|
-
*
|
|
35209
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
35210
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
35211
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
35212
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
35213
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
35214
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
35215
|
+
*
|
|
35216
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
35217
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
35218
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
35219
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
35220
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
34615
35221
|
*/
|
|
34616
|
-
|
|
35222
|
+
holdFrames: number().int().min(1).max(64),
|
|
34617
35223
|
/**
|
|
34618
35224
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
34619
35225
|
*
|
|
34620
|
-
*
|
|
34621
|
-
*
|
|
34622
|
-
*
|
|
34623
|
-
*
|
|
34624
|
-
*
|
|
34625
|
-
*
|
|
34626
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
35226
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
35227
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
35228
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
35229
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
35230
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
35231
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
34627
35232
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
34628
35233
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
34629
35234
|
* to replace).
|
|
@@ -34649,22 +35254,45 @@ object({
|
|
|
34649
35254
|
* there is the signal that some caller names frames outside the inference set
|
|
34650
35255
|
* and that this must go back to `all`.
|
|
34651
35256
|
*/
|
|
34652
|
-
admission: NativeLeaseAdmissionSchema
|
|
35257
|
+
admission: NativeLeaseAdmissionSchema,
|
|
35258
|
+
/**
|
|
35259
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
35260
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
35261
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
35262
|
+
*
|
|
35263
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
35264
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
35265
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
35266
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
35267
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
35268
|
+
* was interrogated per SUBJECT.
|
|
35269
|
+
*
|
|
35270
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
35271
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
35272
|
+
* reproduce that.
|
|
35273
|
+
*/
|
|
35274
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
34653
35275
|
});
|
|
34654
35276
|
/**
|
|
34655
|
-
* The values in force when the operator has set nothing
|
|
34656
|
-
*
|
|
34657
|
-
*
|
|
35277
|
+
* The values in force when the operator has set nothing.
|
|
35278
|
+
*
|
|
35279
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
35280
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
35281
|
+
* in the same change that redefines it would make a regression and a retune
|
|
35282
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
35283
|
+
* live traffic.
|
|
34658
35284
|
*/
|
|
34659
35285
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
34660
|
-
|
|
35286
|
+
holdFrames: 8,
|
|
34661
35287
|
budgetMb: 1024,
|
|
34662
35288
|
activityMs: 15e3,
|
|
35289
|
+
tileBudgetMb: 64,
|
|
34663
35290
|
admission: "inferred"
|
|
34664
35291
|
};
|
|
34665
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
35292
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34666
35293
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34667
35294
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
35295
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
34668
35296
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34669
35297
|
//#endregion
|
|
34670
35298
|
//#region src/config.ts
|