@camstack/types 1.2.536 → 1.2.538

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +17 -5
  2. package/dist/addon.d.ts +3 -2
  3. package/dist/addon.js +7 -4
  4. package/dist/addon.mjs +3 -3
  5. package/dist/audit/command-origin-claim.d.ts +79 -0
  6. package/dist/audit/device-transition.d.ts +2 -2
  7. package/dist/automation/action.d.ts +4 -0
  8. package/dist/automation/index.d.ts +0 -1
  9. package/dist/automation/recipe.d.ts +9 -18
  10. package/dist/capabilities/action-source.cap.d.ts +1 -0
  11. package/dist/capabilities/actions.cap.d.ts +7 -0
  12. package/dist/capabilities/device-manager.cap.d.ts +1 -0
  13. package/dist/capabilities/index.d.ts +1 -1
  14. package/dist/capabilities/notification-rules.cap.d.ts +79 -1897
  15. package/dist/client.d.ts +1 -1
  16. package/dist/client.js +70 -985
  17. package/dist/client.mjs +70 -986
  18. package/dist/{device-type-BfvqqzRp.js → composed-stable-id-C3J6LxC9.js} +14 -0
  19. package/dist/{device-type-DTTZKB2I.mjs → composed-stable-id-DLcPInGv.mjs} +9 -1
  20. package/dist/composition/composed-stable-id.d.ts +6 -0
  21. package/dist/composition/composition.d.ts +2 -2
  22. package/dist/{composition-C6TZGqUb.mjs → composition-BFJq1Y88.mjs} +2 -4
  23. package/dist/{composition-BxalDSTt.js → composition-BcVAbtBc.js} +4 -12
  24. package/dist/device/container-primary-child.d.ts +37 -5
  25. package/dist/device/device-context.d.ts +9 -2
  26. package/dist/generated/addon-api.d.ts +0 -35
  27. package/dist/generated/system-proxy.d.ts +1 -1
  28. package/dist/index.d.ts +2 -3
  29. package/dist/index.js +973 -1075
  30. package/dist/index.mjs +120 -220
  31. package/dist/node.js +6 -6
  32. package/dist/node.mjs +2 -2
  33. package/dist/notification/alarm-membership.d.ts +12 -11
  34. package/dist/{sleep-CCAQ_PEp.js → sleep-DgCXXFc3.js} +100 -45
  35. package/dist/{sleep-DnVqHJc4.mjs → sleep-VrfKAAGN.mjs} +54 -11
  36. package/package.json +1 -1
  37. package/dist/automation/nc-action-target.d.ts +0 -21
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-CCAQ_PEp.js");
2
+ const require_sleep = require("./sleep-DgCXXFc3.js");
3
3
  const require_event_category = require("./event-category-BC4RRerT.js");
4
- const require_device_type = require("./device-type-BfvqqzRp.js");
5
- const require_composition = require("./composition-BxalDSTt.js");
4
+ const require_composed_stable_id = require("./composed-stable-id-C3J6LxC9.js");
5
+ const require_composition = require("./composition-BcVAbtBc.js");
6
6
  const require_node_color = require("./node-color.js");
7
7
  const require_convert = require("./convert-BmtM6K-5.js");
8
8
  const require_enums = require("./enums.js");
@@ -10025,7 +10025,7 @@ var DeviceSelectorSchema = zod.z.discriminatedUnion("kind", [
10025
10025
  }),
10026
10026
  zod.z.object({
10027
10027
  kind: zod.z.literal("types"),
10028
- types: zod.z.array(zod.z.enum(require_device_type.DeviceType)).min(1)
10028
+ types: zod.z.array(zod.z.enum(require_composed_stable_id.DeviceType)).min(1)
10029
10029
  }),
10030
10030
  zod.z.object({
10031
10031
  kind: zod.z.literal("locations"),
@@ -30980,7 +30980,7 @@ var ActionTargetSchema = zod.z.discriminatedUnion("kind", [
30980
30980
  zod.z.object({
30981
30981
  kind: zod.z.literal("domain"),
30982
30982
  /** Narrow to one kind of device. */
30983
- deviceType: zod.z.enum(require_device_type.DeviceType).optional(),
30983
+ deviceType: zod.z.enum(require_composed_stable_id.DeviceType).optional(),
30984
30984
  /** Narrow to one room: the `location` label devices carry. */
30985
30985
  roomId: zod.z.string().min(1).optional()
30986
30986
  }),
@@ -32888,30 +32888,21 @@ function convertLegacyWhen(half) {
32888
32888
  * (instants) and state leaves (durations). It replaces the flat trigger list
32889
32889
  * plus the separate condition tree; the firing rule is in that file and in
32890
32890
  * ADR "one tree".
32891
- * - **Actions** — `NcRuleActionSchema`'s two steps, plus the `{kind:'code'}`
32892
- * fragment of §3.2.2. See {@link AutomationActionSchema} for the ONE place
32893
- * this had to diverge from "verbatim", and why.
32891
+ * - **Actions** — the `wait` and `cap` steps, plus the `{kind:'code'}`
32892
+ * fragment of §3.2.2. See {@link AutomationActionSchema}.
32894
32893
  *
32895
32894
  * A recipe stored in the old shape (`triggers` + `conditions`) still LOADS:
32896
32895
  * {@link AutomationRecipeSchema} (the parse-anywhere schema) converts it on parse. Nothing writes it.
32897
32896
  */
32898
32897
  /**
32899
- * One action step.
32898
+ * One action step: `wait`, or a `cap` call.
32900
32899
  *
32901
- * `wait` and `cap` are `NcRuleActionSchema`'s two members, kept structurally
32902
- * identical so `NcRuleActionRunner` runs them unchanged — its device-scope
32903
- * check, stop-at-first-failure and per-sequence throttle are the whole reason
32904
- * to reuse it, and none of them are re-implemented here.
32905
- *
32906
- * **The one divergence, and it is forced.** `NcRuleActionSchema.cap.deviceId` is
32907
- * a literal `z.number().int()`, and the NC runner's own `RunSequencesInput`
32908
- * documents its subject device as *"for the log tag, never for routing"*. So an
32909
- * NC action can never target the device that triggered it — which is fine for
32910
- * the NC (its rules already scope to a device) and fatal for an automation
32911
- * ("sound the siren of the camera that saw the person"). `deviceId` therefore
32912
- * also accepts `{ $var }`, resolved from the run's `vars` bag BEFORE the runner
32913
- * is called. The runner still receives a number and is untouched; the
32914
- * resolution is the recipe's job, not the runner's.
32900
+ * A cap step's target is who it acts on (D983: `devices`, a `domain`, or a
32901
+ * `{ $var }` resolved from the run's variables); the legacy `deviceId` is still
32902
+ * READ, never written. The step runner (`runSteps`) owns the device-scope
32903
+ * check, the stop-at-first-failure and the variable substitution, once, for
32904
+ * every caller — automations, Actions, and the notification centre, which runs
32905
+ * only Actions (planning#473).
32915
32906
  */
32916
32907
  var AutomationWaitStepSchema = zod.z.object({
32917
32908
  kind: zod.z.literal("wait"),
@@ -35571,6 +35562,8 @@ var IDLE_ACTION_STATUS = {
35571
35562
  lastRunAt: null,
35572
35563
  lastError: null
35573
35564
  };
35565
+ /** The throttle window of an action, in seconds; absent or 0 = no throttle. */
35566
+ var ActionMinDelaySecSchema = zod.z.number().int().min(0).max(86400);
35574
35567
  var ActionEntrySchema = zod.z.object({
35575
35568
  /** `internal:<uuid>` or `<addonId>:<localId>`. */
35576
35569
  id: zod.z.string().min(3),
@@ -35583,6 +35576,14 @@ var ActionEntrySchema = zod.z.object({
35583
35576
  /** Internal only: cap and wait steps. No action-in-action, so no cycles. */
35584
35577
  steps: zod.z.array(ActionStepSchema).min(1).max(50).optional(),
35585
35578
  variables: zod.z.array(ActionVariableSchema).max(20).optional(),
35579
+ /**
35580
+ * Internal only: the least time between two run STARTS. A run that begins
35581
+ * inside the window is skipped (`skipped-cooldown`), traced and logged. It
35582
+ * is an actuator's budget — "how often may this gate physically open" —
35583
+ * not a notification cooldown, and it is shared by every caller of the
35584
+ * action (two rules, a button, an automation).
35585
+ */
35586
+ minDelaySec: ActionMinDelaySecSchema.optional(),
35586
35587
  status: ActionStatusSchema
35587
35588
  }).superRefine((entry, ctx) => {
35588
35589
  if (entry.source === "internal") {
@@ -35613,7 +35614,8 @@ var ActionEntrySchema = zod.z.object({
35613
35614
  var ActionInputSchema = zod.z.object({
35614
35615
  name: zod.z.string().min(1).max(120),
35615
35616
  steps: zod.z.array(ActionStepSchema).min(1).max(50),
35616
- variables: zod.z.array(ActionVariableSchema).max(20).optional()
35617
+ variables: zod.z.array(ActionVariableSchema).max(20).optional(),
35618
+ minDelaySec: ActionMinDelaySecSchema.optional()
35617
35619
  });
35618
35620
  /** Who started a run. Absent = the operator pressed it. */
35619
35621
  var ActionRunOriginSchema = zod.z.object({
@@ -35666,30 +35668,6 @@ var ActionRunChangedSchema = zod.z.object({
35666
35668
  lastError: zod.z.string().nullable()
35667
35669
  });
35668
35670
  //#endregion
35669
- //#region src/automation/nc-action-target.ts
35670
- function normalizeNcCapTarget(action) {
35671
- const target = action.target ?? (action.deviceId === void 0 ? void 0 : {
35672
- kind: "devices",
35673
- ids: [action.deviceId]
35674
- });
35675
- if (target === void 0) throw new Error(`rule action ${action.cap}.${action.method} has no target`);
35676
- return {
35677
- target,
35678
- actionId: action.actionId ?? (action.deviceId === void 0 ? void 0 : require_sleep.vocabActionIdFor(action.cap, action.method, action.args))
35679
- };
35680
- }
35681
- /** The step as it is stored from now on: `target` (and `actionId`) set, no `deviceId`. */
35682
- function normalizeNcAction(action) {
35683
- if (action.kind !== "cap") return action;
35684
- const { deviceId: _legacy, target: _target, actionId: _actionId, ...rest } = action;
35685
- const { target, actionId } = normalizeNcCapTarget(action);
35686
- return {
35687
- ...rest,
35688
- ...actionId === void 0 ? {} : { actionId },
35689
- target
35690
- };
35691
- }
35692
- //#endregion
35693
35671
  //#region src/automation/step-condition.ts
35694
35672
  /**
35695
35673
  * The guard of a conditional step (#472): the step's `if` is the ONE `when`
@@ -36686,18 +36664,18 @@ var accessoriesCapability = {
36686
36664
  deviceNative: true,
36687
36665
  mode: "singleton",
36688
36666
  deviceTypes: [
36689
- require_device_type.DeviceType.Camera,
36690
- require_device_type.DeviceType.Hub,
36691
- require_device_type.DeviceType.Switch,
36692
- require_device_type.DeviceType.Light,
36693
- require_device_type.DeviceType.Sensor,
36694
- require_device_type.DeviceType.Thermostat,
36695
- require_device_type.DeviceType.Cover,
36696
- require_device_type.DeviceType.Lock,
36697
- require_device_type.DeviceType.Fan,
36698
- require_device_type.DeviceType.MediaPlayer,
36699
- require_device_type.DeviceType.AlarmPanel,
36700
- require_device_type.DeviceType.Generic
36667
+ require_composed_stable_id.DeviceType.Camera,
36668
+ require_composed_stable_id.DeviceType.Hub,
36669
+ require_composed_stable_id.DeviceType.Switch,
36670
+ require_composed_stable_id.DeviceType.Light,
36671
+ require_composed_stable_id.DeviceType.Sensor,
36672
+ require_composed_stable_id.DeviceType.Thermostat,
36673
+ require_composed_stable_id.DeviceType.Cover,
36674
+ require_composed_stable_id.DeviceType.Lock,
36675
+ require_composed_stable_id.DeviceType.Fan,
36676
+ require_composed_stable_id.DeviceType.MediaPlayer,
36677
+ require_composed_stable_id.DeviceType.AlarmPanel,
36678
+ require_composed_stable_id.DeviceType.Generic
36701
36679
  ],
36702
36680
  methods: {
36703
36681
  /**
@@ -38087,7 +38065,7 @@ var airQualitySensorCapability = {
38087
38065
  scope: "device",
38088
38066
  deviceNative: true,
38089
38067
  mode: "singleton",
38090
- deviceTypes: [require_device_type.DeviceType.Sensor],
38068
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
38091
38069
  methods: {},
38092
38070
  status: {
38093
38071
  schema: AirQualitySensorStatusSchema,
@@ -38198,7 +38176,7 @@ var alarmPanelCapability = {
38198
38176
  scope: "device",
38199
38177
  deviceNative: true,
38200
38178
  mode: "singleton",
38201
- deviceTypes: [require_device_type.DeviceType.AlarmPanel],
38179
+ deviceTypes: [require_composed_stable_id.DeviceType.AlarmPanel],
38202
38180
  methods: {
38203
38181
  arm: require_sleep.method(zod.z.object({
38204
38182
  deviceId: zod.z.number().int().nonnegative(),
@@ -38361,7 +38339,7 @@ var ambientLightSensorCapability = {
38361
38339
  scope: "device",
38362
38340
  deviceNative: true,
38363
38341
  mode: "singleton",
38364
- deviceTypes: [require_device_type.DeviceType.Sensor],
38342
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
38365
38343
  methods: {},
38366
38344
  status: {
38367
38345
  schema: AmbientLightSensorStatusSchema,
@@ -38412,7 +38390,7 @@ var audioAnalysisCapability = {
38412
38390
  mode: "singleton",
38413
38391
  kind: "wrapper",
38414
38392
  defaultActive: true,
38415
- deviceTypes: [require_device_type.DeviceType.Camera],
38393
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
38416
38394
  exposesDeviceSettings: true,
38417
38395
  methods: {
38418
38396
  /**
@@ -38905,7 +38883,7 @@ var audioMetricsCapability = {
38905
38883
  name: "audio-metrics",
38906
38884
  scope: "device",
38907
38885
  mode: "singleton",
38908
- deviceTypes: [require_device_type.DeviceType.Camera],
38886
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
38909
38887
  methods: {
38910
38888
  /** Latest snapshot for this device. Null until the analytics
38911
38889
  * pipeline has processed at least one audio window. */
@@ -39010,7 +38988,7 @@ var automationControlCapability = {
39010
38988
  scope: "device",
39011
38989
  deviceNative: true,
39012
38990
  mode: "singleton",
39013
- deviceTypes: [require_device_type.DeviceType.Automation],
38991
+ deviceTypes: [require_composed_stable_id.DeviceType.Automation],
39014
38992
  methods: {
39015
38993
  enable: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
39016
38994
  kind: "mutation",
@@ -39814,14 +39792,14 @@ var BatteryStatusSchema = zod.z.object({
39814
39792
  binary: zod.z.boolean().optional().meta({ label: "Binary indicator" })
39815
39793
  });
39816
39794
  var BATTERY_DEVICE_TYPES = [
39817
- require_device_type.DeviceType.Camera,
39818
- require_device_type.DeviceType.Sensor,
39819
- require_device_type.DeviceType.Button,
39820
- require_device_type.DeviceType.Switch,
39821
- require_device_type.DeviceType.PetFeeder,
39822
- require_device_type.DeviceType.Container,
39823
- require_device_type.DeviceType.Thermostat,
39824
- require_device_type.DeviceType.EventEmitter
39795
+ require_composed_stable_id.DeviceType.Camera,
39796
+ require_composed_stable_id.DeviceType.Sensor,
39797
+ require_composed_stable_id.DeviceType.Button,
39798
+ require_composed_stable_id.DeviceType.Switch,
39799
+ require_composed_stable_id.DeviceType.PetFeeder,
39800
+ require_composed_stable_id.DeviceType.Container,
39801
+ require_composed_stable_id.DeviceType.Thermostat,
39802
+ require_composed_stable_id.DeviceType.EventEmitter
39825
39803
  ];
39826
39804
  /** Generic Customize target for the percentage reading (D936). */
39827
39805
  var batteryCustomize = {
@@ -39993,7 +39971,7 @@ var binaryCapability = {
39993
39971
  scope: "device",
39994
39972
  deviceNative: true,
39995
39973
  mode: "singleton",
39996
- deviceTypes: [require_device_type.DeviceType.Sensor],
39974
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
39997
39975
  methods: {},
39998
39976
  status: {
39999
39977
  schema: BinaryStatusSchema,
@@ -40099,7 +40077,7 @@ var brightnessCapability = {
40099
40077
  scope: "device",
40100
40078
  deviceNative: true,
40101
40079
  mode: "singleton",
40102
- deviceTypes: [require_device_type.DeviceType.Light],
40080
+ deviceTypes: [require_composed_stable_id.DeviceType.Light],
40103
40081
  methods: { setBrightness: require_sleep.method(zod.z.object({
40104
40082
  deviceId: zod.z.number().int().nonnegative(),
40105
40083
  level: zod.z.number().min(0).max(100)
@@ -40263,7 +40241,7 @@ var buttonCapability = {
40263
40241
  scope: "device",
40264
40242
  deviceNative: true,
40265
40243
  mode: "singleton",
40266
- deviceTypes: [require_device_type.DeviceType.Button],
40244
+ deviceTypes: [require_composed_stable_id.DeviceType.Button],
40267
40245
  methods: { press: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
40268
40246
  kind: "mutation",
40269
40247
  auth: "protected"
@@ -40506,7 +40484,7 @@ var cameraCredentialsCapability = {
40506
40484
  scope: "device",
40507
40485
  deviceNative: true,
40508
40486
  mode: "singleton",
40509
- deviceTypes: [require_device_type.DeviceType.Camera],
40487
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
40510
40488
  methods: {
40511
40489
  /**
40512
40490
  * Return the camera's full credential bundle for admin consumers.
@@ -40663,7 +40641,7 @@ var cameraGridLayoutCapability = {
40663
40641
  scope: "device",
40664
40642
  deviceNative: true,
40665
40643
  mode: "singleton",
40666
- deviceTypes: [require_device_type.DeviceType.Camera],
40644
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
40667
40645
  /**
40668
40646
  * The section is built by the ADDON and returned from
40669
40647
  * `getDeviceSettingsContribution`, not derived by the framework from a
@@ -40735,7 +40713,7 @@ var cameraPipelineConfigCapability = {
40735
40713
  mode: "singleton",
40736
40714
  kind: "wrapper",
40737
40715
  defaultActive: true,
40738
- deviceTypes: [require_device_type.DeviceType.Camera],
40716
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
40739
40717
  exposesDeviceSettings: true,
40740
40718
  methods: {}
40741
40719
  };
@@ -41836,7 +41814,7 @@ var cameraStreamsCapability = {
41836
41814
  mode: "singleton",
41837
41815
  kind: "wrapper",
41838
41816
  defaultActive: true,
41839
- deviceTypes: [require_device_type.DeviceType.Camera],
41817
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
41840
41818
  methods: {
41841
41819
  getCameraStreams: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(require_sleep.CameraStreamSchema).readonly()),
41842
41820
  getBrokerStreams: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(require_sleep.ProfileSlotSchema).readonly()),
@@ -41966,7 +41944,7 @@ var carbonMonoxideCapability = {
41966
41944
  scope: "device",
41967
41945
  deviceNative: true,
41968
41946
  mode: "singleton",
41969
- deviceTypes: [require_device_type.DeviceType.Sensor],
41947
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
41970
41948
  methods: {},
41971
41949
  status: {
41972
41950
  schema: CarbonMonoxideStatusSchema,
@@ -42091,7 +42069,7 @@ var climateControlCapability = {
42091
42069
  scope: "device",
42092
42070
  deviceNative: true,
42093
42071
  mode: "singleton",
42094
- deviceTypes: [require_device_type.DeviceType.Thermostat, require_device_type.DeviceType.Climate],
42072
+ deviceTypes: [require_composed_stable_id.DeviceType.Thermostat, require_composed_stable_id.DeviceType.Climate],
42095
42073
  methods: {
42096
42074
  setMode: require_sleep.method(zod.z.object({
42097
42075
  deviceId: zod.z.number().int().nonnegative(),
@@ -42279,7 +42257,7 @@ var colorCapability = {
42279
42257
  scope: "device",
42280
42258
  deviceNative: true,
42281
42259
  mode: "singleton",
42282
- deviceTypes: [require_device_type.DeviceType.Light],
42260
+ deviceTypes: [require_composed_stable_id.DeviceType.Light],
42283
42261
  methods: { setColor: require_sleep.method(zod.z.object({
42284
42262
  deviceId: zod.z.number().int().nonnegative(),
42285
42263
  color: ColorInputSchema
@@ -42745,7 +42723,7 @@ var connectivityCapability = {
42745
42723
  scope: "device",
42746
42724
  deviceNative: true,
42747
42725
  mode: "singleton",
42748
- deviceTypes: [require_device_type.DeviceType.Sensor],
42726
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
42749
42727
  methods: {},
42750
42728
  status: {
42751
42729
  schema: ConnectivityStatusSchema,
@@ -42925,7 +42903,7 @@ var consumablesCustomize = {
42925
42903
  id: "items",
42926
42904
  cardinality: "keyedArray",
42927
42905
  vocabulary: { cap: "consumables" },
42928
- deviceTypes: Object.values(require_device_type.DeviceType),
42906
+ deviceTypes: Object.values(require_composed_stable_id.DeviceType),
42929
42907
  apply: "add",
42930
42908
  path: "items",
42931
42909
  keyField: "key",
@@ -42996,7 +42974,7 @@ var consumablesCapability = {
42996
42974
  scope: "device",
42997
42975
  deviceNative: true,
42998
42976
  mode: "singleton",
42999
- deviceTypes: Object.values(require_device_type.DeviceType),
42977
+ deviceTypes: Object.values(require_composed_stable_id.DeviceType),
43000
42978
  deviceConfig: { ui: {
43001
42979
  kind: "widget",
43002
42980
  widgetId: "host/consumables-panel",
@@ -43117,7 +43095,7 @@ var contactCapability = {
43117
43095
  scope: "device",
43118
43096
  deviceNative: true,
43119
43097
  mode: "singleton",
43120
- deviceTypes: [require_device_type.DeviceType.Sensor],
43098
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
43121
43099
  methods: {},
43122
43100
  status: {
43123
43101
  schema: ContactStatusSchema,
@@ -43229,7 +43207,7 @@ var controlCapability = {
43229
43207
  scope: "device",
43230
43208
  deviceNative: true,
43231
43209
  mode: "singleton",
43232
- deviceTypes: [require_device_type.DeviceType.Control],
43210
+ deviceTypes: [require_composed_stable_id.DeviceType.Control],
43233
43211
  methods: { setValue: require_sleep.method(zod.z.object({
43234
43212
  deviceId: zod.z.number().int().nonnegative(),
43235
43213
  control: ControlSetValueInputSchema
@@ -43673,7 +43651,7 @@ var mediaPlayerCapability = {
43673
43651
  scope: "device",
43674
43652
  deviceNative: true,
43675
43653
  mode: "singleton",
43676
- deviceTypes: [require_device_type.DeviceType.MediaPlayer],
43654
+ deviceTypes: [require_composed_stable_id.DeviceType.MediaPlayer],
43677
43655
  methods: {
43678
43656
  turnOn: require_sleep.method(deviceOnly, zod.z.void(), {
43679
43657
  kind: "mutation",
@@ -43817,14 +43795,14 @@ var CAP_CUSTOMIZE_CATALOG = {
43817
43795
  id: "level",
43818
43796
  cardinality: "scalar",
43819
43797
  deviceTypes: [
43820
- require_device_type.DeviceType.Camera,
43821
- require_device_type.DeviceType.Sensor,
43822
- require_device_type.DeviceType.Button,
43823
- require_device_type.DeviceType.Switch,
43824
- require_device_type.DeviceType.PetFeeder,
43825
- require_device_type.DeviceType.Container,
43826
- require_device_type.DeviceType.Thermostat,
43827
- require_device_type.DeviceType.EventEmitter
43798
+ require_composed_stable_id.DeviceType.Camera,
43799
+ require_composed_stable_id.DeviceType.Sensor,
43800
+ require_composed_stable_id.DeviceType.Button,
43801
+ require_composed_stable_id.DeviceType.Switch,
43802
+ require_composed_stable_id.DeviceType.PetFeeder,
43803
+ require_composed_stable_id.DeviceType.Container,
43804
+ require_composed_stable_id.DeviceType.Thermostat,
43805
+ require_composed_stable_id.DeviceType.EventEmitter
43828
43806
  ],
43829
43807
  apply: "add",
43830
43808
  vocabularyCap: "battery",
@@ -43873,44 +43851,44 @@ var CAP_CUSTOMIZE_CATALOG = {
43873
43851
  id: "items",
43874
43852
  cardinality: "keyedArray",
43875
43853
  deviceTypes: [
43876
- require_device_type.DeviceType.Camera,
43877
- require_device_type.DeviceType.Hub,
43878
- require_device_type.DeviceType.Light,
43879
- require_device_type.DeviceType.Siren,
43880
- require_device_type.DeviceType.Switch,
43881
- require_device_type.DeviceType.Sensor,
43882
- require_device_type.DeviceType.Thermostat,
43883
- require_device_type.DeviceType.Climate,
43884
- require_device_type.DeviceType.Button,
43885
- require_device_type.DeviceType.EventEmitter,
43886
- require_device_type.DeviceType.Update,
43887
- require_device_type.DeviceType.Generic,
43888
- require_device_type.DeviceType.Notifier,
43889
- require_device_type.DeviceType.Script,
43890
- require_device_type.DeviceType.Automation,
43891
- require_device_type.DeviceType.Lock,
43892
- require_device_type.DeviceType.Cover,
43893
- require_device_type.DeviceType.Valve,
43894
- require_device_type.DeviceType.Humidifier,
43895
- require_device_type.DeviceType.WaterHeater,
43896
- require_device_type.DeviceType.Fan,
43897
- require_device_type.DeviceType.MediaPlayer,
43898
- require_device_type.DeviceType.AlarmPanel,
43899
- require_device_type.DeviceType.Control,
43900
- require_device_type.DeviceType.Presence,
43901
- require_device_type.DeviceType.Weather,
43902
- require_device_type.DeviceType.Vacuum,
43903
- require_device_type.DeviceType.LawnMower,
43904
- require_device_type.DeviceType.Container,
43905
- require_device_type.DeviceType.Image,
43906
- require_device_type.DeviceType.PetFeeder,
43907
- require_device_type.DeviceType.PetFountain,
43908
- require_device_type.DeviceType.Dishwasher,
43909
- require_device_type.DeviceType.Washer,
43910
- require_device_type.DeviceType.Heater,
43911
- require_device_type.DeviceType.Dryer,
43912
- require_device_type.DeviceType.Gateway,
43913
- require_device_type.DeviceType.HeatPump
43854
+ require_composed_stable_id.DeviceType.Camera,
43855
+ require_composed_stable_id.DeviceType.Hub,
43856
+ require_composed_stable_id.DeviceType.Light,
43857
+ require_composed_stable_id.DeviceType.Siren,
43858
+ require_composed_stable_id.DeviceType.Switch,
43859
+ require_composed_stable_id.DeviceType.Sensor,
43860
+ require_composed_stable_id.DeviceType.Thermostat,
43861
+ require_composed_stable_id.DeviceType.Climate,
43862
+ require_composed_stable_id.DeviceType.Button,
43863
+ require_composed_stable_id.DeviceType.EventEmitter,
43864
+ require_composed_stable_id.DeviceType.Update,
43865
+ require_composed_stable_id.DeviceType.Generic,
43866
+ require_composed_stable_id.DeviceType.Notifier,
43867
+ require_composed_stable_id.DeviceType.Script,
43868
+ require_composed_stable_id.DeviceType.Automation,
43869
+ require_composed_stable_id.DeviceType.Lock,
43870
+ require_composed_stable_id.DeviceType.Cover,
43871
+ require_composed_stable_id.DeviceType.Valve,
43872
+ require_composed_stable_id.DeviceType.Humidifier,
43873
+ require_composed_stable_id.DeviceType.WaterHeater,
43874
+ require_composed_stable_id.DeviceType.Fan,
43875
+ require_composed_stable_id.DeviceType.MediaPlayer,
43876
+ require_composed_stable_id.DeviceType.AlarmPanel,
43877
+ require_composed_stable_id.DeviceType.Control,
43878
+ require_composed_stable_id.DeviceType.Presence,
43879
+ require_composed_stable_id.DeviceType.Weather,
43880
+ require_composed_stable_id.DeviceType.Vacuum,
43881
+ require_composed_stable_id.DeviceType.LawnMower,
43882
+ require_composed_stable_id.DeviceType.Container,
43883
+ require_composed_stable_id.DeviceType.Image,
43884
+ require_composed_stable_id.DeviceType.PetFeeder,
43885
+ require_composed_stable_id.DeviceType.PetFountain,
43886
+ require_composed_stable_id.DeviceType.Dishwasher,
43887
+ require_composed_stable_id.DeviceType.Washer,
43888
+ require_composed_stable_id.DeviceType.Heater,
43889
+ require_composed_stable_id.DeviceType.Dryer,
43890
+ require_composed_stable_id.DeviceType.Gateway,
43891
+ require_composed_stable_id.DeviceType.HeatPump
43914
43892
  ],
43915
43893
  apply: "add",
43916
43894
  vocabularyCap: "consumables",
@@ -44014,7 +43992,7 @@ var CAP_CUSTOMIZE_CATALOG = {
44014
43992
  targets: [{
44015
43993
  id: "pressed",
44016
43994
  cardinality: "event",
44017
- deviceTypes: [require_device_type.DeviceType.Camera],
43995
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
44018
43996
  apply: "add",
44019
43997
  vocabularyCap: "doorbell",
44020
43998
  vocabularyEvent: "onPressed",
@@ -44046,7 +44024,7 @@ var CAP_CUSTOMIZE_CATALOG = {
44046
44024
  targets: [{
44047
44025
  id: "presets",
44048
44026
  cardinality: "config",
44049
- deviceTypes: [require_device_type.DeviceType.Fan],
44027
+ deviceTypes: [require_composed_stable_id.DeviceType.Fan],
44050
44028
  apply: "add",
44051
44029
  readMethod: "getPresets",
44052
44030
  writeMethod: "setPresets",
@@ -44061,7 +44039,7 @@ var CAP_CUSTOMIZE_CATALOG = {
44061
44039
  targets: [{
44062
44040
  id: "door-contact",
44063
44041
  cardinality: "scalar",
44064
- deviceTypes: [require_device_type.DeviceType.Lock],
44042
+ deviceTypes: [require_composed_stable_id.DeviceType.Lock],
44065
44043
  apply: "replace",
44066
44044
  vocabularyCap: "lock-control",
44067
44045
  vocabularyStateField: "state",
@@ -44098,7 +44076,7 @@ var CAP_CUSTOMIZE_CATALOG = {
44098
44076
  targets: [{
44099
44077
  id: "detected",
44100
44078
  cardinality: "event",
44101
- deviceTypes: [require_device_type.DeviceType.Camera],
44079
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
44102
44080
  apply: "add",
44103
44081
  vocabularyCap: "motion",
44104
44082
  vocabularyEvent: "onMotionChanged",
@@ -44137,21 +44115,21 @@ var CAP_CUSTOMIZE_CATALOG = {
44137
44115
  id: "power",
44138
44116
  cardinality: "scalar",
44139
44117
  deviceTypes: [
44140
- require_device_type.DeviceType.Switch,
44141
- require_device_type.DeviceType.Light,
44142
- require_device_type.DeviceType.Fan,
44143
- require_device_type.DeviceType.Climate,
44144
- require_device_type.DeviceType.Thermostat,
44145
- require_device_type.DeviceType.Humidifier,
44146
- require_device_type.DeviceType.WaterHeater,
44147
- require_device_type.DeviceType.MediaPlayer,
44148
- require_device_type.DeviceType.Washer,
44149
- require_device_type.DeviceType.Dryer,
44150
- require_device_type.DeviceType.Dishwasher,
44151
- require_device_type.DeviceType.Vacuum,
44152
- require_device_type.DeviceType.LawnMower,
44153
- require_device_type.DeviceType.PetFeeder,
44154
- require_device_type.DeviceType.Heater
44118
+ require_composed_stable_id.DeviceType.Switch,
44119
+ require_composed_stable_id.DeviceType.Light,
44120
+ require_composed_stable_id.DeviceType.Fan,
44121
+ require_composed_stable_id.DeviceType.Climate,
44122
+ require_composed_stable_id.DeviceType.Thermostat,
44123
+ require_composed_stable_id.DeviceType.Humidifier,
44124
+ require_composed_stable_id.DeviceType.WaterHeater,
44125
+ require_composed_stable_id.DeviceType.MediaPlayer,
44126
+ require_composed_stable_id.DeviceType.Washer,
44127
+ require_composed_stable_id.DeviceType.Dryer,
44128
+ require_composed_stable_id.DeviceType.Dishwasher,
44129
+ require_composed_stable_id.DeviceType.Vacuum,
44130
+ require_composed_stable_id.DeviceType.LawnMower,
44131
+ require_composed_stable_id.DeviceType.PetFeeder,
44132
+ require_composed_stable_id.DeviceType.Heater
44155
44133
  ],
44156
44134
  apply: "add",
44157
44135
  vocabularyCap: "power-meter",
@@ -44177,21 +44155,21 @@ var CAP_CUSTOMIZE_CATALOG = {
44177
44155
  id: "energy",
44178
44156
  cardinality: "scalar",
44179
44157
  deviceTypes: [
44180
- require_device_type.DeviceType.Switch,
44181
- require_device_type.DeviceType.Light,
44182
- require_device_type.DeviceType.Fan,
44183
- require_device_type.DeviceType.Climate,
44184
- require_device_type.DeviceType.Thermostat,
44185
- require_device_type.DeviceType.Humidifier,
44186
- require_device_type.DeviceType.WaterHeater,
44187
- require_device_type.DeviceType.MediaPlayer,
44188
- require_device_type.DeviceType.Washer,
44189
- require_device_type.DeviceType.Dryer,
44190
- require_device_type.DeviceType.Dishwasher,
44191
- require_device_type.DeviceType.Vacuum,
44192
- require_device_type.DeviceType.LawnMower,
44193
- require_device_type.DeviceType.PetFeeder,
44194
- require_device_type.DeviceType.Heater
44158
+ require_composed_stable_id.DeviceType.Switch,
44159
+ require_composed_stable_id.DeviceType.Light,
44160
+ require_composed_stable_id.DeviceType.Fan,
44161
+ require_composed_stable_id.DeviceType.Climate,
44162
+ require_composed_stable_id.DeviceType.Thermostat,
44163
+ require_composed_stable_id.DeviceType.Humidifier,
44164
+ require_composed_stable_id.DeviceType.WaterHeater,
44165
+ require_composed_stable_id.DeviceType.MediaPlayer,
44166
+ require_composed_stable_id.DeviceType.Washer,
44167
+ require_composed_stable_id.DeviceType.Dryer,
44168
+ require_composed_stable_id.DeviceType.Dishwasher,
44169
+ require_composed_stable_id.DeviceType.Vacuum,
44170
+ require_composed_stable_id.DeviceType.LawnMower,
44171
+ require_composed_stable_id.DeviceType.PetFeeder,
44172
+ require_composed_stable_id.DeviceType.Heater
44195
44173
  ],
44196
44174
  apply: "add",
44197
44175
  vocabularyCap: "power-meter",
@@ -44217,21 +44195,21 @@ var CAP_CUSTOMIZE_CATALOG = {
44217
44195
  id: "voltage",
44218
44196
  cardinality: "scalar",
44219
44197
  deviceTypes: [
44220
- require_device_type.DeviceType.Switch,
44221
- require_device_type.DeviceType.Light,
44222
- require_device_type.DeviceType.Fan,
44223
- require_device_type.DeviceType.Climate,
44224
- require_device_type.DeviceType.Thermostat,
44225
- require_device_type.DeviceType.Humidifier,
44226
- require_device_type.DeviceType.WaterHeater,
44227
- require_device_type.DeviceType.MediaPlayer,
44228
- require_device_type.DeviceType.Washer,
44229
- require_device_type.DeviceType.Dryer,
44230
- require_device_type.DeviceType.Dishwasher,
44231
- require_device_type.DeviceType.Vacuum,
44232
- require_device_type.DeviceType.LawnMower,
44233
- require_device_type.DeviceType.PetFeeder,
44234
- require_device_type.DeviceType.Heater
44198
+ require_composed_stable_id.DeviceType.Switch,
44199
+ require_composed_stable_id.DeviceType.Light,
44200
+ require_composed_stable_id.DeviceType.Fan,
44201
+ require_composed_stable_id.DeviceType.Climate,
44202
+ require_composed_stable_id.DeviceType.Thermostat,
44203
+ require_composed_stable_id.DeviceType.Humidifier,
44204
+ require_composed_stable_id.DeviceType.WaterHeater,
44205
+ require_composed_stable_id.DeviceType.MediaPlayer,
44206
+ require_composed_stable_id.DeviceType.Washer,
44207
+ require_composed_stable_id.DeviceType.Dryer,
44208
+ require_composed_stable_id.DeviceType.Dishwasher,
44209
+ require_composed_stable_id.DeviceType.Vacuum,
44210
+ require_composed_stable_id.DeviceType.LawnMower,
44211
+ require_composed_stable_id.DeviceType.PetFeeder,
44212
+ require_composed_stable_id.DeviceType.Heater
44235
44213
  ],
44236
44214
  apply: "add",
44237
44215
  vocabularyCap: "power-meter",
@@ -44257,21 +44235,21 @@ var CAP_CUSTOMIZE_CATALOG = {
44257
44235
  id: "current",
44258
44236
  cardinality: "scalar",
44259
44237
  deviceTypes: [
44260
- require_device_type.DeviceType.Switch,
44261
- require_device_type.DeviceType.Light,
44262
- require_device_type.DeviceType.Fan,
44263
- require_device_type.DeviceType.Climate,
44264
- require_device_type.DeviceType.Thermostat,
44265
- require_device_type.DeviceType.Humidifier,
44266
- require_device_type.DeviceType.WaterHeater,
44267
- require_device_type.DeviceType.MediaPlayer,
44268
- require_device_type.DeviceType.Washer,
44269
- require_device_type.DeviceType.Dryer,
44270
- require_device_type.DeviceType.Dishwasher,
44271
- require_device_type.DeviceType.Vacuum,
44272
- require_device_type.DeviceType.LawnMower,
44273
- require_device_type.DeviceType.PetFeeder,
44274
- require_device_type.DeviceType.Heater
44238
+ require_composed_stable_id.DeviceType.Switch,
44239
+ require_composed_stable_id.DeviceType.Light,
44240
+ require_composed_stable_id.DeviceType.Fan,
44241
+ require_composed_stable_id.DeviceType.Climate,
44242
+ require_composed_stable_id.DeviceType.Thermostat,
44243
+ require_composed_stable_id.DeviceType.Humidifier,
44244
+ require_composed_stable_id.DeviceType.WaterHeater,
44245
+ require_composed_stable_id.DeviceType.MediaPlayer,
44246
+ require_composed_stable_id.DeviceType.Washer,
44247
+ require_composed_stable_id.DeviceType.Dryer,
44248
+ require_composed_stable_id.DeviceType.Dishwasher,
44249
+ require_composed_stable_id.DeviceType.Vacuum,
44250
+ require_composed_stable_id.DeviceType.LawnMower,
44251
+ require_composed_stable_id.DeviceType.PetFeeder,
44252
+ require_composed_stable_id.DeviceType.Heater
44275
44253
  ],
44276
44254
  apply: "add",
44277
44255
  vocabularyCap: "power-meter",
@@ -44301,21 +44279,21 @@ var CAP_CUSTOMIZE_CATALOG = {
44301
44279
  id: "switch",
44302
44280
  cardinality: "scalar",
44303
44281
  deviceTypes: [
44304
- require_device_type.DeviceType.Gateway,
44305
- require_device_type.DeviceType.Hub,
44306
- require_device_type.DeviceType.Camera,
44307
- require_device_type.DeviceType.Sensor,
44308
- require_device_type.DeviceType.MediaPlayer,
44309
- require_device_type.DeviceType.Vacuum,
44310
- require_device_type.DeviceType.Generic,
44311
- require_device_type.DeviceType.Washer,
44312
- require_device_type.DeviceType.Dryer,
44313
- require_device_type.DeviceType.Dishwasher,
44314
- require_device_type.DeviceType.PetFountain,
44315
- require_device_type.DeviceType.Fan,
44316
- require_device_type.DeviceType.Humidifier,
44317
- require_device_type.DeviceType.Climate,
44318
- require_device_type.DeviceType.WaterHeater
44282
+ require_composed_stable_id.DeviceType.Gateway,
44283
+ require_composed_stable_id.DeviceType.Hub,
44284
+ require_composed_stable_id.DeviceType.Camera,
44285
+ require_composed_stable_id.DeviceType.Sensor,
44286
+ require_composed_stable_id.DeviceType.MediaPlayer,
44287
+ require_composed_stable_id.DeviceType.Vacuum,
44288
+ require_composed_stable_id.DeviceType.Generic,
44289
+ require_composed_stable_id.DeviceType.Washer,
44290
+ require_composed_stable_id.DeviceType.Dryer,
44291
+ require_composed_stable_id.DeviceType.Dishwasher,
44292
+ require_composed_stable_id.DeviceType.PetFountain,
44293
+ require_composed_stable_id.DeviceType.Fan,
44294
+ require_composed_stable_id.DeviceType.Humidifier,
44295
+ require_composed_stable_id.DeviceType.Climate,
44296
+ require_composed_stable_id.DeviceType.WaterHeater
44319
44297
  ],
44320
44298
  apply: "add",
44321
44299
  vocabularyCap: "power-source",
@@ -44348,7 +44326,7 @@ var CAP_CUSTOMIZE_CATALOG = {
44348
44326
  targets: [{
44349
44327
  id: "remote",
44350
44328
  cardinality: "config",
44351
- deviceTypes: [require_device_type.DeviceType.MediaPlayer],
44329
+ deviceTypes: [require_composed_stable_id.DeviceType.MediaPlayer],
44352
44330
  apply: "add",
44353
44331
  readMethod: "getConfig",
44354
44332
  writeMethod: "setConfig",
@@ -44364,19 +44342,19 @@ var CAP_CUSTOMIZE_CATALOG = {
44364
44342
  id: "running",
44365
44343
  cardinality: "scalar",
44366
44344
  deviceTypes: [
44367
- require_device_type.DeviceType.Washer,
44368
- require_device_type.DeviceType.Dryer,
44369
- require_device_type.DeviceType.Dishwasher,
44370
- require_device_type.DeviceType.Vacuum,
44371
- require_device_type.DeviceType.LawnMower,
44372
- require_device_type.DeviceType.MediaPlayer,
44373
- require_device_type.DeviceType.WaterHeater,
44374
- require_device_type.DeviceType.Humidifier,
44375
- require_device_type.DeviceType.Fan,
44376
- require_device_type.DeviceType.Climate,
44377
- require_device_type.DeviceType.Thermostat,
44378
- require_device_type.DeviceType.PetFeeder,
44379
- require_device_type.DeviceType.Heater
44345
+ require_composed_stable_id.DeviceType.Washer,
44346
+ require_composed_stable_id.DeviceType.Dryer,
44347
+ require_composed_stable_id.DeviceType.Dishwasher,
44348
+ require_composed_stable_id.DeviceType.Vacuum,
44349
+ require_composed_stable_id.DeviceType.LawnMower,
44350
+ require_composed_stable_id.DeviceType.MediaPlayer,
44351
+ require_composed_stable_id.DeviceType.WaterHeater,
44352
+ require_composed_stable_id.DeviceType.Humidifier,
44353
+ require_composed_stable_id.DeviceType.Fan,
44354
+ require_composed_stable_id.DeviceType.Climate,
44355
+ require_composed_stable_id.DeviceType.Thermostat,
44356
+ require_composed_stable_id.DeviceType.PetFeeder,
44357
+ require_composed_stable_id.DeviceType.Heater
44380
44358
  ],
44381
44359
  apply: "add",
44382
44360
  vocabularyCap: "running-state",
@@ -44403,7 +44381,7 @@ var CAP_CUSTOMIZE_CATALOG = {
44403
44381
  defaultThreshold: 5,
44404
44382
  defaultStartDwellMs: 3e4,
44405
44383
  defaultStopDwellMs: 18e4,
44406
- deviceTypeDefaults: { [require_device_type.DeviceType.MediaPlayer]: {
44384
+ deviceTypeDefaults: { [require_composed_stable_id.DeviceType.MediaPlayer]: {
44407
44385
  startDwellMs: 1e4,
44408
44386
  stopDwellMs: 1e4,
44409
44387
  minSamples: 1
@@ -45092,9 +45070,9 @@ function numeric(input) {
45092
45070
  return {
45093
45071
  ...base,
45094
45072
  family: "numeric",
45095
- deviceType: require_device_type.DeviceType.Sensor,
45096
- memberDeviceType: require_device_type.DeviceType.Sensor,
45097
- memberDeviceTypes: [require_device_type.DeviceType.Sensor, ...alsoFrom?.deviceTypes ?? []],
45073
+ deviceType: require_composed_stable_id.DeviceType.Sensor,
45074
+ memberDeviceType: require_composed_stable_id.DeviceType.Sensor,
45075
+ memberDeviceTypes: [require_composed_stable_id.DeviceType.Sensor, ...alsoFrom?.deviceTypes ?? []],
45098
45076
  activeWhen: void 0,
45099
45077
  commandCaps: [],
45100
45078
  baseUnit: require_sleep.baseUnitOf(input.quantity),
@@ -45105,14 +45083,14 @@ function numeric(input) {
45105
45083
  }, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
45106
45084
  };
45107
45085
  }
45108
- var CLIMATE_DEVICES = [require_device_type.DeviceType.Thermostat, require_device_type.DeviceType.Climate];
45086
+ var CLIMATE_DEVICES = [require_composed_stable_id.DeviceType.Thermostat, require_composed_stable_id.DeviceType.Climate];
45109
45087
  function binary(input) {
45110
45088
  return {
45111
45089
  ...input,
45112
45090
  family: "binary",
45113
- deviceType: require_device_type.DeviceType.Sensor,
45114
- memberDeviceType: require_device_type.DeviceType.Sensor,
45115
- memberDeviceTypes: [require_device_type.DeviceType.Sensor],
45091
+ deviceType: require_composed_stable_id.DeviceType.Sensor,
45092
+ memberDeviceType: require_composed_stable_id.DeviceType.Sensor,
45093
+ memberDeviceTypes: [require_composed_stable_id.DeviceType.Sensor],
45116
45094
  activeWhen: void 0,
45117
45095
  commandCaps: [],
45118
45096
  quantity: "none",
@@ -45125,7 +45103,7 @@ var GROUP_TEMPLATES = [
45125
45103
  numeric({
45126
45104
  id: "temperature",
45127
45105
  summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
45128
- role: require_device_type.DeviceRole.TemperatureSensor,
45106
+ role: require_composed_stable_id.DeviceRole.TemperatureSensor,
45129
45107
  outputCap: "temperature-sensor",
45130
45108
  outputField: "temperature",
45131
45109
  quantity: "temperature",
@@ -45143,7 +45121,7 @@ var GROUP_TEMPLATES = [
45143
45121
  numeric({
45144
45122
  id: "humidity",
45145
45123
  summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
45146
- role: require_device_type.DeviceRole.HumiditySensor,
45124
+ role: require_composed_stable_id.DeviceRole.HumiditySensor,
45147
45125
  outputCap: "humidity-sensor",
45148
45126
  outputField: "humidity",
45149
45127
  quantity: "humidity",
@@ -45161,7 +45139,7 @@ var GROUP_TEMPLATES = [
45161
45139
  numeric({
45162
45140
  id: "pressure",
45163
45141
  summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
45164
- role: require_device_type.DeviceRole.PressureSensor,
45142
+ role: require_composed_stable_id.DeviceRole.PressureSensor,
45165
45143
  outputCap: "pressure-sensor",
45166
45144
  outputField: "pressure",
45167
45145
  quantity: "pressure",
@@ -45172,7 +45150,7 @@ var GROUP_TEMPLATES = [
45172
45150
  numeric({
45173
45151
  id: "illuminance",
45174
45152
  summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
45175
- role: require_device_type.DeviceRole.AmbientLightSensor,
45153
+ role: require_composed_stable_id.DeviceRole.AmbientLightSensor,
45176
45154
  outputCap: "ambient-light-sensor",
45177
45155
  outputField: "illuminance",
45178
45156
  quantity: "illuminance",
@@ -45183,7 +45161,7 @@ var GROUP_TEMPLATES = [
45183
45161
  numeric({
45184
45162
  id: "power",
45185
45163
  summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
45186
- role: require_device_type.DeviceRole.PowerSensor,
45164
+ role: require_composed_stable_id.DeviceRole.PowerSensor,
45187
45165
  outputCap: "power-meter",
45188
45166
  outputField: "power",
45189
45167
  quantity: "power",
@@ -45194,7 +45172,7 @@ var GROUP_TEMPLATES = [
45194
45172
  numeric({
45195
45173
  id: "energy",
45196
45174
  summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
45197
- role: require_device_type.DeviceRole.EnergySensor,
45175
+ role: require_composed_stable_id.DeviceRole.EnergySensor,
45198
45176
  outputCap: "power-meter",
45199
45177
  outputField: "energy",
45200
45178
  quantity: "energy",
@@ -45205,7 +45183,7 @@ var GROUP_TEMPLATES = [
45205
45183
  numeric({
45206
45184
  id: "battery",
45207
45185
  summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
45208
- role: require_device_type.DeviceRole.BatterySensor,
45186
+ role: require_composed_stable_id.DeviceRole.BatterySensor,
45209
45187
  outputCap: "battery",
45210
45188
  outputField: "level",
45211
45189
  quantity: "percentage",
@@ -45229,7 +45207,7 @@ var GROUP_TEMPLATES = [
45229
45207
  numeric({
45230
45208
  id: "numeric",
45231
45209
  summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
45232
- role: require_device_type.DeviceRole.NumericSensor,
45210
+ role: require_composed_stable_id.DeviceRole.NumericSensor,
45233
45211
  outputCap: "numeric-sensor",
45234
45212
  outputField: "value",
45235
45213
  quantity: "device",
@@ -45240,7 +45218,7 @@ var GROUP_TEMPLATES = [
45240
45218
  binary({
45241
45219
  id: "motion",
45242
45220
  summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
45243
- role: require_device_type.DeviceRole.MotionSensor,
45221
+ role: require_composed_stable_id.DeviceRole.MotionSensor,
45244
45222
  outputCap: "motion",
45245
45223
  outputField: "detected",
45246
45224
  defaultAggregate: "any",
@@ -45259,7 +45237,7 @@ var GROUP_TEMPLATES = [
45259
45237
  binary({
45260
45238
  id: "contact",
45261
45239
  summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
45262
- role: require_device_type.DeviceRole.ContactSensor,
45240
+ role: require_composed_stable_id.DeviceRole.ContactSensor,
45263
45241
  outputCap: "contact",
45264
45242
  outputField: "entryOpen",
45265
45243
  defaultAggregate: "any",
@@ -45272,7 +45250,7 @@ var GROUP_TEMPLATES = [
45272
45250
  binary({
45273
45251
  id: "leak",
45274
45252
  summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
45275
- role: require_device_type.DeviceRole.LeakSensor,
45253
+ role: require_composed_stable_id.DeviceRole.LeakSensor,
45276
45254
  outputCap: "flood",
45277
45255
  outputField: "flooded",
45278
45256
  defaultAggregate: "any",
@@ -45285,7 +45263,7 @@ var GROUP_TEMPLATES = [
45285
45263
  binary({
45286
45264
  id: "smoke",
45287
45265
  summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
45288
- role: require_device_type.DeviceRole.SmokeSensor,
45266
+ role: require_composed_stable_id.DeviceRole.SmokeSensor,
45289
45267
  outputCap: "smoke",
45290
45268
  outputField: "detected",
45291
45269
  defaultAggregate: "any",
@@ -45298,7 +45276,7 @@ var GROUP_TEMPLATES = [
45298
45276
  binary({
45299
45277
  id: "occupancy",
45300
45278
  summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
45301
- role: require_device_type.DeviceRole.BinarySensor,
45279
+ role: require_composed_stable_id.DeviceRole.BinarySensor,
45302
45280
  outputCap: "binary",
45303
45281
  outputField: "on",
45304
45282
  defaultAggregate: "any",
@@ -45314,7 +45292,7 @@ var GROUP_TEMPLATES = [
45314
45292
  binary({
45315
45293
  id: "binary",
45316
45294
  summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
45317
- role: require_device_type.DeviceRole.BinarySensor,
45295
+ role: require_composed_stable_id.DeviceRole.BinarySensor,
45318
45296
  outputCap: "binary",
45319
45297
  outputField: "on",
45320
45298
  defaultAggregate: "any",
@@ -45327,7 +45305,7 @@ var GROUP_TEMPLATES = [
45327
45305
  actuator({
45328
45306
  id: "switch",
45329
45307
  summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
45330
- deviceType: require_device_type.DeviceType.Switch,
45308
+ deviceType: require_composed_stable_id.DeviceType.Switch,
45331
45309
  outputCap: "switch",
45332
45310
  outputField: "on",
45333
45311
  member: {
@@ -45339,7 +45317,7 @@ var GROUP_TEMPLATES = [
45339
45317
  actuator({
45340
45318
  id: "light",
45341
45319
  summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
45342
- deviceType: require_device_type.DeviceType.Light,
45320
+ deviceType: require_composed_stable_id.DeviceType.Light,
45343
45321
  outputCap: "switch",
45344
45322
  outputField: "on",
45345
45323
  member: {
@@ -45355,7 +45333,7 @@ var GROUP_TEMPLATES = [
45355
45333
  actuator({
45356
45334
  id: "fan",
45357
45335
  summary: "On when at least one fan is on, or when all of them are. Speed, preset, direction and oscillation are offered only when every fan has them. A command is not sent to a fan that lacks it.",
45358
- deviceType: require_device_type.DeviceType.Fan,
45336
+ deviceType: require_composed_stable_id.DeviceType.Fan,
45359
45337
  outputCap: "switch",
45360
45338
  outputField: "on",
45361
45339
  member: {
@@ -45367,7 +45345,7 @@ var GROUP_TEMPLATES = [
45367
45345
  actuator({
45368
45346
  id: "cover",
45369
45347
  summary: "Open when at least one cover is open or part-open, or only when all of them are. Position and tilt are offered only when every cover has them. A cover that reports nothing is left out, never read as closed.",
45370
- deviceType: require_device_type.DeviceType.Cover,
45348
+ deviceType: require_composed_stable_id.DeviceType.Cover,
45371
45349
  outputCap: "group-active",
45372
45350
  outputField: "active",
45373
45351
  member: {
@@ -45384,7 +45362,7 @@ var GROUP_TEMPLATES = [
45384
45362
  actuator({
45385
45363
  id: "valve",
45386
45364
  summary: "Open when at least one valve is open or part-open, or only when all of them are. Position is offered only when every valve has it. A valve that reports nothing is left out, never read as closed.",
45387
- deviceType: require_device_type.DeviceType.Valve,
45365
+ deviceType: require_composed_stable_id.DeviceType.Valve,
45388
45366
  outputCap: "group-active",
45389
45367
  outputField: "active",
45390
45368
  member: {
@@ -45401,7 +45379,7 @@ var GROUP_TEMPLATES = [
45401
45379
  actuator({
45402
45380
  id: "lock",
45403
45381
  summary: "Locked when at least one lock is locked, or only when all of them are. A jammed or moving lock is not locked. Locking is one tap; unlocking the group needs a confirmation every time, and nothing is sent without it.",
45404
- deviceType: require_device_type.DeviceType.Lock,
45382
+ deviceType: require_composed_stable_id.DeviceType.Lock,
45405
45383
  outputCap: "group-active",
45406
45384
  outputField: "active",
45407
45385
  member: {
@@ -45414,7 +45392,7 @@ var GROUP_TEMPLATES = [
45414
45392
  actuator({
45415
45393
  id: "media-player",
45416
45394
  summary: "Playing when at least one player is playing, or only when all of them are. Volume is offered only when every player has it. A player that reports nothing is left out, never read as stopped.",
45417
- deviceType: require_device_type.DeviceType.MediaPlayer,
45395
+ deviceType: require_composed_stable_id.DeviceType.MediaPlayer,
45418
45396
  outputCap: "group-active",
45419
45397
  outputField: "active",
45420
45398
  member: {
@@ -45427,8 +45405,8 @@ var GROUP_TEMPLATES = [
45427
45405
  actuator({
45428
45406
  id: "climate",
45429
45407
  summary: "Running when at least one thermostat or air conditioner is not off, or only when all of them are. Target temperature and fan are offered only when every device has them. A device that reports nothing is left out, never read as off.",
45430
- deviceType: require_device_type.DeviceType.Thermostat,
45431
- memberDeviceTypes: [require_device_type.DeviceType.Thermostat, require_device_type.DeviceType.Climate],
45408
+ deviceType: require_composed_stable_id.DeviceType.Thermostat,
45409
+ memberDeviceTypes: [require_composed_stable_id.DeviceType.Thermostat, require_composed_stable_id.DeviceType.Climate],
45432
45410
  outputCap: "group-active",
45433
45411
  outputField: "active",
45434
45412
  member: {
@@ -45487,9 +45465,9 @@ var LIGHT_SHARED_CAPS = [
45487
45465
  "color"
45488
45466
  ];
45489
45467
  var COLOR_MODE_FEATURES = [
45490
- require_device_type.DeviceFeature.LightColorRgb,
45491
- require_device_type.DeviceFeature.LightColorHsv,
45492
- require_device_type.DeviceFeature.LightColorMired
45468
+ require_composed_stable_id.DeviceFeature.LightColorRgb,
45469
+ require_composed_stable_id.DeviceFeature.LightColorHsv,
45470
+ require_composed_stable_id.DeviceFeature.LightColorMired
45493
45471
  ];
45494
45472
  /** How many member calls run at once. The rest wait; none are dropped. */
45495
45473
  var FAN_OUT_CONCURRENCY = 4;
@@ -45820,7 +45798,7 @@ var HISTORY_CATALOG = {
45820
45798
  } },
45821
45799
  "motion": { "detected": {
45822
45800
  kind: "boolean",
45823
- excludeDeviceTypes: [require_device_type.DeviceType.Camera]
45801
+ excludeDeviceTypes: [require_composed_stable_id.DeviceType.Camera]
45824
45802
  } },
45825
45803
  "network-link": {
45826
45804
  "signal": {
@@ -46142,7 +46120,7 @@ function draft(input) {
46142
46120
  return {
46143
46121
  target: {
46144
46122
  kind: "new",
46145
- type: require_device_type.DeviceType.Sensor,
46123
+ type: require_composed_stable_id.DeviceType.Sensor,
46146
46124
  role: input.role
46147
46125
  },
46148
46126
  helper: input.spec,
@@ -46170,7 +46148,7 @@ function statisticDraft(spec, retention = require_composition.DEFAULT_HISTORY_RE
46170
46148
  return {
46171
46149
  problems,
46172
46150
  draft: draft({
46173
- role: require_device_type.DeviceRole.NumericSensor,
46151
+ role: require_composed_stable_id.DeviceRole.NumericSensor,
46174
46152
  cap: "numeric-sensor",
46175
46153
  field: "value",
46176
46154
  empty: "null",
@@ -46193,7 +46171,7 @@ function derivativeDraft(spec, retention = require_composition.DEFAULT_HISTORY_R
46193
46171
  return {
46194
46172
  problems,
46195
46173
  draft: draft({
46196
- role: require_device_type.DeviceRole.NumericSensor,
46174
+ role: require_composed_stable_id.DeviceRole.NumericSensor,
46197
46175
  cap: "numeric-sensor",
46198
46176
  field: "value",
46199
46177
  empty: "null",
@@ -46215,7 +46193,7 @@ function integralDraft(spec, retention = require_composition.DEFAULT_HISTORY_RET
46215
46193
  return {
46216
46194
  problems,
46217
46195
  draft: draft({
46218
- role: energy ? require_device_type.DeviceRole.EnergySensor : require_device_type.DeviceRole.NumericSensor,
46196
+ role: energy ? require_composed_stable_id.DeviceRole.EnergySensor : require_composed_stable_id.DeviceRole.NumericSensor,
46219
46197
  cap: energy ? "power-meter" : "meter",
46220
46198
  field: energy ? "energy" : "value",
46221
46199
  empty: "offline",
@@ -46371,8 +46349,8 @@ function numericSensor(helper, value, extra = []) {
46371
46349
  return {
46372
46350
  target: {
46373
46351
  kind: "new",
46374
- type: require_device_type.DeviceType.Sensor,
46375
- role: require_device_type.DeviceRole.NumericSensor
46352
+ type: require_composed_stable_id.DeviceType.Sensor,
46353
+ role: require_composed_stable_id.DeviceRole.NumericSensor
46376
46354
  },
46377
46355
  helper,
46378
46356
  features: [{
@@ -46389,8 +46367,8 @@ function binarySensor(helper, on) {
46389
46367
  return {
46390
46368
  target: {
46391
46369
  kind: "new",
46392
- type: require_device_type.DeviceType.Sensor,
46393
- role: require_device_type.DeviceRole.BinarySensor
46370
+ type: require_composed_stable_id.DeviceType.Sensor,
46371
+ role: require_composed_stable_id.DeviceRole.BinarySensor
46394
46372
  },
46395
46373
  helper,
46396
46374
  features: [{
@@ -46900,7 +46878,7 @@ function buildCapabilityLookup(defs) {
46900
46878
  var BASE_DEVICE_CAPS = new Set(["device-status", "feature-probe"]);
46901
46879
  var PENDING_SELF = {
46902
46880
  addonId: require_composition.COMPOSER_ADDON_ID,
46903
- stableId: `${require_composition.COMPOSED_DEVICE_STABLE_ID_PREFIX}(unsaved)`
46881
+ stableId: `${require_composed_stable_id.COMPOSED_DEVICE_STABLE_ID_PREFIX}(unsaved)`
46904
46882
  };
46905
46883
  /** The candidate's block id before its first save. Stored block ids are `randomUUID()`, so none can carry it. */
46906
46884
  var PENDING_BLOCK_ID = "(unsaved)";
@@ -48023,7 +48001,7 @@ var coreBlocksCapability = {
48023
48001
  * from the validator's own blockers; a replace of a BOUND cap is not
48024
48002
  * listed here (the device's bindings say what it has).
48025
48003
  */
48026
- listComposableCaps: require_sleep.method(zod.z.object({ deviceType: zod.z.enum(require_device_type.DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }),
48004
+ listComposableCaps: require_sleep.method(zod.z.object({ deviceType: zod.z.enum(require_composed_stable_id.DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }),
48027
48005
  /**
48028
48006
  * Validate without saving — the same verdict the save reaches. A mutation
48029
48007
  * for its body size; it writes nothing, so its access is `view`.
@@ -48046,7 +48024,7 @@ var coreBlocksCapability = {
48046
48024
  deviceId: zod.z.number().int(),
48047
48025
  cap: zod.z.string().min(1),
48048
48026
  fieldPath: zod.z.string().min(1),
48049
- deviceType: zod.z.enum(require_device_type.DeviceType).optional()
48027
+ deviceType: zod.z.enum(require_composed_stable_id.DeviceType).optional()
48050
48028
  }), RunningThresholdProposalSchema, {
48051
48029
  auth: "admin",
48052
48030
  access: "view"
@@ -48122,7 +48100,7 @@ var coverCapability = {
48122
48100
  scope: "device",
48123
48101
  deviceNative: true,
48124
48102
  mode: "singleton",
48125
- deviceTypes: [require_device_type.DeviceType.Cover],
48103
+ deviceTypes: [require_composed_stable_id.DeviceType.Cover],
48126
48104
  methods: {
48127
48105
  open: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
48128
48106
  kind: "mutation",
@@ -48613,7 +48591,7 @@ var dayNightCapability = {
48613
48591
  scope: "device",
48614
48592
  deviceNative: true,
48615
48593
  mode: "singleton",
48616
- deviceTypes: [require_device_type.DeviceType.Camera],
48594
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
48617
48595
  deviceConfig: { ui: {
48618
48596
  kind: "derived-form",
48619
48597
  builderId: "day-night",
@@ -48771,7 +48749,7 @@ var detectionPipelineCapability = {
48771
48749
  mode: "singleton",
48772
48750
  kind: "wrapper",
48773
48751
  defaultActive: true,
48774
- deviceTypes: [require_device_type.DeviceType.Camera],
48752
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
48775
48753
  exposesDeviceSettings: true,
48776
48754
  methods: {}
48777
48755
  };
@@ -48927,7 +48905,7 @@ var DiscoveredChildDeviceSchema = zod.z.lazy(() => zod.z.object({
48927
48905
  /** Friendly name as reported by the source (Reolink camera name, ONVIF profile, ...). */
48928
48906
  name: zod.z.string(),
48929
48907
  /** DeviceType the child should be created with on adopt. */
48930
- type: zod.z.enum(require_device_type.DeviceType),
48908
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
48931
48909
  status: DiscoveredChildStatusSchema,
48932
48910
  /** Free-form integration-specific metadata surfaced in the panel. */
48933
48911
  metadata: zod.z.object({
@@ -48985,7 +48963,7 @@ var deviceDiscoveryCapability = {
48985
48963
  scope: "device",
48986
48964
  deviceNative: true,
48987
48965
  mode: "singleton",
48988
- deviceTypes: [require_device_type.DeviceType.Hub],
48966
+ deviceTypes: [require_composed_stable_id.DeviceType.Hub],
48989
48967
  status: {
48990
48968
  schema: DeviceDiscoveryStatusSchema,
48991
48969
  kind: "poll"
@@ -49988,7 +49966,7 @@ var DiscoveryHitSchema = zod.z.object({
49988
49966
  */
49989
49967
  var DiscoveryCandidateSchema = zod.z.object({
49990
49968
  stableId: zod.z.string(),
49991
- type: zod.z.enum(require_device_type.DeviceType),
49969
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
49992
49970
  suggestedName: zod.z.string(),
49993
49971
  prefilledConfig: zod.z.record(zod.z.string(), zod.z.unknown()),
49994
49972
  /**
@@ -50162,7 +50140,7 @@ var deviceProviderCapability = {
50162
50140
  */
50163
50141
  getManualCreationType: require_sleep.method(zod.z.object({
50164
50142
  /** The integration asked about; a provider whose integrations differ answers per one. */
50165
- integrationId: zod.z.string().optional() }), zod.z.object({ deviceType: zod.z.enum(require_device_type.DeviceType).nullable() })),
50143
+ integrationId: zod.z.string().optional() }), zod.z.object({ deviceType: zod.z.enum(require_composed_stable_id.DeviceType).nullable() })),
50166
50144
  adoptDiscoveredDevice: require_sleep.method(zod.z.object({
50167
50145
  candidate: DiscoveryCandidateSchema,
50168
50146
  /** The integration the operator adopts into; a provider with several instances needs it. */
@@ -50179,12 +50157,12 @@ integrationId: zod.z.string().optional() }), zod.z.object({ deviceType: zod.z.en
50179
50157
  * router type-asserts it at the boundary.
50180
50158
  */
50181
50159
  getChildCreationSchema: require_sleep.method(zod.z.object({
50182
- type: zod.z.enum(require_device_type.DeviceType),
50160
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
50183
50161
  /** The integration asked about; a provider whose integrations differ answers per one. */
50184
50162
  integrationId: zod.z.string().optional()
50185
50163
  }), CreationSchemaOutputSchema),
50186
50164
  createDevice: require_sleep.method(zod.z.object({
50187
- type: zod.z.enum(require_device_type.DeviceType),
50165
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
50188
50166
  config: zod.z.record(zod.z.string(), zod.z.unknown()),
50189
50167
  /** The integration the operator adds the device to; a provider with several instances needs it. */
50190
50168
  integrationId: zod.z.string().optional()
@@ -50205,7 +50183,7 @@ integrationId: zod.z.string().optional() }), zod.z.object({ deviceType: zod.z.en
50205
50183
  * for backwards compatibility; providers free to ignore it.
50206
50184
  */
50207
50185
  testCreationField: require_sleep.method(zod.z.object({
50208
- type: zod.z.enum(require_device_type.DeviceType),
50186
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
50209
50187
  key: zod.z.string(),
50210
50188
  value: zod.z.unknown(),
50211
50189
  formValues: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
@@ -50326,7 +50304,7 @@ var DeviceInfoSchema = zod.z.object({
50326
50304
  id: zod.z.number(),
50327
50305
  stableId: zod.z.string(),
50328
50306
  addonId: zod.z.string(),
50329
- type: zod.z.enum(require_device_type.DeviceType),
50307
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
50330
50308
  name: zod.z.string(),
50331
50309
  /** The name a value template uses for this device (`{{ stufa_veranda.temperature }}`),
50332
50310
  * entity_id style. Generated once from the name at first registration, unique
@@ -50429,7 +50407,7 @@ var LINKED_DEVICES_SLOT = {
50429
50407
  label: "Linked devices",
50430
50408
  description: "Companion devices of this camera: their controls appear with it, and the ones you opt in produce tracked events on it.",
50431
50409
  shape: "association",
50432
- hostDeviceTypes: [require_device_type.DeviceType.Camera],
50410
+ hostDeviceTypes: [require_composed_stable_id.DeviceType.Camera],
50433
50411
  sourceCaps: "any",
50434
50412
  cardinality: "many",
50435
50413
  value: LinkedDevicesSlotValueSchema
@@ -50724,7 +50702,13 @@ var deviceManagerCapability = {
50724
50702
  * row + emits `EventCategory.DeviceMetaChanged`. */
50725
50703
  setName: require_sleep.method(zod.z.object({
50726
50704
  deviceId: zod.z.number(),
50727
- name: zod.z.string()
50705
+ name: zod.z.string(),
50706
+ /**
50707
+ * Absent or true: an operator rename, which stamps `userNamed`.
50708
+ * False: the system copying a block name onto the device. That write
50709
+ * must not look like the operator's, or the next reconcile freezes it.
50710
+ */
50711
+ stampUserNamed: zod.z.boolean().optional()
50728
50712
  }), zod.z.void(), {
50729
50713
  kind: "mutation",
50730
50714
  auth: "admin"
@@ -50801,7 +50785,7 @@ var deviceManagerCapability = {
50801
50785
  * placeholder `'generic'`. */
50802
50786
  setType: require_sleep.method(zod.z.object({
50803
50787
  deviceId: zod.z.number(),
50804
- type: zod.z.enum(require_device_type.DeviceType)
50788
+ type: zod.z.enum(require_composed_stable_id.DeviceType)
50805
50789
  }), zod.z.void(), {
50806
50790
  kind: "mutation",
50807
50791
  auth: "admin"
@@ -50933,7 +50917,7 @@ var deviceManagerCapability = {
50933
50917
  deviceId: zod.z.number(),
50934
50918
  name: zod.z.string().optional(),
50935
50919
  location: zod.z.string().nullable().optional(),
50936
- type: zod.z.enum(require_device_type.DeviceType).optional(),
50920
+ type: zod.z.enum(require_composed_stable_id.DeviceType).optional(),
50937
50921
  integrationId: zod.z.string().optional(),
50938
50922
  linkDeviceId: zod.z.number().nullable().optional(),
50939
50923
  role: zod.z.string().nullable().optional()
@@ -51520,7 +51504,7 @@ var deviceManagerCapability = {
51520
51504
  */
51521
51505
  getCreationSchema: require_sleep.method(zod.z.object({
51522
51506
  addonId: zod.z.string(),
51523
- type: zod.z.enum(require_device_type.DeviceType),
51507
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
51524
51508
  /** The integration the form is for; a provider whose integrations differ (a hub
51525
51509
  * integration takes no manual add) answers per integration. Absent = the addon's own. */
51526
51510
  integrationId: zod.z.string().optional()
@@ -51528,7 +51512,7 @@ var deviceManagerCapability = {
51528
51512
  /** Create a new device via the device-provider capability. */
51529
51513
  createDevice: require_sleep.method(zod.z.object({
51530
51514
  addonId: zod.z.string(),
51531
- type: zod.z.enum(require_device_type.DeviceType),
51515
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
51532
51516
  config: zod.z.record(zod.z.string(), zod.z.unknown()),
51533
51517
  /** Owning integration id, stamped onto the new device's meta by the
51534
51518
  * device-manager forwarder so `removeByIntegration` can cascade it.
@@ -51548,7 +51532,7 @@ var deviceManagerCapability = {
51548
51532
  */
51549
51533
  testCreationField: require_sleep.method(zod.z.object({
51550
51534
  addonId: zod.z.string(),
51551
- type: zod.z.enum(require_device_type.DeviceType),
51535
+ type: zod.z.enum(require_composed_stable_id.DeviceType),
51552
51536
  key: zod.z.string(),
51553
51537
  value: zod.z.unknown(),
51554
51538
  formValues: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
@@ -51674,7 +51658,7 @@ var deviceManagerCapability = {
51674
51658
  addonId: zod.z.string(),
51675
51659
  /** The integration the Add-Device dialog is open on; absent = the addon's own. */
51676
51660
  integrationId: zod.z.string().optional()
51677
- }), zod.z.object({ deviceType: zod.z.enum(require_device_type.DeviceType).nullable() }), { auth: "admin" }),
51661
+ }), zod.z.object({ deviceType: zod.z.enum(require_composed_stable_id.DeviceType).nullable() }), { auth: "admin" }),
51678
51662
  /** A provider's extra per-scan param form (ConfigUISchema) for the
51679
51663
  * per-integration scan, or null when it takes none. */
51680
51664
  providerDiscoveryParamsSchema: require_sleep.method(zod.z.object({ addonId: zod.z.string() }), zod.z.unknown(), { auth: "admin" }),
@@ -51755,12 +51739,12 @@ var ExtensionSlotIdSchema = zod.z.enum(EXTENSION_SLOT_IDS);
51755
51739
  var EXTENSION_SLOTS = { "linked-devices": {
51756
51740
  descriptor: LINKED_DEVICES_SLOT,
51757
51741
  declaringCap: "device-manager",
51758
- hostDeviceTypes: [require_device_type.DeviceType.Camera]
51742
+ hostDeviceTypes: [require_composed_stable_id.DeviceType.Camera]
51759
51743
  } };
51760
51744
  /** A slot's editable value, discriminated on `slot`. */
51761
51745
  var ExtensionSlotValueSchema = zod.z.discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: zod.z.literal("linked-devices") })]);
51762
51746
  /** Every device type at least one slot is offered on — `device-extension`'s `deviceTypes`. */
51763
- var EXTENSION_HOST_DEVICE_TYPES = [require_device_type.DeviceType.Camera];
51747
+ var EXTENSION_HOST_DEVICE_TYPES = [require_composed_stable_id.DeviceType.Camera];
51764
51748
  //#endregion
51765
51749
  //#region src/capabilities/device-extension.cap.ts
51766
51750
  /**
@@ -52510,9 +52494,9 @@ var DeviceRunSchema = zod.z.object({
52510
52494
  });
52511
52495
  /** Runs of these types are recorded in P1. */
52512
52496
  var DEVICE_RUNS_DEVICE_TYPES = [
52513
- require_device_type.DeviceType.Washer,
52514
- require_device_type.DeviceType.Dryer,
52515
- require_device_type.DeviceType.Dishwasher
52497
+ require_composed_stable_id.DeviceType.Washer,
52498
+ require_composed_stable_id.DeviceType.Dryer,
52499
+ require_composed_stable_id.DeviceType.Dishwasher
52516
52500
  ];
52517
52501
  var DEVICE_RUNS_MAX_PAGE = 200;
52518
52502
  var deviceRunsCapability = {
@@ -52854,7 +52838,7 @@ var deviceTransitionsCapability = {
52854
52838
  mode: "singleton",
52855
52839
  kind: "wrapper",
52856
52840
  defaultActive: true,
52857
- deviceTypes: Object.values(require_device_type.DeviceType).filter((type) => type !== require_device_type.DeviceType.Hub && type !== require_device_type.DeviceType.Container),
52841
+ deviceTypes: Object.values(require_composed_stable_id.DeviceType).filter((type) => type !== require_composed_stable_id.DeviceType.Hub && type !== require_composed_stable_id.DeviceType.Container),
52858
52842
  methods: {
52859
52843
  /**
52860
52844
  * Transitions of a device, newest first. `limit` is bounded; page with `cursor`.
@@ -53080,7 +53064,7 @@ var dishwasherCapability = {
53080
53064
  scope: "device",
53081
53065
  deviceNative: true,
53082
53066
  mode: "singleton",
53083
- deviceTypes: [require_device_type.DeviceType.Dishwasher],
53067
+ deviceTypes: [require_composed_stable_id.DeviceType.Dishwasher],
53084
53068
  methods: {
53085
53069
  /**
53086
53070
  * Start a program. Without `program` the selected one starts. `options` are
@@ -53930,7 +53914,7 @@ var doNotDisturbCapability = {
53930
53914
  scope: "device",
53931
53915
  deviceNative: true,
53932
53916
  mode: "singleton",
53933
- deviceTypes: [require_device_type.DeviceType.MediaPlayer],
53917
+ deviceTypes: [require_composed_stable_id.DeviceType.MediaPlayer],
53934
53918
  methods: { setEnabled: require_sleep.method(zod.z.object({
53935
53919
  deviceId: zod.z.number().int(),
53936
53920
  enabled: zod.z.boolean()
@@ -53969,7 +53953,7 @@ var doorbellCustomize = {
53969
53953
  cap: "doorbell",
53970
53954
  eventName: "onPressed"
53971
53955
  },
53972
- deviceTypes: [require_device_type.DeviceType.Camera],
53956
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
53973
53957
  apply: "add",
53974
53958
  applyAuthority: { kind: "composition-claim" },
53975
53959
  eventName: "onPressed",
@@ -54019,7 +54003,7 @@ var doorbellCapability = {
54019
54003
  scope: "device",
54020
54004
  deviceNative: true,
54021
54005
  mode: "singleton",
54022
- deviceTypes: [require_device_type.DeviceType.Button, require_device_type.DeviceType.Camera],
54006
+ deviceTypes: [require_composed_stable_id.DeviceType.Button, require_composed_stable_id.DeviceType.Camera],
54023
54007
  methods: {},
54024
54008
  events: {
54025
54009
  /**
@@ -54285,7 +54269,7 @@ var enumSensorCapability = {
54285
54269
  scope: "device",
54286
54270
  deviceNative: true,
54287
54271
  mode: "singleton",
54288
- deviceTypes: [require_device_type.DeviceType.Sensor],
54272
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
54289
54273
  methods: {},
54290
54274
  status: {
54291
54275
  schema: EnumSensorStatusSchema,
@@ -54342,7 +54326,7 @@ var eventEmitterCapability = {
54342
54326
  scope: "device",
54343
54327
  deviceNative: true,
54344
54328
  mode: "singleton",
54345
- deviceTypes: [require_device_type.DeviceType.EventEmitter],
54329
+ deviceTypes: [require_composed_stable_id.DeviceType.EventEmitter],
54346
54330
  methods: {},
54347
54331
  events: { onEvent: { data: EventFireSchema } },
54348
54332
  status: {
@@ -54944,7 +54928,7 @@ var fanControlCapability = {
54944
54928
  scope: "device",
54945
54929
  deviceNative: true,
54946
54930
  mode: "singleton",
54947
- deviceTypes: [require_device_type.DeviceType.Fan],
54931
+ deviceTypes: [require_composed_stable_id.DeviceType.Fan],
54948
54932
  methods: {
54949
54933
  setPercentage: require_sleep.method(zod.z.object({
54950
54934
  deviceId: zod.z.number().int().nonnegative(),
@@ -55109,7 +55093,7 @@ var fanPresetsCustomize = {
55109
55093
  id: "presets",
55110
55094
  cardinality: "config",
55111
55095
  vocabulary: { cap: "fan-presets" },
55112
- deviceTypes: [require_device_type.DeviceType.Fan],
55096
+ deviceTypes: [require_composed_stable_id.DeviceType.Fan],
55113
55097
  apply: "add",
55114
55098
  readMethod: "getPresets",
55115
55099
  writeMethod: "setPresets"
@@ -55292,7 +55276,7 @@ var floodCapability = {
55292
55276
  scope: "device",
55293
55277
  deviceNative: true,
55294
55278
  mode: "singleton",
55295
- deviceTypes: [require_device_type.DeviceType.Sensor],
55279
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
55296
55280
  methods: {},
55297
55281
  status: {
55298
55282
  schema: FloodStatusSchema,
@@ -55331,7 +55315,7 @@ var gasCapability = {
55331
55315
  scope: "device",
55332
55316
  deviceNative: true,
55333
55317
  mode: "singleton",
55334
- deviceTypes: [require_device_type.DeviceType.Sensor],
55318
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
55335
55319
  methods: {},
55336
55320
  status: {
55337
55321
  schema: GasStatusSchema,
@@ -55375,12 +55359,12 @@ var groupActiveCapability = {
55375
55359
  deviceNative: true,
55376
55360
  mode: "singleton",
55377
55361
  deviceTypes: [
55378
- require_device_type.DeviceType.Cover,
55379
- require_device_type.DeviceType.Valve,
55380
- require_device_type.DeviceType.Lock,
55381
- require_device_type.DeviceType.MediaPlayer,
55382
- require_device_type.DeviceType.Climate,
55383
- require_device_type.DeviceType.Thermostat
55362
+ require_composed_stable_id.DeviceType.Cover,
55363
+ require_composed_stable_id.DeviceType.Valve,
55364
+ require_composed_stable_id.DeviceType.Lock,
55365
+ require_composed_stable_id.DeviceType.MediaPlayer,
55366
+ require_composed_stable_id.DeviceType.Climate,
55367
+ require_composed_stable_id.DeviceType.Thermostat
55384
55368
  ],
55385
55369
  methods: {},
55386
55370
  status: {
@@ -55424,15 +55408,15 @@ var groupCommandsCapability = {
55424
55408
  deviceNative: true,
55425
55409
  mode: "singleton",
55426
55410
  deviceTypes: [
55427
- require_device_type.DeviceType.Switch,
55428
- require_device_type.DeviceType.Light,
55429
- require_device_type.DeviceType.Fan,
55430
- require_device_type.DeviceType.Cover,
55431
- require_device_type.DeviceType.Valve,
55432
- require_device_type.DeviceType.Lock,
55433
- require_device_type.DeviceType.MediaPlayer,
55434
- require_device_type.DeviceType.Thermostat,
55435
- require_device_type.DeviceType.Climate
55411
+ require_composed_stable_id.DeviceType.Switch,
55412
+ require_composed_stable_id.DeviceType.Light,
55413
+ require_composed_stable_id.DeviceType.Fan,
55414
+ require_composed_stable_id.DeviceType.Cover,
55415
+ require_composed_stable_id.DeviceType.Valve,
55416
+ require_composed_stable_id.DeviceType.Lock,
55417
+ require_composed_stable_id.DeviceType.MediaPlayer,
55418
+ require_composed_stable_id.DeviceType.Thermostat,
55419
+ require_composed_stable_id.DeviceType.Climate
55436
55420
  ],
55437
55421
  methods: {},
55438
55422
  status: {
@@ -55481,16 +55465,16 @@ var groupStatusCapability = {
55481
55465
  deviceNative: true,
55482
55466
  mode: "singleton",
55483
55467
  deviceTypes: [
55484
- require_device_type.DeviceType.Sensor,
55485
- require_device_type.DeviceType.Switch,
55486
- require_device_type.DeviceType.Light,
55487
- require_device_type.DeviceType.Fan,
55488
- require_device_type.DeviceType.Cover,
55489
- require_device_type.DeviceType.Valve,
55490
- require_device_type.DeviceType.Lock,
55491
- require_device_type.DeviceType.MediaPlayer,
55492
- require_device_type.DeviceType.Thermostat,
55493
- require_device_type.DeviceType.Climate
55468
+ require_composed_stable_id.DeviceType.Sensor,
55469
+ require_composed_stable_id.DeviceType.Switch,
55470
+ require_composed_stable_id.DeviceType.Light,
55471
+ require_composed_stable_id.DeviceType.Fan,
55472
+ require_composed_stable_id.DeviceType.Cover,
55473
+ require_composed_stable_id.DeviceType.Valve,
55474
+ require_composed_stable_id.DeviceType.Lock,
55475
+ require_composed_stable_id.DeviceType.MediaPlayer,
55476
+ require_composed_stable_id.DeviceType.Thermostat,
55477
+ require_composed_stable_id.DeviceType.Climate
55494
55478
  ],
55495
55479
  methods: {},
55496
55480
  status: {
@@ -55526,7 +55510,7 @@ var heatPumpControlCapability = {
55526
55510
  scope: "device",
55527
55511
  deviceNative: true,
55528
55512
  mode: "singleton",
55529
- deviceTypes: [require_device_type.DeviceType.HeatPump],
55513
+ deviceTypes: [require_composed_stable_id.DeviceType.HeatPump],
55530
55514
  methods: {
55531
55515
  /** off / auto / on. */
55532
55516
  setSilentMode: require_sleep.method(zod.z.object({
@@ -55758,7 +55742,7 @@ var heatPumpStatusCapability = {
55758
55742
  scope: "device",
55759
55743
  deviceNative: true,
55760
55744
  mode: "singleton",
55761
- deviceTypes: [require_device_type.DeviceType.HeatPump],
55745
+ deviceTypes: [require_composed_stable_id.DeviceType.HeatPump],
55762
55746
  methods: {},
55763
55747
  status: {
55764
55748
  schema: HeatPumpStatusSchema,
@@ -55865,7 +55849,7 @@ var heatingValveCapability = {
55865
55849
  scope: "device",
55866
55850
  deviceNative: true,
55867
55851
  mode: "singleton",
55868
- deviceTypes: [require_device_type.DeviceType.Thermostat],
55852
+ deviceTypes: [require_composed_stable_id.DeviceType.Thermostat],
55869
55853
  methods: {},
55870
55854
  status: {
55871
55855
  schema: HeatingValveStatusSchema,
@@ -55905,20 +55889,20 @@ var TimedRunUnitSchema = zod.z.enum(["s", "min"]);
55905
55889
  var TimedRunActuatorSchema = zod.z.enum(["switch", "pet-fountain"]);
55906
55890
  /** The longest run, per device type. Only these types are offered `timed-run`. */
55907
55891
  var TIMED_RUN_LIMITS = {
55908
- [require_device_type.DeviceType.Heater]: {
55892
+ [require_composed_stable_id.DeviceType.Heater]: {
55909
55893
  actuator: "switch",
55910
55894
  maxSeconds: 10800,
55911
55895
  unit: "min",
55912
55896
  quickRunDefault: 30
55913
55897
  },
55914
- [require_device_type.DeviceType.PetFountain]: {
55898
+ [require_composed_stable_id.DeviceType.PetFountain]: {
55915
55899
  actuator: "pet-fountain",
55916
55900
  maxSeconds: 300,
55917
55901
  unit: "s",
55918
55902
  quickRunDefault: 60
55919
55903
  }
55920
55904
  };
55921
- var TIMED_RUN_DEVICE_TYPES = [require_device_type.DeviceType.Heater, require_device_type.DeviceType.PetFountain];
55905
+ var TIMED_RUN_DEVICE_TYPES = [require_composed_stable_id.DeviceType.Heater, require_composed_stable_id.DeviceType.PetFountain];
55922
55906
  function timedRunLimitOf(deviceType) {
55923
55907
  return TIMED_RUN_LIMITS[deviceType] ?? null;
55924
55908
  }
@@ -56187,111 +56171,111 @@ var HeroSceneSchema = zod.z.object({
56187
56171
  level: zod.z.number().min(0).max(1).nullable()
56188
56172
  });
56189
56173
  var HERO_SCENE_BY_TYPE = {
56190
- [require_device_type.DeviceType.Camera]: "camera",
56191
- [require_device_type.DeviceType.Hub]: "gateway",
56192
- [require_device_type.DeviceType.Light]: "light",
56193
- [require_device_type.DeviceType.Siren]: "siren",
56194
- [require_device_type.DeviceType.Switch]: "plug",
56195
- [require_device_type.DeviceType.Sensor]: "sensor-sparkline",
56196
- [require_device_type.DeviceType.Thermostat]: "thermostat",
56197
- [require_device_type.DeviceType.Climate]: "ac",
56198
- [require_device_type.DeviceType.Button]: "button",
56199
- [require_device_type.DeviceType.EventEmitter]: "event-stream",
56200
- [require_device_type.DeviceType.Update]: "update",
56201
- [require_device_type.DeviceType.Generic]: "generic",
56202
- [require_device_type.DeviceType.Notifier]: "event-stream",
56203
- [require_device_type.DeviceType.Script]: "event-stream",
56204
- [require_device_type.DeviceType.Automation]: "event-stream",
56205
- [require_device_type.DeviceType.Lock]: "lock",
56206
- [require_device_type.DeviceType.Cover]: "cover",
56207
- [require_device_type.DeviceType.Valve]: "control-dial",
56208
- [require_device_type.DeviceType.Humidifier]: "control-dial",
56209
- [require_device_type.DeviceType.WaterHeater]: "heater",
56210
- [require_device_type.DeviceType.HeatPump]: "heat-pump",
56211
- [require_device_type.DeviceType.Fan]: "fan",
56212
- [require_device_type.DeviceType.MediaPlayer]: "tv",
56213
- [require_device_type.DeviceType.AlarmPanel]: "alarm",
56214
- [require_device_type.DeviceType.Control]: "control-dial",
56215
- [require_device_type.DeviceType.Presence]: "presence",
56216
- [require_device_type.DeviceType.Weather]: "weather",
56217
- [require_device_type.DeviceType.Vacuum]: "vacuum",
56218
- [require_device_type.DeviceType.LawnMower]: "lawn-mower",
56219
- [require_device_type.DeviceType.Container]: "generic",
56220
- [require_device_type.DeviceType.Image]: "camera",
56221
- [require_device_type.DeviceType.PetFeeder]: "pet-feeder",
56222
- [require_device_type.DeviceType.PetFountain]: "pet-fountain",
56223
- [require_device_type.DeviceType.Dishwasher]: "dishwasher",
56224
- [require_device_type.DeviceType.Washer]: "washer",
56225
- [require_device_type.DeviceType.Heater]: "heater",
56226
- [require_device_type.DeviceType.Dryer]: "dryer",
56227
- [require_device_type.DeviceType.Gateway]: "gateway"
56174
+ [require_composed_stable_id.DeviceType.Camera]: "camera",
56175
+ [require_composed_stable_id.DeviceType.Hub]: "gateway",
56176
+ [require_composed_stable_id.DeviceType.Light]: "light",
56177
+ [require_composed_stable_id.DeviceType.Siren]: "siren",
56178
+ [require_composed_stable_id.DeviceType.Switch]: "plug",
56179
+ [require_composed_stable_id.DeviceType.Sensor]: "sensor-sparkline",
56180
+ [require_composed_stable_id.DeviceType.Thermostat]: "thermostat",
56181
+ [require_composed_stable_id.DeviceType.Climate]: "ac",
56182
+ [require_composed_stable_id.DeviceType.Button]: "button",
56183
+ [require_composed_stable_id.DeviceType.EventEmitter]: "event-stream",
56184
+ [require_composed_stable_id.DeviceType.Update]: "update",
56185
+ [require_composed_stable_id.DeviceType.Generic]: "generic",
56186
+ [require_composed_stable_id.DeviceType.Notifier]: "event-stream",
56187
+ [require_composed_stable_id.DeviceType.Script]: "event-stream",
56188
+ [require_composed_stable_id.DeviceType.Automation]: "event-stream",
56189
+ [require_composed_stable_id.DeviceType.Lock]: "lock",
56190
+ [require_composed_stable_id.DeviceType.Cover]: "cover",
56191
+ [require_composed_stable_id.DeviceType.Valve]: "control-dial",
56192
+ [require_composed_stable_id.DeviceType.Humidifier]: "control-dial",
56193
+ [require_composed_stable_id.DeviceType.WaterHeater]: "heater",
56194
+ [require_composed_stable_id.DeviceType.HeatPump]: "heat-pump",
56195
+ [require_composed_stable_id.DeviceType.Fan]: "fan",
56196
+ [require_composed_stable_id.DeviceType.MediaPlayer]: "tv",
56197
+ [require_composed_stable_id.DeviceType.AlarmPanel]: "alarm",
56198
+ [require_composed_stable_id.DeviceType.Control]: "control-dial",
56199
+ [require_composed_stable_id.DeviceType.Presence]: "presence",
56200
+ [require_composed_stable_id.DeviceType.Weather]: "weather",
56201
+ [require_composed_stable_id.DeviceType.Vacuum]: "vacuum",
56202
+ [require_composed_stable_id.DeviceType.LawnMower]: "lawn-mower",
56203
+ [require_composed_stable_id.DeviceType.Container]: "generic",
56204
+ [require_composed_stable_id.DeviceType.Image]: "camera",
56205
+ [require_composed_stable_id.DeviceType.PetFeeder]: "pet-feeder",
56206
+ [require_composed_stable_id.DeviceType.PetFountain]: "pet-fountain",
56207
+ [require_composed_stable_id.DeviceType.Dishwasher]: "dishwasher",
56208
+ [require_composed_stable_id.DeviceType.Washer]: "washer",
56209
+ [require_composed_stable_id.DeviceType.Heater]: "heater",
56210
+ [require_composed_stable_id.DeviceType.Dryer]: "dryer",
56211
+ [require_composed_stable_id.DeviceType.Gateway]: "gateway"
56228
56212
  };
56229
56213
  /** `inherit` = the type's scene. A role only refines a type. */
56230
56214
  var HERO_SCENE_BY_ROLE = {
56231
- [require_device_type.DeviceRole.Siren]: "siren",
56232
- [require_device_type.DeviceRole.Floodlight]: "light",
56233
- [require_device_type.DeviceRole.Spotlight]: "light",
56234
- [require_device_type.DeviceRole.PirSensor]: "presence",
56235
- [require_device_type.DeviceRole.Chime]: "speaker",
56236
- [require_device_type.DeviceRole.Autotrack]: "inherit",
56237
- [require_device_type.DeviceRole.Nightvision]: "inherit",
56238
- [require_device_type.DeviceRole.PrivacyMask]: "inherit",
56239
- [require_device_type.DeviceRole.Doorbell]: "inherit",
56240
- [require_device_type.DeviceRole.CoverBlind]: "inherit",
56241
- [require_device_type.DeviceRole.CoverShutter]: "inherit",
56242
- [require_device_type.DeviceRole.CoverAwning]: "inherit",
56243
- [require_device_type.DeviceRole.CoverCurtain]: "inherit",
56244
- [require_device_type.DeviceRole.CoverGarage]: "inherit",
56245
- [require_device_type.DeviceRole.CoverGate]: "inherit",
56246
- [require_device_type.DeviceRole.CoverDoor]: "inherit",
56247
- [require_device_type.DeviceRole.CoverWindow]: "inherit",
56248
- [require_device_type.DeviceRole.BinaryHelper]: "inherit",
56249
- [require_device_type.DeviceRole.Outlet]: "plug",
56250
- [require_device_type.DeviceRole.MotionSensor]: "presence",
56251
- [require_device_type.DeviceRole.ContactSensor]: "contact",
56252
- [require_device_type.DeviceRole.LeakSensor]: "inherit",
56253
- [require_device_type.DeviceRole.SmokeSensor]: "alarm",
56254
- [require_device_type.DeviceRole.COSensor]: "alarm",
56255
- [require_device_type.DeviceRole.GasSensor]: "alarm",
56256
- [require_device_type.DeviceRole.TamperSensor]: "inherit",
56257
- [require_device_type.DeviceRole.VibrationSensor]: "inherit",
56258
- [require_device_type.DeviceRole.ConnectivitySensor]: "inherit",
56259
- [require_device_type.DeviceRole.SoundSensor]: "inherit",
56260
- [require_device_type.DeviceRole.BinarySensor]: "inherit",
56261
- [require_device_type.DeviceRole.TemperatureSensor]: "sensor-sparkline",
56262
- [require_device_type.DeviceRole.HumiditySensor]: "sensor-sparkline",
56263
- [require_device_type.DeviceRole.AmbientLightSensor]: "inherit",
56264
- [require_device_type.DeviceRole.PressureSensor]: "weather",
56265
- [require_device_type.DeviceRole.WindSensor]: "weather",
56266
- [require_device_type.DeviceRole.RainSensor]: "weather",
56267
- [require_device_type.DeviceRole.UvSensor]: "weather",
56268
- [require_device_type.DeviceRole.SolarRadiationSensor]: "weather",
56269
- [require_device_type.DeviceRole.SoilMoistureSensor]: "inherit",
56270
- [require_device_type.DeviceRole.PowerSensor]: "plug",
56271
- [require_device_type.DeviceRole.EnergySensor]: "plug",
56272
- [require_device_type.DeviceRole.VoltageSensor]: "plug",
56273
- [require_device_type.DeviceRole.CurrentSensor]: "plug",
56274
- [require_device_type.DeviceRole.AirQualitySensor]: "inherit",
56275
- [require_device_type.DeviceRole.BatterySensor]: "inherit",
56276
- [require_device_type.DeviceRole.NumericSensor]: "inherit",
56277
- [require_device_type.DeviceRole.EnumSensor]: "inherit",
56278
- [require_device_type.DeviceRole.DateTimeSensor]: "inherit",
56279
- [require_device_type.DeviceRole.GenericSensor]: "inherit",
56280
- [require_device_type.DeviceRole.NumericControl]: "control-dial",
56281
- [require_device_type.DeviceRole.SelectControl]: "control-dial",
56282
- [require_device_type.DeviceRole.TextControl]: "inherit",
56283
- [require_device_type.DeviceRole.DateTimeControl]: "inherit",
56284
- [require_device_type.DeviceRole.MobilePushNotifier]: "inherit",
56285
- [require_device_type.DeviceRole.MessagingNotifier]: "inherit",
56286
- [require_device_type.DeviceRole.EmailNotifier]: "inherit",
56287
- [require_device_type.DeviceRole.GenericNotifier]: "inherit",
56288
- [require_device_type.DeviceRole.IrTransmitter]: "inherit"
56215
+ [require_composed_stable_id.DeviceRole.Siren]: "siren",
56216
+ [require_composed_stable_id.DeviceRole.Floodlight]: "light",
56217
+ [require_composed_stable_id.DeviceRole.Spotlight]: "light",
56218
+ [require_composed_stable_id.DeviceRole.PirSensor]: "presence",
56219
+ [require_composed_stable_id.DeviceRole.Chime]: "speaker",
56220
+ [require_composed_stable_id.DeviceRole.Autotrack]: "inherit",
56221
+ [require_composed_stable_id.DeviceRole.Nightvision]: "inherit",
56222
+ [require_composed_stable_id.DeviceRole.PrivacyMask]: "inherit",
56223
+ [require_composed_stable_id.DeviceRole.Doorbell]: "inherit",
56224
+ [require_composed_stable_id.DeviceRole.CoverBlind]: "inherit",
56225
+ [require_composed_stable_id.DeviceRole.CoverShutter]: "inherit",
56226
+ [require_composed_stable_id.DeviceRole.CoverAwning]: "inherit",
56227
+ [require_composed_stable_id.DeviceRole.CoverCurtain]: "inherit",
56228
+ [require_composed_stable_id.DeviceRole.CoverGarage]: "inherit",
56229
+ [require_composed_stable_id.DeviceRole.CoverGate]: "inherit",
56230
+ [require_composed_stable_id.DeviceRole.CoverDoor]: "inherit",
56231
+ [require_composed_stable_id.DeviceRole.CoverWindow]: "inherit",
56232
+ [require_composed_stable_id.DeviceRole.BinaryHelper]: "inherit",
56233
+ [require_composed_stable_id.DeviceRole.Outlet]: "plug",
56234
+ [require_composed_stable_id.DeviceRole.MotionSensor]: "presence",
56235
+ [require_composed_stable_id.DeviceRole.ContactSensor]: "contact",
56236
+ [require_composed_stable_id.DeviceRole.LeakSensor]: "inherit",
56237
+ [require_composed_stable_id.DeviceRole.SmokeSensor]: "alarm",
56238
+ [require_composed_stable_id.DeviceRole.COSensor]: "alarm",
56239
+ [require_composed_stable_id.DeviceRole.GasSensor]: "alarm",
56240
+ [require_composed_stable_id.DeviceRole.TamperSensor]: "inherit",
56241
+ [require_composed_stable_id.DeviceRole.VibrationSensor]: "inherit",
56242
+ [require_composed_stable_id.DeviceRole.ConnectivitySensor]: "inherit",
56243
+ [require_composed_stable_id.DeviceRole.SoundSensor]: "inherit",
56244
+ [require_composed_stable_id.DeviceRole.BinarySensor]: "inherit",
56245
+ [require_composed_stable_id.DeviceRole.TemperatureSensor]: "sensor-sparkline",
56246
+ [require_composed_stable_id.DeviceRole.HumiditySensor]: "sensor-sparkline",
56247
+ [require_composed_stable_id.DeviceRole.AmbientLightSensor]: "inherit",
56248
+ [require_composed_stable_id.DeviceRole.PressureSensor]: "weather",
56249
+ [require_composed_stable_id.DeviceRole.WindSensor]: "weather",
56250
+ [require_composed_stable_id.DeviceRole.RainSensor]: "weather",
56251
+ [require_composed_stable_id.DeviceRole.UvSensor]: "weather",
56252
+ [require_composed_stable_id.DeviceRole.SolarRadiationSensor]: "weather",
56253
+ [require_composed_stable_id.DeviceRole.SoilMoistureSensor]: "inherit",
56254
+ [require_composed_stable_id.DeviceRole.PowerSensor]: "plug",
56255
+ [require_composed_stable_id.DeviceRole.EnergySensor]: "plug",
56256
+ [require_composed_stable_id.DeviceRole.VoltageSensor]: "plug",
56257
+ [require_composed_stable_id.DeviceRole.CurrentSensor]: "plug",
56258
+ [require_composed_stable_id.DeviceRole.AirQualitySensor]: "inherit",
56259
+ [require_composed_stable_id.DeviceRole.BatterySensor]: "inherit",
56260
+ [require_composed_stable_id.DeviceRole.NumericSensor]: "inherit",
56261
+ [require_composed_stable_id.DeviceRole.EnumSensor]: "inherit",
56262
+ [require_composed_stable_id.DeviceRole.DateTimeSensor]: "inherit",
56263
+ [require_composed_stable_id.DeviceRole.GenericSensor]: "inherit",
56264
+ [require_composed_stable_id.DeviceRole.NumericControl]: "control-dial",
56265
+ [require_composed_stable_id.DeviceRole.SelectControl]: "control-dial",
56266
+ [require_composed_stable_id.DeviceRole.TextControl]: "inherit",
56267
+ [require_composed_stable_id.DeviceRole.DateTimeControl]: "inherit",
56268
+ [require_composed_stable_id.DeviceRole.MobilePushNotifier]: "inherit",
56269
+ [require_composed_stable_id.DeviceRole.MessagingNotifier]: "inherit",
56270
+ [require_composed_stable_id.DeviceRole.EmailNotifier]: "inherit",
56271
+ [require_composed_stable_id.DeviceRole.GenericNotifier]: "inherit",
56272
+ [require_composed_stable_id.DeviceRole.IrTransmitter]: "inherit"
56289
56273
  };
56290
56274
  function isDeviceType$2(type) {
56291
- return Object.values(require_device_type.DeviceType).includes(type);
56275
+ return Object.values(require_composed_stable_id.DeviceType).includes(type);
56292
56276
  }
56293
56277
  function isDeviceRole$1(role) {
56294
- return Object.values(require_device_type.DeviceRole).includes(role);
56278
+ return Object.values(require_composed_stable_id.DeviceRole).includes(role);
56295
56279
  }
56296
56280
  /** The scene id of a (role, type) pair. Role beats type; a type this build does not know gets the terminal. */
56297
56281
  function resolveHeroSceneId(role, type) {
@@ -56930,7 +56914,7 @@ var humidifierCapability = {
56930
56914
  scope: "device",
56931
56915
  deviceNative: true,
56932
56916
  mode: "singleton",
56933
- deviceTypes: [require_device_type.DeviceType.Humidifier],
56917
+ deviceTypes: [require_composed_stable_id.DeviceType.Humidifier],
56934
56918
  methods: {
56935
56919
  setOn: require_sleep.method(zod.z.object({
56936
56920
  deviceId: zod.z.number().int().nonnegative(),
@@ -57006,7 +56990,7 @@ var humiditySensorCapability = {
57006
56990
  scope: "device",
57007
56991
  deviceNative: true,
57008
56992
  mode: "singleton",
57009
- deviceTypes: [require_device_type.DeviceType.Sensor, require_device_type.DeviceType.Thermostat],
56993
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor, require_composed_stable_id.DeviceType.Thermostat],
57010
56994
  methods: {},
57011
56995
  status: {
57012
56996
  schema: HumiditySensorStatusSchema,
@@ -57060,7 +57044,7 @@ var imageCapability = {
57060
57044
  scope: "device",
57061
57045
  deviceNative: true,
57062
57046
  mode: "singleton",
57063
- deviceTypes: [require_device_type.DeviceType.Image],
57047
+ deviceTypes: [require_composed_stable_id.DeviceType.Image],
57064
57048
  methods: {},
57065
57049
  status: {
57066
57050
  schema: ImageStatusSchema,
@@ -57212,7 +57196,7 @@ var imageSettingsCapability = {
57212
57196
  scope: "device",
57213
57197
  deviceNative: true,
57214
57198
  mode: "singleton",
57215
- deviceTypes: [require_device_type.DeviceType.Camera],
57199
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
57216
57200
  deviceConfig: { ui: {
57217
57201
  kind: "derived-form",
57218
57202
  builderId: "image-settings",
@@ -57783,7 +57767,7 @@ var intercomCapability = {
57783
57767
  scope: "device",
57784
57768
  deviceNative: true,
57785
57769
  mode: "singleton",
57786
- deviceTypes: [require_device_type.DeviceType.Camera],
57770
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
57787
57771
  /**
57788
57772
  * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
57789
57773
  *
@@ -57978,7 +57962,7 @@ var irTransmitterCapability = {
57978
57962
  scope: "device",
57979
57963
  deviceNative: true,
57980
57964
  mode: "singleton",
57981
- deviceTypes: [require_device_type.DeviceType.Generic],
57965
+ deviceTypes: [require_composed_stable_id.DeviceType.Generic],
57982
57966
  methods: {
57983
57967
  send: require_sleep.method(zod.z.object({
57984
57968
  deviceId: zod.z.number().int().nonnegative(),
@@ -58437,7 +58421,7 @@ var lawnMowerControlCapability = {
58437
58421
  scope: "device",
58438
58422
  deviceNative: true,
58439
58423
  mode: "singleton",
58440
- deviceTypes: [require_device_type.DeviceType.LawnMower],
58424
+ deviceTypes: [require_composed_stable_id.DeviceType.LawnMower],
58441
58425
  methods: {
58442
58426
  startMowing: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
58443
58427
  kind: "mutation",
@@ -60560,7 +60544,7 @@ var lockControlCustomize = {
60560
60544
  cap: "lock-control",
60561
60545
  stateField: "state"
60562
60546
  },
60563
- deviceTypes: [require_device_type.DeviceType.Lock],
60547
+ deviceTypes: [require_composed_stable_id.DeviceType.Lock],
60564
60548
  apply: "replace",
60565
60549
  path: "state",
60566
60550
  override: {
@@ -60579,7 +60563,7 @@ var lockControlCapability = {
60579
60563
  scope: "device",
60580
60564
  deviceNative: true,
60581
60565
  mode: "singleton",
60582
- deviceTypes: [require_device_type.DeviceType.Lock],
60566
+ deviceTypes: [require_composed_stable_id.DeviceType.Lock],
60583
60567
  methods: {
60584
60568
  lock: require_sleep.method(zod.z.object({
60585
60569
  deviceId: zod.z.number().int().nonnegative(),
@@ -61210,7 +61194,7 @@ var meterCapability = {
61210
61194
  scope: "device",
61211
61195
  deviceNative: true,
61212
61196
  mode: "singleton",
61213
- deviceTypes: [require_device_type.DeviceType.Sensor],
61197
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
61214
61198
  methods: {},
61215
61199
  status: {
61216
61200
  schema: MeterStatusSchema,
@@ -62616,7 +62600,7 @@ var motionDetectionCapability = {
62616
62600
  /** Frame-differencing motion analysis over a video stream — only a camera
62617
62601
  * produces the frames. Read by the `defaultActive` auto-bind in
62618
62602
  * `device-manager.getBindings` to decide which devices it may claim. */
62619
- deviceTypes: [require_device_type.DeviceType.Camera],
62603
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
62620
62604
  exposesDeviceSettings: true,
62621
62605
  methods: {
62622
62606
  analyze: require_sleep.method(zod.z.object({
@@ -65193,7 +65177,7 @@ var pipelineAnalyticsCapability = {
65193
65177
  mode: "singleton",
65194
65178
  kind: "wrapper",
65195
65179
  defaultActive: true,
65196
- deviceTypes: [require_device_type.DeviceType.Camera],
65180
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
65197
65181
  exposesDeviceSettings: true,
65198
65182
  methods: {
65199
65183
  getActiveTracks: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.array(TrackSchema).readonly()),
@@ -67144,7 +67128,7 @@ var zonesCapability = {
67144
67128
  name: "zones",
67145
67129
  scope: "device",
67146
67130
  mode: "singleton",
67147
- deviceTypes: [require_device_type.DeviceType.Camera],
67131
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
67148
67132
  methods: {
67149
67133
  listZones: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.array(ZoneSchema).readonly()),
67150
67134
  addZone: require_sleep.method(zod.z.object({
@@ -68976,7 +68960,7 @@ var motionCustomize = {
68976
68960
  cap: "motion",
68977
68961
  eventName: "onMotionChanged"
68978
68962
  },
68979
- deviceTypes: [require_device_type.DeviceType.Camera],
68963
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
68980
68964
  apply: "add",
68981
68965
  applyAuthority: {
68982
68966
  kind: "camera-sensors",
@@ -69107,7 +69091,7 @@ var motionCapability = {
69107
69091
  * `snapshot` and every other per-device native cap.
69108
69092
  */
69109
69093
  deviceNative: true,
69110
- deviceTypes: [require_device_type.DeviceType.Camera, require_device_type.DeviceType.Sensor],
69094
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera, require_composed_stable_id.DeviceType.Sensor],
69111
69095
  methods: {
69112
69096
  /**
69113
69097
  * Pull the current motion state synchronously. Convenience shortcut
@@ -69166,7 +69150,7 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
69166
69150
  */
69167
69151
  history: { fields: { detected: {
69168
69152
  kind: "boolean",
69169
- excludeDeviceTypes: [require_device_type.DeviceType.Camera]
69153
+ excludeDeviceTypes: [require_composed_stable_id.DeviceType.Camera]
69170
69154
  } } },
69171
69155
  customize: motionCustomize
69172
69156
  };
@@ -69215,9 +69199,9 @@ var motionTriggerCapability = {
69215
69199
  deviceNative: true,
69216
69200
  mode: "singleton",
69217
69201
  deviceTypes: [
69218
- require_device_type.DeviceType.Light,
69219
- require_device_type.DeviceType.Siren,
69220
- require_device_type.DeviceType.Switch
69202
+ require_composed_stable_id.DeviceType.Light,
69203
+ require_composed_stable_id.DeviceType.Siren,
69204
+ require_composed_stable_id.DeviceType.Switch
69221
69205
  ],
69222
69206
  methods: { setMotionTrigger: require_sleep.method(zod.z.object({
69223
69207
  deviceId: zod.z.number().int().nonnegative(),
@@ -69294,7 +69278,7 @@ var motionZonesCapability = {
69294
69278
  scope: "device",
69295
69279
  deviceNative: true,
69296
69280
  mode: "singleton",
69297
- deviceTypes: [require_device_type.DeviceType.Camera],
69281
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
69298
69282
  deviceConfig: { ui: {
69299
69283
  kind: "widget",
69300
69284
  widgetId: "host/motion-zones-grid",
@@ -69554,7 +69538,7 @@ var nativeObjectDetectionCapability = {
69554
69538
  scope: "device",
69555
69539
  deviceNative: true,
69556
69540
  mode: "singleton",
69557
- deviceTypes: [require_device_type.DeviceType.Camera],
69541
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
69558
69542
  methods: {
69559
69543
  getOptions: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), NativeObjectDetectionOptionsSchema),
69560
69544
  setSettings: require_sleep.method(zod.z.object({
@@ -69927,7 +69911,7 @@ var navigationCapability = {
69927
69911
  scope: "device",
69928
69912
  deviceNative: true,
69929
69913
  mode: "singleton",
69930
- deviceTypes: [require_device_type.DeviceType.Camera],
69914
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
69931
69915
  deviceConfig: { ui: {
69932
69916
  kind: "widget",
69933
69917
  widgetId: "host/navigation-panel",
@@ -70171,13 +70155,13 @@ var networkLinkCapability = {
70171
70155
  deviceNative: true,
70172
70156
  mode: "singleton",
70173
70157
  deviceTypes: [
70174
- require_device_type.DeviceType.Camera,
70175
- require_device_type.DeviceType.Sensor,
70176
- require_device_type.DeviceType.Button,
70177
- require_device_type.DeviceType.Switch,
70178
- require_device_type.DeviceType.Light,
70179
- require_device_type.DeviceType.Lock,
70180
- require_device_type.DeviceType.Siren
70158
+ require_composed_stable_id.DeviceType.Camera,
70159
+ require_composed_stable_id.DeviceType.Sensor,
70160
+ require_composed_stable_id.DeviceType.Button,
70161
+ require_composed_stable_id.DeviceType.Switch,
70162
+ require_composed_stable_id.DeviceType.Light,
70163
+ require_composed_stable_id.DeviceType.Lock,
70164
+ require_composed_stable_id.DeviceType.Siren
70181
70165
  ],
70182
70166
  methods: {},
70183
70167
  events: {
@@ -71789,101 +71773,21 @@ var NcZoneConditionSchema = zod.z.object({
71789
71773
  * membership lists are OR within the list (spec §2.3).
71790
71774
  */
71791
71775
  /**
71792
- * What a rule may actuate.
71793
- *
71794
- * **No hand-maintained allowlist** (operator decision, and the right one — a
71795
- * written list of methods is a third parallel map to keep aligned, and this
71796
- * repo has paid for those). The boundary instead comes from a property the
71797
- * capabilities already carry: an action may target only a **device-scoped**
71798
- * capability method.
71799
- *
71800
- * That is not decoration. A rule can be authored by a NON-ADMIN — personal
71801
- * rules are a supported flow — and the executor runs with the addon's
71802
- * privileges, so an unbounded action is an arbitrary RPC channel with a
71803
- * privilege escalation attached. Restricting to device scope excludes the
71804
- * system caps (`device-manager.removeDevice` and friends) by construction,
71805
- * costs nothing to maintain, and cannot rot: a cap that stops being
71806
- * device-scoped stops being actuatable in the same change.
71807
- *
71808
- * The executor enforces it; {@link NcRuleActionSchema} carries the intent.
71809
- */
71810
- /**
71811
- * One step of a sequence.
71812
- *
71813
- * `wait` is a first-class step rather than a property of the next action: it is
71814
- * what makes a sequence a SEQUENCE and not a list — "unlock, wait 5s, open"
71815
- * cannot be expressed otherwise.
71816
- */
71817
- var NcRuleActionSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
71818
- kind: zod.z.literal("wait"),
71819
- seconds: zod.z.number().min(0).max(300)
71820
- }), zod.z.object({
71821
- kind: zod.z.literal("cap"),
71822
- /**
71823
- * WHO the step acts on (D983) — the only shape that is written. A sequence
71824
- * stored before D983 carries `deviceId`; the sequence store reads it as a
71825
- * `devices` target.
71826
- */
71827
- target: ActionTargetSchema.optional(),
71828
- /** The vocabulary action the step performs; required for a `domain` target. */
71829
- actionId: zod.z.string().min(1).optional(),
71830
- /** @deprecated The pre-D983 single device. Read, never written. */
71831
- deviceId: zod.z.number().int().optional(),
71832
- /** Capability name, e.g. `alarm-panel`. */
71833
- cap: zod.z.string().min(1),
71834
- /** Method on it. The executor refuses a non-device-scoped cap. */
71835
- method: zod.z.string().min(1),
71836
- /** Method arguments, minus `deviceId` (the executor injects it). */
71837
- args: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
71838
- }).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
71839
- message: "a cap step needs a target",
71840
- path: ["target"]
71841
- }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
71842
- message: "a domain target needs the vocabulary action it applies to (actionId)",
71843
- path: ["actionId"]
71844
- })]);
71845
- /**
71846
- * A named, ordered run of steps shared across rules, with its own throttle.
71847
- *
71848
- * Sequences live in the notification centre's sequence store — never inline on
71849
- * a rule. A rule binds to one by id ({@link NcActionBindingSchema}), and a
71850
- * button names one the same way. `minDelaySec` exists because a noisy rule
71851
- * otherwise hammers a physical actuator — the rule's own cooldown governs
71852
- * NOTIFICATIONS, which is a different budget from "how often may this gate
71853
- * actually open". The throttle key is the sequence id, so two rules sharing
71854
- * one sequence share its budget.
71855
- */
71856
- var NcSharedSequenceSchema = zod.z.object({
71857
- id: zod.z.string().min(1),
71858
- name: zod.z.string().min(1).max(120),
71859
- minDelaySec: zod.z.number().int().min(0).max(86400).optional(),
71860
- actions: zod.z.array(NcRuleActionSchema).min(1)
71861
- });
71862
- /** Create / update body — the id is minted by the provider. */
71863
- var NcSharedSequenceInputSchema = zod.z.object({
71864
- name: zod.z.string().min(1).max(120),
71865
- minDelaySec: zod.z.number().int().min(0).max(86400).optional(),
71866
- actions: zod.z.array(NcRuleActionSchema).min(1)
71867
- });
71868
- /**
71869
- * What one hook slot may run: a shared sequence, or a single step authored
71870
- * inline ("Do").
71776
+ * What a rule or a button runs: an **Action** of the `actions` surface
71777
+ * (`internal:<uuid>` or an addon's), by id, and nothing else (planning#473).
71871
71778
  *
71872
- * A button may ONLY name a sequence — a one-shot Do on a public callback would
71873
- * be a parallel actuation vocabulary with no throttle and no shared authoring
71874
- * surface.
71779
+ * The notification centre has no step vocabulary of its own. The steps, the
71780
+ * device-scope boundary, the stop-at-first-failure, the throttle
71781
+ * (`minDelaySec`), the variables and the runs ledger all belong to the Action;
71782
+ * an operator edits them in ONE place (the Actions page) and a rule points at
71783
+ * the result. A rule can be authored by a non-admin (personal rules), which is
71784
+ * safe for the same reason: it can only name an Action an admin already wrote.
71875
71785
  */
71876
- var NcActionBindingSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
71877
- kind: zod.z.literal("sequence"),
71878
- sequenceId: zod.z.string().min(1)
71879
- }), zod.z.object({
71880
- kind: zod.z.literal("do"),
71881
- action: NcRuleActionSchema
71882
- })]);
71883
- /** Bindings on one hook edge. Cap keeps a slot from becoming a second sequence editor. */
71884
- var NcHookBindingsSchema = zod.z.array(NcActionBindingSchema).max(4);
71786
+ var NcActionIdSchema = zod.z.string().min(1);
71787
+ /** Action ids one hook edge runs, in order. Capped so a slot never becomes a second editor. */
71788
+ var NcHookActionIdsSchema = zod.z.array(NcActionIdSchema).max(4);
71885
71789
  /**
71886
- * One button carried by the notification, running a shared sequence on tap.
71790
+ * One button carried by the notification, running an Action on tap.
71887
71791
  *
71888
71792
  * **Read this before adding a button that does something physical.** The tap
71889
71793
  * arrives over a link that travelled through third-party infrastructure — ntfy,
@@ -71898,9 +71802,9 @@ var NcRuleNotificationButtonSchema = zod.z.object({
71898
71802
  /** Stable id — travels in the callback and identifies the button in logs. */
71899
71803
  id: zod.z.string().min(1).max(64),
71900
71804
  label: zod.z.string().min(1).max(40),
71901
- /** Id of a shared sequence. The dispatcher drops a button whose sequence
71902
- * does not exist rather than minting a token for nothing. */
71903
- sequenceId: zod.z.string().min(1),
71805
+ /** The Action the tap runs. The dispatcher drops a button whose Action does
71806
+ * not exist rather than minting a token for nothing. */
71807
+ actionId: NcActionIdSchema,
71904
71808
  icon: NotificationActionIconSchema.optional(),
71905
71809
  destructive: zod.z.boolean().optional()
71906
71810
  });
@@ -71915,33 +71819,20 @@ var NcRuleNotificationButtonSchema = zod.z.object({
71915
71819
  * leave). A delivery with no clear edge never produces this hook.
71916
71820
  */
71917
71821
  var NcRuleActionsSchema = zod.z.object({
71918
- onActivation: NcHookBindingsSchema.optional(),
71919
- onDeactivation: NcHookBindingsSchema.optional(),
71822
+ onActivation: NcHookActionIdsSchema.optional(),
71823
+ onDeactivation: NcHookActionIdsSchema.optional(),
71920
71824
  /** Runs on a positive / raised match. */
71921
- onTrigger: NcHookBindingsSchema.optional(),
71825
+ onTrigger: NcHookActionIdsSchema.optional(),
71922
71826
  /** Runs on a clear / leave match, when the subject carries one. */
71923
- onTriggerOff: NcHookBindingsSchema.optional(),
71827
+ onTriggerOff: NcHookActionIdsSchema.optional(),
71924
71828
  /**
71925
- * Buttons the NOTIFICATION carries, each running one shared sequence when
71926
- * tapped. Deliberately a REFERENCE — a button that could define its own
71927
- * actions would be a parallel actuation vocabulary.
71829
+ * Buttons the NOTIFICATION carries, each running one Action when tapped.
71830
+ * Deliberately a REFERENCE — a button that could define its own steps would
71831
+ * be a parallel actuation vocabulary.
71928
71832
  */
71929
71833
  buttons: zod.z.array(NcRuleNotificationButtonSchema).max(8).optional()
71930
71834
  });
71931
71835
  /**
71932
- * @deprecated Legacy inline sequence shape (pre shared-sequence store). Kept
71933
- * only so boot migration / tests can recognise and rewrite persisted rows.
71934
- * New code must use {@link NcSharedSequence} + {@link NcActionBinding}.
71935
- */
71936
- var NcLegacyRuleActionSequenceSchema = zod.z.object({
71937
- name: zod.z.string().min(1).max(120),
71938
- enabled: zod.z.boolean(),
71939
- minDelaySec: zod.z.number().int().min(0).max(86400).optional(),
71940
- actions: zod.z.array(NcRuleActionSchema).min(1)
71941
- });
71942
- /** @deprecated Alias kept for call sites mid-migration; prefer {@link NcSharedSequence}. */
71943
- var NcRuleActionSequenceSchema = NcLegacyRuleActionSequenceSchema;
71944
- /**
71945
71836
  * "This rule applies only while `deviceId` is in one of `states`."
71946
71837
  *
71947
71838
  * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
@@ -74347,28 +74238,6 @@ var notificationRulesCapability = {
74347
74238
  auth: "admin"
74348
74239
  }),
74349
74240
  /**
74350
- * Shared action sequences — named step lists rules and buttons bind to by
74351
- * id. One store for the whole notification centre so two rules sharing a
74352
- * gate share its throttle too.
74353
- */
74354
- listSequences: require_sleep.method(zod.z.object({}), zod.z.object({ sequences: zod.z.array(NcSharedSequenceSchema) }), { auth: "admin" }),
74355
- getSequence: require_sleep.method(zod.z.object({ sequenceId: zod.z.string().min(1) }), zod.z.object({ sequence: NcSharedSequenceSchema.nullable() }), { auth: "admin" }),
74356
- createSequence: require_sleep.method(zod.z.object({ sequence: NcSharedSequenceInputSchema }), zod.z.object({ sequence: NcSharedSequenceSchema }), {
74357
- kind: "mutation",
74358
- auth: "admin"
74359
- }),
74360
- updateSequence: require_sleep.method(zod.z.object({
74361
- sequenceId: zod.z.string().min(1),
74362
- sequence: NcSharedSequenceInputSchema
74363
- }), zod.z.object({ sequence: NcSharedSequenceSchema }), {
74364
- kind: "mutation",
74365
- auth: "admin"
74366
- }),
74367
- deleteSequence: require_sleep.method(zod.z.object({ sequenceId: zod.z.string().min(1) }), zod.z.object({ success: zod.z.literal(true) }), {
74368
- kind: "mutation",
74369
- auth: "admin"
74370
- }),
74371
- /**
74372
74241
  * WHAT THE RULES ACTUALLY ASK the stream broker to retain, per camera.
74373
74242
  *
74374
74243
  * The notification centre owns the rules, so it is the only thing that can
@@ -74694,7 +74563,7 @@ var notifierCapability = {
74694
74563
  scope: "device",
74695
74564
  deviceNative: true,
74696
74565
  mode: "singleton",
74697
- deviceTypes: [require_device_type.DeviceType.Notifier],
74566
+ deviceTypes: [require_composed_stable_id.DeviceType.Notifier],
74698
74567
  methods: {
74699
74568
  send: require_sleep.method(NotifierSendInputSchema, NotifierSendResultSchema, {
74700
74569
  kind: "mutation",
@@ -74771,7 +74640,7 @@ var numericSensorCapability = {
74771
74640
  scope: "device",
74772
74641
  deviceNative: true,
74773
74642
  mode: "singleton",
74774
- deviceTypes: [require_device_type.DeviceType.Sensor],
74643
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
74775
74644
  methods: {},
74776
74645
  status: {
74777
74646
  schema: NumericSensorStatusSchema,
@@ -75004,7 +74873,7 @@ var osdCapability = {
75004
74873
  scope: "device",
75005
74874
  deviceNative: true,
75006
74875
  mode: "singleton",
75007
- deviceTypes: [require_device_type.DeviceType.Camera],
74876
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
75008
74877
  methods: {
75009
74878
  /**
75010
74879
  * Patch a single overlay by id. Provider handles read-modify-write
@@ -75478,7 +75347,7 @@ var petFeederCapability = {
75478
75347
  scope: "device",
75479
75348
  deviceNative: true,
75480
75349
  mode: "singleton",
75481
- deviceTypes: [require_device_type.DeviceType.PetFeeder],
75350
+ deviceTypes: [require_composed_stable_id.DeviceType.PetFeeder],
75482
75351
  methods: {
75483
75352
  /**
75484
75353
  * Dispense food now. Single-hopper feeders take `grams`; dual-hopper
@@ -75662,7 +75531,7 @@ var petFountainCapability = {
75662
75531
  scope: "device",
75663
75532
  deviceNative: true,
75664
75533
  mode: "singleton",
75665
- deviceTypes: [require_device_type.DeviceType.PetFountain],
75534
+ deviceTypes: [require_composed_stable_id.DeviceType.PetFountain],
75666
75535
  methods: {
75667
75536
  /** Start or stop the pump. */
75668
75537
  setPump: require_sleep.method(zod.z.object({
@@ -78572,25 +78441,25 @@ var PowerMeterStatusSchema = zod.z.object({
78572
78441
  * camera and the like are left out: their draw is not what anyone meters.
78573
78442
  */
78574
78443
  var POWER_METER_DEVICE_TYPES = [
78575
- require_device_type.DeviceType.Sensor,
78576
- require_device_type.DeviceType.Switch,
78577
- require_device_type.DeviceType.Light,
78578
- require_device_type.DeviceType.Fan,
78579
- require_device_type.DeviceType.Climate,
78580
- require_device_type.DeviceType.Thermostat,
78581
- require_device_type.DeviceType.Humidifier,
78582
- require_device_type.DeviceType.WaterHeater,
78583
- require_device_type.DeviceType.MediaPlayer,
78584
- require_device_type.DeviceType.Washer,
78585
- require_device_type.DeviceType.Dryer,
78586
- require_device_type.DeviceType.Dishwasher,
78587
- require_device_type.DeviceType.Vacuum,
78588
- require_device_type.DeviceType.LawnMower,
78589
- require_device_type.DeviceType.PetFeeder,
78590
- require_device_type.DeviceType.Heater
78444
+ require_composed_stable_id.DeviceType.Sensor,
78445
+ require_composed_stable_id.DeviceType.Switch,
78446
+ require_composed_stable_id.DeviceType.Light,
78447
+ require_composed_stable_id.DeviceType.Fan,
78448
+ require_composed_stable_id.DeviceType.Climate,
78449
+ require_composed_stable_id.DeviceType.Thermostat,
78450
+ require_composed_stable_id.DeviceType.Humidifier,
78451
+ require_composed_stable_id.DeviceType.WaterHeater,
78452
+ require_composed_stable_id.DeviceType.MediaPlayer,
78453
+ require_composed_stable_id.DeviceType.Washer,
78454
+ require_composed_stable_id.DeviceType.Dryer,
78455
+ require_composed_stable_id.DeviceType.Dishwasher,
78456
+ require_composed_stable_id.DeviceType.Vacuum,
78457
+ require_composed_stable_id.DeviceType.LawnMower,
78458
+ require_composed_stable_id.DeviceType.PetFeeder,
78459
+ require_composed_stable_id.DeviceType.Heater
78591
78460
  ];
78592
78461
  /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
78593
- var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== require_device_type.DeviceType.Sensor);
78462
+ var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== require_composed_stable_id.DeviceType.Sensor);
78594
78463
  /** One scalar target per reading; each is sourced from a device of its own (D951). */
78595
78464
  function powerTarget(id, unit) {
78596
78465
  return {
@@ -78762,21 +78631,21 @@ var PowerSourceStateSchema = zod.z.object({
78762
78631
  lastFetchedAt: zod.z.number()
78763
78632
  });
78764
78633
  var POWER_SOURCE_DEVICE_TYPES = [
78765
- require_device_type.DeviceType.Gateway,
78766
- require_device_type.DeviceType.Hub,
78767
- require_device_type.DeviceType.Camera,
78768
- require_device_type.DeviceType.Sensor,
78769
- require_device_type.DeviceType.MediaPlayer,
78770
- require_device_type.DeviceType.Vacuum,
78771
- require_device_type.DeviceType.Generic,
78772
- require_device_type.DeviceType.Washer,
78773
- require_device_type.DeviceType.Dryer,
78774
- require_device_type.DeviceType.Dishwasher,
78775
- require_device_type.DeviceType.PetFountain,
78776
- require_device_type.DeviceType.Fan,
78777
- require_device_type.DeviceType.Humidifier,
78778
- require_device_type.DeviceType.Climate,
78779
- require_device_type.DeviceType.WaterHeater
78634
+ require_composed_stable_id.DeviceType.Gateway,
78635
+ require_composed_stable_id.DeviceType.Hub,
78636
+ require_composed_stable_id.DeviceType.Camera,
78637
+ require_composed_stable_id.DeviceType.Sensor,
78638
+ require_composed_stable_id.DeviceType.MediaPlayer,
78639
+ require_composed_stable_id.DeviceType.Vacuum,
78640
+ require_composed_stable_id.DeviceType.Generic,
78641
+ require_composed_stable_id.DeviceType.Washer,
78642
+ require_composed_stable_id.DeviceType.Dryer,
78643
+ require_composed_stable_id.DeviceType.Dishwasher,
78644
+ require_composed_stable_id.DeviceType.PetFountain,
78645
+ require_composed_stable_id.DeviceType.Fan,
78646
+ require_composed_stable_id.DeviceType.Humidifier,
78647
+ require_composed_stable_id.DeviceType.Climate,
78648
+ require_composed_stable_id.DeviceType.WaterHeater
78780
78649
  ];
78781
78650
  var powerSourceCustomize = {
78782
78651
  version: 1,
@@ -78883,7 +78752,7 @@ var presenceCapability = {
78883
78752
  scope: "device",
78884
78753
  deviceNative: true,
78885
78754
  mode: "singleton",
78886
- deviceTypes: [require_device_type.DeviceType.Presence],
78755
+ deviceTypes: [require_composed_stable_id.DeviceType.Presence],
78887
78756
  methods: {},
78888
78757
  status: {
78889
78758
  schema: PresenceStatusSchema,
@@ -78929,7 +78798,7 @@ var pressureSensorCapability = {
78929
78798
  scope: "device",
78930
78799
  deviceNative: true,
78931
78800
  mode: "singleton",
78932
- deviceTypes: [require_device_type.DeviceType.Sensor],
78801
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
78933
78802
  methods: {},
78934
78803
  status: {
78935
78804
  schema: PressureSensorStatusSchema,
@@ -79062,7 +78931,7 @@ var privacyMaskCapability = {
79062
78931
  scope: "device",
79063
78932
  deviceNative: true,
79064
78933
  mode: "singleton",
79065
- deviceTypes: [require_device_type.DeviceType.Camera],
78934
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
79066
78935
  deviceConfig: { ui: {
79067
78936
  kind: "widget",
79068
78937
  widgetId: "host/privacy-mask-grid",
@@ -79330,7 +79199,7 @@ var ptzCapability = {
79330
79199
  scope: "device",
79331
79200
  deviceNative: true,
79332
79201
  mode: "singleton",
79333
- deviceTypes: [require_device_type.DeviceType.Camera],
79202
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
79334
79203
  deviceConfig: { ui: {
79335
79204
  kind: "widget",
79336
79205
  widgetId: "host/ptz-panel",
@@ -79561,7 +79430,7 @@ var ptzAutotrackCapability = {
79561
79430
  */
79562
79431
  kind: "wrapper",
79563
79432
  defaultActive: false,
79564
- deviceTypes: [require_device_type.DeviceType.Camera],
79433
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
79565
79434
  deviceConfig: { ui: {
79566
79435
  kind: "widget",
79567
79436
  widgetId: "host/ptz-autotrack",
@@ -79669,7 +79538,7 @@ var pumpCycleCapability = {
79669
79538
  scope: "device",
79670
79539
  deviceNative: true,
79671
79540
  mode: "singleton",
79672
- deviceTypes: [require_device_type.DeviceType.PetFountain],
79541
+ deviceTypes: [require_composed_stable_id.DeviceType.PetFountain],
79673
79542
  methods: {
79674
79543
  /** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
79675
79544
  setEnabled: require_sleep.method(zod.z.object({
@@ -79734,10 +79603,10 @@ var rebootCapability = {
79734
79603
  deviceNative: true,
79735
79604
  mode: "singleton",
79736
79605
  deviceTypes: [
79737
- require_device_type.DeviceType.Camera,
79738
- require_device_type.DeviceType.Sensor,
79739
- require_device_type.DeviceType.Switch,
79740
- require_device_type.DeviceType.Gateway
79606
+ require_composed_stable_id.DeviceType.Camera,
79607
+ require_composed_stable_id.DeviceType.Sensor,
79608
+ require_composed_stable_id.DeviceType.Switch,
79609
+ require_composed_stable_id.DeviceType.Gateway
79741
79610
  ],
79742
79611
  methods: { reboot: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.object({ success: zod.z.literal(true) }), {
79743
79612
  kind: "mutation",
@@ -80085,7 +79954,7 @@ var recordingCapability = {
80085
79954
  /** Recorded coverage is a property of a camera — the cap is meaningless on a
80086
79955
  * sensor, a button or an event emitter, and the `defaultActive` auto-bind
80087
79956
  * reads this to decide which devices it may claim. */
80088
- deviceTypes: [require_device_type.DeviceType.Camera],
79957
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
80089
79958
  methods: {
80090
79959
  /**
80091
79960
  * The sources this camera has, WITH the reason any of them cannot answer.
@@ -81682,7 +81551,7 @@ var videoclipsCapability = {
81682
81551
  /** A clip is a window over a camera's footage — the cap is meaningless on a
81683
81552
  * sensor, a button or an event emitter, and the `defaultActive` auto-bind
81684
81553
  * reads this to decide which devices it may claim. */
81685
- deviceTypes: [require_device_type.DeviceType.Camera],
81554
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
81686
81555
  /**
81687
81556
  * The Clips section of a camera's device details is FRAMEWORK-DERIVED (D14):
81688
81557
  * the aggregator turns this declaration into the `type:'widget'` section and
@@ -82917,7 +82786,7 @@ var recordingOnboardCapability = {
82917
82786
  scope: "device",
82918
82787
  deviceNative: true,
82919
82788
  mode: "singleton",
82920
- deviceTypes: [require_device_type.DeviceType.Camera],
82789
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
82921
82790
  deviceConfig: { ui: {
82922
82791
  kind: "derived-form",
82923
82792
  builderId: "recording-onboard",
@@ -83003,7 +82872,7 @@ var recordingSignalCapability = {
83003
82872
  scope: "device",
83004
82873
  deviceNative: true,
83005
82874
  mode: "singleton",
83006
- deviceTypes: [require_device_type.DeviceType.Camera],
82875
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
83007
82876
  methods: {
83008
82877
  /** The current level, straight from the slice the provider keeps fresh. */
83009
82878
  getStatus: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), RecordingSignalStatusSchema) },
@@ -83561,7 +83430,7 @@ var remoteCustomize = {
83561
83430
  id: "remote",
83562
83431
  cardinality: "config",
83563
83432
  vocabulary: { cap: "remote" },
83564
- deviceTypes: [require_device_type.DeviceType.MediaPlayer],
83433
+ deviceTypes: [require_composed_stable_id.DeviceType.MediaPlayer],
83565
83434
  apply: "add",
83566
83435
  readMethod: "getConfig",
83567
83436
  writeMethod: "setConfig"
@@ -83751,7 +83620,7 @@ var RUNNING_POWER_GLOBAL_DEFAULTS = {
83751
83620
  * moment it is on and stops drawing the moment it is off, so it needs neither
83752
83621
  * a long dwell nor a second sample. A type absent here keeps the global values.
83753
83622
  */
83754
- var RUNNING_POWER_DEFAULTS_BY_TYPE = { [require_device_type.DeviceType.MediaPlayer]: {
83623
+ var RUNNING_POWER_DEFAULTS_BY_TYPE = { [require_composed_stable_id.DeviceType.MediaPlayer]: {
83755
83624
  startDwellMs: 1e4,
83756
83625
  stopDwellMs: 1e4,
83757
83626
  minSamples: 1
@@ -83791,7 +83660,7 @@ var RunningFlipEventDataSchema = zod.z.object({
83791
83660
  since: zod.z.number().nullable(),
83792
83661
  phase: zod.z.string().nullable()
83793
83662
  });
83794
- var RUNNING_DEVICE_TYPES = Object.values(require_device_type.DeviceType);
83663
+ var RUNNING_DEVICE_TYPES = Object.values(require_composed_stable_id.DeviceType);
83795
83664
  /**
83796
83665
  * Customize offers "running" only where a job makes sense (D933): a cycle,
83797
83666
  * a clean, a mow, playback, or another appliance that is on and working.
@@ -83799,19 +83668,19 @@ var RUNNING_DEVICE_TYPES = Object.values(require_device_type.DeviceType);
83799
83668
  * natively; it just has no card.
83800
83669
  */
83801
83670
  var RUNNING_CUSTOMIZE_DEVICE_TYPES = [
83802
- require_device_type.DeviceType.Washer,
83803
- require_device_type.DeviceType.Dryer,
83804
- require_device_type.DeviceType.Dishwasher,
83805
- require_device_type.DeviceType.Vacuum,
83806
- require_device_type.DeviceType.LawnMower,
83807
- require_device_type.DeviceType.MediaPlayer,
83808
- require_device_type.DeviceType.WaterHeater,
83809
- require_device_type.DeviceType.Humidifier,
83810
- require_device_type.DeviceType.Fan,
83811
- require_device_type.DeviceType.Climate,
83812
- require_device_type.DeviceType.Thermostat,
83813
- require_device_type.DeviceType.PetFeeder,
83814
- require_device_type.DeviceType.Heater
83671
+ require_composed_stable_id.DeviceType.Washer,
83672
+ require_composed_stable_id.DeviceType.Dryer,
83673
+ require_composed_stable_id.DeviceType.Dishwasher,
83674
+ require_composed_stable_id.DeviceType.Vacuum,
83675
+ require_composed_stable_id.DeviceType.LawnMower,
83676
+ require_composed_stable_id.DeviceType.MediaPlayer,
83677
+ require_composed_stable_id.DeviceType.WaterHeater,
83678
+ require_composed_stable_id.DeviceType.Humidifier,
83679
+ require_composed_stable_id.DeviceType.Fan,
83680
+ require_composed_stable_id.DeviceType.Climate,
83681
+ require_composed_stable_id.DeviceType.Thermostat,
83682
+ require_composed_stable_id.DeviceType.PetFeeder,
83683
+ require_composed_stable_id.DeviceType.Heater
83815
83684
  ];
83816
83685
  var runningStateCapability = {
83817
83686
  name: "running-state",
@@ -84178,7 +84047,7 @@ var sceneMonitorCapability = {
84178
84047
  mode: "singleton",
84179
84048
  kind: "wrapper",
84180
84049
  defaultActive: true,
84181
- deviceTypes: [require_device_type.DeviceType.Camera],
84050
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
84182
84051
  methods: {
84183
84052
  listScenes: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), SceneMonitorStatusSchema),
84184
84053
  /**
@@ -84413,7 +84282,7 @@ var scriptRunnerCapability = {
84413
84282
  scope: "device",
84414
84283
  deviceNative: true,
84415
84284
  mode: "singleton",
84416
- deviceTypes: [require_device_type.DeviceType.Script],
84285
+ deviceTypes: [require_composed_stable_id.DeviceType.Script],
84417
84286
  methods: {
84418
84287
  run: require_sleep.method(zod.z.object({
84419
84288
  deviceId: zod.z.number().int().nonnegative(),
@@ -85010,7 +84879,7 @@ var smokeCapability = {
85010
84879
  scope: "device",
85011
84880
  deviceNative: true,
85012
84881
  mode: "singleton",
85013
- deviceTypes: [require_device_type.DeviceType.Sensor],
84882
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
85014
84883
  methods: {},
85015
84884
  status: {
85016
84885
  schema: SmokeStatusSchema,
@@ -85164,7 +85033,7 @@ var snapshotCapability = {
85164
85033
  mode: "singleton",
85165
85034
  kind: "wrapper",
85166
85035
  defaultActive: true,
85167
- deviceTypes: [require_device_type.DeviceType.Camera],
85036
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
85168
85037
  exposesDeviceSettings: true,
85169
85038
  methods: {
85170
85039
  getSnapshot: require_sleep.method(zod.z.object({
@@ -86186,7 +86055,7 @@ var streamCatalogCapability = {
86186
86055
  scope: "device",
86187
86056
  deviceNative: true,
86188
86057
  mode: "singleton",
86189
- deviceTypes: [require_device_type.DeviceType.Camera],
86058
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
86190
86059
  methods: { getCatalog: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.array(CamStreamDescriptorSchema).readonly()) },
86191
86060
  runtimeState: StreamCatalogStateSchema,
86192
86061
  /**
@@ -86308,7 +86177,7 @@ var streamParamsCapability = {
86308
86177
  scope: "device",
86309
86178
  deviceNative: true,
86310
86179
  mode: "singleton",
86311
- deviceTypes: [require_device_type.DeviceType.Camera],
86180
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
86312
86181
  deviceConfig: { ui: {
86313
86182
  kind: "derived-form",
86314
86183
  builderId: "stream-params",
@@ -86443,7 +86312,7 @@ var streamSignalsCapability = {
86443
86312
  scope: "device",
86444
86313
  deviceNative: true,
86445
86314
  mode: "singleton",
86446
- deviceTypes: Object.values(require_device_type.DeviceType),
86315
+ deviceTypes: Object.values(require_composed_stable_id.DeviceType),
86447
86316
  runtimeState: StreamSignalsStatusSchema,
86448
86317
  /**
86449
86318
  * Runtime-state durability: **session** — mirrored in RAM, never written.
@@ -86496,11 +86365,11 @@ var switchCapability = {
86496
86365
  deviceNative: true,
86497
86366
  mode: "singleton",
86498
86367
  deviceTypes: [
86499
- require_device_type.DeviceType.Switch,
86500
- require_device_type.DeviceType.Siren,
86501
- require_device_type.DeviceType.Light,
86502
- require_device_type.DeviceType.Fan,
86503
- require_device_type.DeviceType.Heater
86368
+ require_composed_stable_id.DeviceType.Switch,
86369
+ require_composed_stable_id.DeviceType.Siren,
86370
+ require_composed_stable_id.DeviceType.Light,
86371
+ require_composed_stable_id.DeviceType.Fan,
86372
+ require_composed_stable_id.DeviceType.Heater
86504
86373
  ],
86505
86374
  methods: { setState: require_sleep.method(zod.z.object({
86506
86375
  deviceId: zod.z.number(),
@@ -87314,7 +87183,7 @@ var tamperCapability = {
87314
87183
  scope: "device",
87315
87184
  deviceNative: true,
87316
87185
  mode: "singleton",
87317
- deviceTypes: [require_device_type.DeviceType.Sensor],
87186
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
87318
87187
  methods: {},
87319
87188
  status: {
87320
87189
  schema: TamperStatusSchema,
@@ -87364,7 +87233,7 @@ var temperatureSensorCapability = {
87364
87233
  scope: "device",
87365
87234
  deviceNative: true,
87366
87235
  mode: "singleton",
87367
- deviceTypes: [require_device_type.DeviceType.Sensor, require_device_type.DeviceType.Thermostat],
87236
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor, require_composed_stable_id.DeviceType.Thermostat],
87368
87237
  methods: {},
87369
87238
  status: {
87370
87239
  schema: TemperatureSensorStatusSchema,
@@ -88382,7 +88251,7 @@ var updateCapability = {
88382
88251
  scope: "device",
88383
88252
  deviceNative: true,
88384
88253
  mode: "singleton",
88385
- deviceTypes: [require_device_type.DeviceType.Update],
88254
+ deviceTypes: [require_composed_stable_id.DeviceType.Update],
88386
88255
  methods: { installUpdate: require_sleep.method(zod.z.void(), zod.z.void(), {
88387
88256
  kind: "mutation",
88388
88257
  auth: "admin"
@@ -88849,7 +88718,7 @@ var vacuumControlCapability = {
88849
88718
  scope: "device",
88850
88719
  deviceNative: true,
88851
88720
  mode: "singleton",
88852
- deviceTypes: [require_device_type.DeviceType.Vacuum],
88721
+ deviceTypes: [require_composed_stable_id.DeviceType.Vacuum],
88853
88722
  methods: {
88854
88723
  start: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
88855
88724
  kind: "mutation",
@@ -88945,7 +88814,7 @@ var valveCapability = {
88945
88814
  scope: "device",
88946
88815
  deviceNative: true,
88947
88816
  mode: "singleton",
88948
- deviceTypes: [require_device_type.DeviceType.Valve],
88817
+ deviceTypes: [require_composed_stable_id.DeviceType.Valve],
88949
88818
  methods: {
88950
88819
  open: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), zod.z.void(), {
88951
88820
  kind: "mutation",
@@ -89326,7 +89195,7 @@ var vibrationCapability = {
89326
89195
  scope: "device",
89327
89196
  deviceNative: true,
89328
89197
  mode: "singleton",
89329
- deviceTypes: [require_device_type.DeviceType.Sensor],
89198
+ deviceTypes: [require_composed_stable_id.DeviceType.Sensor],
89330
89199
  methods: {},
89331
89200
  status: {
89332
89201
  schema: VibrationStatusSchema,
@@ -89395,7 +89264,7 @@ var waterHeaterCapability = {
89395
89264
  scope: "device",
89396
89265
  deviceNative: true,
89397
89266
  mode: "singleton",
89398
- deviceTypes: [require_device_type.DeviceType.WaterHeater],
89267
+ deviceTypes: [require_composed_stable_id.DeviceType.WaterHeater],
89399
89268
  methods: {
89400
89269
  setTargetTemp: require_sleep.method(zod.z.object({
89401
89270
  deviceId: zod.z.number().int().nonnegative(),
@@ -89494,7 +89363,7 @@ var weatherCapability = {
89494
89363
  scope: "device",
89495
89364
  deviceNative: true,
89496
89365
  mode: "singleton",
89497
- deviceTypes: [require_device_type.DeviceType.Weather],
89366
+ deviceTypes: [require_composed_stable_id.DeviceType.Weather],
89498
89367
  methods: {},
89499
89368
  status: {
89500
89369
  schema: WeatherStatusSchema,
@@ -89824,7 +89693,7 @@ var webrtcSessionCapability = {
89824
89693
  kind: "wrapper",
89825
89694
  defaultActive: true,
89826
89695
  preferredProvider: "stream-broker",
89827
- deviceTypes: [require_device_type.DeviceType.Camera],
89696
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
89828
89697
  methods: {
89829
89698
  /**
89830
89699
  * List available WebRTC streams for a device.
@@ -90300,7 +90169,7 @@ var zoneAnalyticsCapability = {
90300
90169
  name: "zone-analytics",
90301
90170
  scope: "device",
90302
90171
  mode: "singleton",
90303
- deviceTypes: [require_device_type.DeviceType.Camera],
90172
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
90304
90173
  methods: {
90305
90174
  /** Latest computed occupancy snapshot for this camera. Null when
90306
90175
  * the analytics pipeline hasn't seen a frame for this device yet
@@ -90501,7 +90370,7 @@ var zoneRulesCapability = {
90501
90370
  name: "zone-rules",
90502
90371
  scope: "device",
90503
90372
  mode: "singleton",
90504
- deviceTypes: [require_device_type.DeviceType.Camera],
90373
+ deviceTypes: [require_composed_stable_id.DeviceType.Camera],
90505
90374
  methods: {
90506
90375
  /** Read the full rule list for a given stage (empty when no rules
90507
90376
  * are defined yet). */
@@ -92936,7 +92805,7 @@ function stepIssues(site, step, at) {
92936
92805
  }
92937
92806
  function describeSource(site) {
92938
92807
  return new Map(site.devices.map((d) => {
92939
- const type = Object.values(require_device_type.DeviceType).find((t) => t === d.type);
92808
+ const type = Object.values(require_composed_stable_id.DeviceType).find((t) => t === d.type);
92940
92809
  const found = {
92941
92810
  kind: "found",
92942
92811
  deviceId: d.id,
@@ -92948,7 +92817,7 @@ function describeSource(site) {
92948
92817
  }
92949
92818
  function describeTarget(site, ref) {
92950
92819
  const device = site.devices.find((d) => d.addonId === ref.addonId && d.stableId === ref.stableId);
92951
- const type = Object.values(require_device_type.DeviceType).find((t) => t === device?.type);
92820
+ const type = Object.values(require_composed_stable_id.DeviceType).find((t) => t === device?.type);
92952
92821
  if (device === void 0 || type === void 0) return { kind: "absent" };
92953
92822
  return {
92954
92823
  kind: "found",
@@ -94274,17 +94143,17 @@ function remoteRoleLabel(role, locale) {
94274
94143
  * exporter deciding what to offer.
94275
94144
  */
94276
94145
  var FEATURE_ROLES = [
94277
- [require_device_type.DeviceFeature.MediaPlayerPower, [
94146
+ [require_composed_stable_id.DeviceFeature.MediaPlayerPower, [
94278
94147
  "power",
94279
94148
  "power_on",
94280
94149
  "power_off"
94281
94150
  ]],
94282
- [require_device_type.DeviceFeature.MediaPlayerVolumeStep, ["volume_up", "volume_down"]],
94283
- [require_device_type.DeviceFeature.MediaPlayerChannelStep, ["channel_up", "channel_down"]],
94284
- [require_device_type.DeviceFeature.MediaPlayerMute, ["mute"]],
94285
- [require_device_type.DeviceFeature.MediaPlayerStop, ["stop"]],
94286
- [require_device_type.DeviceFeature.MediaPlayerNext, ["next"]],
94287
- [require_device_type.DeviceFeature.MediaPlayerPrevious, ["previous"]]
94151
+ [require_composed_stable_id.DeviceFeature.MediaPlayerVolumeStep, ["volume_up", "volume_down"]],
94152
+ [require_composed_stable_id.DeviceFeature.MediaPlayerChannelStep, ["channel_up", "channel_down"]],
94153
+ [require_composed_stable_id.DeviceFeature.MediaPlayerMute, ["mute"]],
94154
+ [require_composed_stable_id.DeviceFeature.MediaPlayerStop, ["stop"]],
94155
+ [require_composed_stable_id.DeviceFeature.MediaPlayerNext, ["next"]],
94156
+ [require_composed_stable_id.DeviceFeature.MediaPlayerPrevious, ["previous"]]
94288
94157
  ];
94289
94158
  /**
94290
94159
  * The features the bound roles stand for, in a stable order. A source surface
@@ -94294,7 +94163,7 @@ var FEATURE_ROLES = [
94294
94163
  function mediaPlayerFeaturesOfRoles(roles, declaredSources) {
94295
94164
  const bound = new Set(roles);
94296
94165
  const fixed = FEATURE_ROLES.filter(([, wanted]) => wanted.some((role) => bound.has(role))).map(([feature]) => feature);
94297
- return declaredSources > 0 ? [...fixed, require_device_type.DeviceFeature.MediaPlayerSelectSource] : fixed;
94166
+ return declaredSources > 0 ? [...fixed, require_composed_stable_id.DeviceFeature.MediaPlayerSelectSource] : fixed;
94298
94167
  }
94299
94168
  //#endregion
94300
94169
  //#region src/remote/remote-layout-ops.ts
@@ -95249,9 +95118,9 @@ var PAUSE_MAX_MS = 30 * MINUTE_MS$1;
95249
95118
  var MIN_RUN_MS = 10 * MINUTE_MS$1;
95250
95119
  /** What a kind needs at least before it is called stopped: a soak pause is longer for a washer. */
95251
95120
  var STOP_FLOOR_BY_KIND = {
95252
- [require_device_type.DeviceType.Dryer]: 3 * MINUTE_MS$1,
95253
- [require_device_type.DeviceType.Dishwasher]: 3 * MINUTE_MS$1,
95254
- [require_device_type.DeviceType.Washer]: 10 * MINUTE_MS$1
95121
+ [require_composed_stable_id.DeviceType.Dryer]: 3 * MINUTE_MS$1,
95122
+ [require_composed_stable_id.DeviceType.Dishwasher]: 3 * MINUTE_MS$1,
95123
+ [require_composed_stable_id.DeviceType.Washer]: 10 * MINUTE_MS$1
95255
95124
  };
95256
95125
  var START_STEP_MS = 10 * SECOND_MS;
95257
95126
  var START_MIN_MS = 10 * SECOND_MS;
@@ -95830,33 +95699,33 @@ var ACTUATOR_METHODS = {
95830
95699
  ],
95831
95700
  fan: [
95832
95701
  row$2("switch", "setState"),
95833
- row$2("fan-control", "setPercentage", require_device_type.DeviceFeature.FanSpeed),
95834
- row$2("fan-control", "setPreset", require_device_type.DeviceFeature.FanPreset),
95835
- row$2("fan-control", "setDirection", require_device_type.DeviceFeature.FanDirection),
95836
- row$2("fan-control", "setOscillating", require_device_type.DeviceFeature.FanOscillating)
95702
+ row$2("fan-control", "setPercentage", require_composed_stable_id.DeviceFeature.FanSpeed),
95703
+ row$2("fan-control", "setPreset", require_composed_stable_id.DeviceFeature.FanPreset),
95704
+ row$2("fan-control", "setDirection", require_composed_stable_id.DeviceFeature.FanDirection),
95705
+ row$2("fan-control", "setOscillating", require_composed_stable_id.DeviceFeature.FanOscillating)
95837
95706
  ],
95838
95707
  cover: [
95839
95708
  row$2("cover", "open"),
95840
95709
  row$2("cover", "close"),
95841
- row$2("cover", "stop", require_device_type.DeviceFeature.CoverStoppable),
95842
- row$2("cover", "setPosition", require_device_type.DeviceFeature.CoverPositionable),
95843
- row$2("cover", "setTiltPosition", require_device_type.DeviceFeature.CoverTilt)
95710
+ row$2("cover", "stop", require_composed_stable_id.DeviceFeature.CoverStoppable),
95711
+ row$2("cover", "setPosition", require_composed_stable_id.DeviceFeature.CoverPositionable),
95712
+ row$2("cover", "setTiltPosition", require_composed_stable_id.DeviceFeature.CoverTilt)
95844
95713
  ],
95845
95714
  valve: [
95846
95715
  row$2("valve", "open"),
95847
95716
  row$2("valve", "close"),
95848
- row$2("valve", "setPosition", require_device_type.DeviceFeature.ValvePositionable)
95717
+ row$2("valve", "setPosition", require_composed_stable_id.DeviceFeature.ValvePositionable)
95849
95718
  ],
95850
95719
  lock: [row$2("lock-control", "lock"), row$2("lock-control", "unlock", null, true)],
95851
95720
  "media-player": [
95852
95721
  row$2("media-player", "play"),
95853
95722
  row$2("media-player", "pause"),
95854
- row$2("media-player", "setVolume", require_device_type.DeviceFeature.MediaPlayerVolume)
95723
+ row$2("media-player", "setVolume", require_composed_stable_id.DeviceFeature.MediaPlayerVolume)
95855
95724
  ],
95856
95725
  climate: [
95857
95726
  row$2("climate-control", "setMode"),
95858
95727
  row$2("climate-control", "setTarget"),
95859
- row$2("climate-control", "setFanMode", require_device_type.DeviceFeature.ClimateFanMode)
95728
+ row$2("climate-control", "setFanMode", require_composed_stable_id.DeviceFeature.ClimateFanMode)
95860
95729
  ]
95861
95730
  };
95862
95731
  function actuatorMethodRow(templateId, cap, method) {
@@ -96092,7 +95961,7 @@ function sourcePickForHeaterPlug() {
96092
95961
  purpose: "member",
96093
95962
  multiple: false,
96094
95963
  max: 1,
96095
- deviceTypes: [require_device_type.DeviceType.Switch],
95964
+ deviceTypes: [require_composed_stable_id.DeviceType.Switch],
96096
95965
  accept: [{
96097
95966
  cap: "switch",
96098
95967
  fieldPath: "on",
@@ -96706,8 +96575,8 @@ function roomCompositionExample(input) {
96706
96575
  return require_composition.CompositionSchema.parse({
96707
96576
  target: {
96708
96577
  kind: "new",
96709
- type: require_device_type.DeviceType.Sensor,
96710
- role: require_device_type.DeviceRole.TemperatureSensor
96578
+ type: require_composed_stable_id.DeviceType.Sensor,
96579
+ role: require_composed_stable_id.DeviceRole.TemperatureSensor
96711
96580
  },
96712
96581
  features: [{
96713
96582
  kind: "fields",
@@ -97133,7 +97002,7 @@ function petFountainFromEntitiesComposition(sources) {
97133
97002
  return require_composition.CompositionSchema.parse({
97134
97003
  target: {
97135
97004
  kind: "new",
97136
- type: require_device_type.DeviceType.PetFountain
97005
+ type: require_composed_stable_id.DeviceType.PetFountain
97137
97006
  },
97138
97007
  features: [
97139
97008
  {
@@ -98585,8 +98454,8 @@ function formulaProblem(expr, bindings) {
98585
98454
  * Map a device role to the primary composition cap (D939).
98586
98455
  */
98587
98456
  var ROLE_CAP_ALIASES = {
98588
- [require_device_type.DeviceRole.BinarySensor]: "binary",
98589
- [require_device_type.DeviceRole.MotionSensor]: "motion"
98457
+ [require_composed_stable_id.DeviceRole.BinarySensor]: "binary",
98458
+ [require_composed_stable_id.DeviceRole.MotionSensor]: "motion"
98590
98459
  };
98591
98460
  var KNOWN_CAPS = new Set(require_sleep.CAP_NAMES);
98592
98461
  function primaryCapForRole(role) {
@@ -98914,14 +98783,14 @@ function paletteLegend() {
98914
98783
  * any role works, including non-accessory ones like Doorbell).
98915
98784
  */
98916
98785
  var AccessoryKind = {
98917
- Siren: require_device_type.DeviceRole.Siren,
98918
- Floodlight: require_device_type.DeviceRole.Floodlight,
98919
- Spotlight: require_device_type.DeviceRole.Spotlight,
98920
- PirSensor: require_device_type.DeviceRole.PirSensor,
98921
- Chime: require_device_type.DeviceRole.Chime,
98922
- Autotrack: require_device_type.DeviceRole.Autotrack,
98923
- Nightvision: require_device_type.DeviceRole.Nightvision,
98924
- PrivacyMask: require_device_type.DeviceRole.PrivacyMask
98786
+ Siren: require_composed_stable_id.DeviceRole.Siren,
98787
+ Floodlight: require_composed_stable_id.DeviceRole.Floodlight,
98788
+ Spotlight: require_composed_stable_id.DeviceRole.Spotlight,
98789
+ PirSensor: require_composed_stable_id.DeviceRole.PirSensor,
98790
+ Chime: require_composed_stable_id.DeviceRole.Chime,
98791
+ Autotrack: require_composed_stable_id.DeviceRole.Autotrack,
98792
+ Nightvision: require_composed_stable_id.DeviceRole.Nightvision,
98793
+ PrivacyMask: require_composed_stable_id.DeviceRole.PrivacyMask
98925
98794
  };
98926
98795
  /**
98927
98796
  * Default English label for each accessory kind. Drivers append this
@@ -100084,7 +99953,7 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
100084
99953
  */
100085
99954
  async getManualCreationType(_input) {
100086
99955
  if (!await this.supportsManualCreation()) return { deviceType: null };
100087
- return { deviceType: Object.values(require_device_type.DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
99956
+ return { deviceType: Object.values(require_composed_stable_id.DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
100088
99957
  }
100089
99958
  async adoptDiscoveredDevice(_input) {
100090
99959
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
@@ -100348,14 +100217,14 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
100348
100217
  });
100349
100218
  const meta = await this.ctx.api.deviceManager.loadMeta.query({ deviceId: id });
100350
100219
  if (meta === null) throw new Error(`${this.providerName}: no persisted meta for "${stableId}" (id ${id}) — cannot reload`);
100351
- const deviceType = Object.values(require_device_type.DeviceType).find((t) => t === meta.type);
100220
+ const deviceType = Object.values(require_composed_stable_id.DeviceType).find((t) => t === meta.type);
100352
100221
  const Class = deviceType !== void 0 ? this.deviceClasses[deviceType] : void 0;
100353
100222
  if (!Class) throw new Error(`${this.providerName}: no device class for type "${meta.type}" — "${stableId}" is an accessory child; reload its parent instead`);
100354
100223
  await devices.create(stableId, Class, {}, meta.parentDeviceId ?? null);
100355
100224
  const rows = await this.ctx.api.deviceManager.listPersistedByAddon.query({ addonId: this.addonId });
100356
100225
  for (const row of rows) {
100357
100226
  if (row.parentDeviceId !== id) continue;
100358
- const childType = Object.values(require_device_type.DeviceType).find((t) => t === row.type);
100227
+ const childType = Object.values(require_composed_stable_id.DeviceType).find((t) => t === row.type);
100359
100228
  const ChildClass = childType !== void 0 ? this.deviceClasses[childType] : void 0;
100360
100229
  if (!ChildClass) continue;
100361
100230
  try {
@@ -100620,12 +100489,42 @@ function isBatteryPresenceFault(presence) {
100620
100489
  * priority-in-sync.ts` fails the build when either drifts — the comment that
100621
100490
  * used to ask for this could not.
100622
100491
  *
100623
- * The rule has two halves and the ORDER matters: an operator's explicit pick
100624
- * wins outright, and only in its absence does type priority decide. The pick is
100625
- * keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
100626
- * survives a re-sync that reallocates ids.
100492
+ * The rule has three halves and the ORDER matters: an operator's explicit pick
100493
+ * wins outright; else a declaration on the device type
100494
+ * ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
100495
+ * priority. The pick is keyed on the child's re-sync-stable `entityId`, not
100496
+ * its numeric id, so it survives a re-sync that reallocates ids.
100627
100497
  */
100628
100498
  /**
100499
+ * Device types that name their primary child. A heat pump stands for itself:
100500
+ * its hero is the system row, not the climate circuit that type-rank would
100501
+ * otherwise pick.
100502
+ */
100503
+ var CONTAINER_PRIMARY_CHILD_RULES = [{
100504
+ deviceType: require_composed_stable_id.DeviceType.HeatPump,
100505
+ primary: "self"
100506
+ }];
100507
+ /**
100508
+ * The type declaration, before the heuristic. `fall-through` means the
100509
+ * heuristic still decides: the type declared nothing, or it named a child
100510
+ * type that is not among the children.
100511
+ */
100512
+ function declaredChildType(primary) {
100513
+ if (primary === "self") return void 0;
100514
+ return primary.childType;
100515
+ }
100516
+ function applyPrimaryChildRule(rule, children) {
100517
+ if (rule === void 0) return { kind: "fall-through" };
100518
+ const childType = declaredChildType(rule.primary);
100519
+ if (childType === void 0) return { kind: "none" };
100520
+ const match = children.find((child) => child.type === childType);
100521
+ if (match === void 0) return { kind: "fall-through" };
100522
+ return {
100523
+ kind: "child",
100524
+ child: match
100525
+ };
100526
+ }
100527
+ /**
100629
100528
  * Type priority, most→least "primary". An actuator (climate / lock / cover / …)
100630
100529
  * outranks a bare `switch` so a container's defining child wins over its
100631
100530
  * auxiliary switches. Unknown or absent types sort after every entry.
@@ -100712,9 +100611,10 @@ function rank(type) {
100712
100611
  }
100713
100612
  /**
100714
100613
  * The child a container stands for: the operator's pick when it still exists,
100715
- * else the highest-priority type. `null` for a childless container — a caller
100716
- * must decide what an empty container means for it, rather than being handed a
100717
- * child that is not there.
100614
+ * else the device type's declaration, else the highest-priority type. `null`
100615
+ * for a childless container, and for a type that stands for itself — a caller
100616
+ * must decide what "no child" means for it, rather than being handed a child
100617
+ * that is not the device.
100718
100618
  */
100719
100619
  /**
100720
100620
  * Two names for the same thing, compared the way an integration writes them.
@@ -100743,11 +100643,14 @@ function sameName(childName, containerName) {
100743
100643
  const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
100744
100644
  return flatten(childName) === flatten(containerName);
100745
100645
  }
100746
- function resolveContainerPrimaryChild(children, overrideEntityId, containerName) {
100646
+ function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType) {
100747
100647
  if (overrideEntityId !== void 0 && overrideEntityId !== null) {
100748
100648
  const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
100749
100649
  if (picked !== void 0) return picked;
100750
100650
  }
100651
+ const declared = applyPrimaryChildRule(CONTAINER_PRIMARY_CHILD_RULES.find((entry) => entry.deviceType === containerType), children);
100652
+ if (declared.kind === "none") return null;
100653
+ if (declared.kind === "child") return declared.child;
100751
100654
  const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && sameName(c.name, containerName) ? 0 : 1;
100752
100655
  return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
100753
100656
  }
@@ -100785,7 +100688,7 @@ function expandContainer(id, byId, byParent, visited, out) {
100785
100688
  if (visited.has(id)) return;
100786
100689
  const candidate = byId.get(id);
100787
100690
  if (!candidate) return;
100788
- if (candidate.type !== require_device_type.DeviceType.Container) {
100691
+ if (candidate.type !== require_composed_stable_id.DeviceType.Container) {
100789
100692
  out.add(id);
100790
100693
  return;
100791
100694
  }
@@ -100797,7 +100700,7 @@ function expandContainer(id, byId, byParent, visited, out) {
100797
100700
  type: c.type,
100798
100701
  ...c.role !== void 0 && c.role !== null ? { role: c.role } : {},
100799
100702
  ...c.name !== void 0 ? { name: c.name } : {}
100800
- })), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name);
100703
+ })), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name, candidate.type);
100801
100704
  if (primary !== null) expandContainer(primary.id, byId, byParent, nextVisited, out);
100802
100705
  }
100803
100706
  /**
@@ -100829,11 +100732,11 @@ function legacyAutoLinkIds(params) {
100829
100732
  const ids = /* @__PURE__ */ new Set();
100830
100733
  const expand = (id) => expandContainer(id, byId, byParent, /* @__PURE__ */ new Set(), ids);
100831
100734
  for (const c of candidates) {
100832
- if (c.type === require_device_type.DeviceType.Container) continue;
100735
+ if (c.type === require_composed_stable_id.DeviceType.Container) continue;
100833
100736
  if (c.location !== selfLocation) continue;
100834
100737
  if (c.parentDeviceId === selfId) continue;
100835
100738
  const parent = c.parentDeviceId !== null ? byId.get(c.parentDeviceId) : void 0;
100836
- if (parent !== void 0 && parent.type === require_device_type.DeviceType.Container) {
100739
+ if (parent !== void 0 && parent.type === require_composed_stable_id.DeviceType.Container) {
100837
100740
  expand(parent.id);
100838
100741
  continue;
100839
100742
  }
@@ -100982,7 +100885,7 @@ var DeclaredDevices = class {
100982
100885
  } catch (err) {
100983
100886
  this.ports.logger.warn("could not seed the instance record of a declared integration", {
100984
100887
  tags: { integrationId: integration.id },
100985
- meta: { error: require_device_type.errMsg(err) }
100888
+ meta: { error: require_composed_stable_id.errMsg(err) }
100986
100889
  });
100987
100890
  }
100988
100891
  }
@@ -101292,46 +101195,46 @@ function widenDeviceConstructor(ctor) {
101292
101195
  * placeholder HA types whose inline control renders a dash).
101293
101196
  */
101294
101197
  var DEVICE_TYPE_CONTROL_KIND = {
101295
- [require_device_type.DeviceType.Cover]: "cover",
101296
- [require_device_type.DeviceType.Valve]: "valve",
101297
- [require_device_type.DeviceType.Humidifier]: "humidifier",
101298
- [require_device_type.DeviceType.WaterHeater]: "water-heater",
101299
- [require_device_type.DeviceType.HeatPump]: "dummy",
101300
- [require_device_type.DeviceType.Camera]: "dummy",
101301
- [require_device_type.DeviceType.Hub]: "dummy",
101302
- [require_device_type.DeviceType.Switch]: "switch",
101303
- [require_device_type.DeviceType.Siren]: "switch",
101304
- [require_device_type.DeviceType.Light]: "light",
101305
- [require_device_type.DeviceType.Fan]: "fan",
101306
- [require_device_type.DeviceType.Sensor]: "sensor",
101307
- [require_device_type.DeviceType.Thermostat]: "thermostat",
101308
- [require_device_type.DeviceType.Climate]: "climate",
101309
- [require_device_type.DeviceType.Button]: "button",
101310
- [require_device_type.DeviceType.EventEmitter]: "dummy",
101311
- [require_device_type.DeviceType.Update]: "update",
101312
- [require_device_type.DeviceType.Generic]: "dummy",
101313
- [require_device_type.DeviceType.Notifier]: "dummy",
101314
- [require_device_type.DeviceType.Script]: "script",
101315
- [require_device_type.DeviceType.Automation]: "automation",
101316
- [require_device_type.DeviceType.Lock]: "lock",
101317
- [require_device_type.DeviceType.MediaPlayer]: "media-player",
101318
- [require_device_type.DeviceType.AlarmPanel]: "alarm",
101319
- [require_device_type.DeviceType.Control]: "control",
101320
- [require_device_type.DeviceType.Presence]: "sensor",
101321
- [require_device_type.DeviceType.Weather]: "weather",
101322
- [require_device_type.DeviceType.Vacuum]: "vacuum",
101323
- [require_device_type.DeviceType.LawnMower]: "lawn-mower",
101324
- [require_device_type.DeviceType.Container]: "dummy",
101325
- [require_device_type.DeviceType.Image]: "image",
101326
- [require_device_type.DeviceType.PetFeeder]: "pet-feeder",
101327
- [require_device_type.DeviceType.PetFountain]: "pet-fountain",
101328
- [require_device_type.DeviceType.Heater]: "heater",
101329
- [require_device_type.DeviceType.Dishwasher]: "dishwasher",
101330
- [require_device_type.DeviceType.Washer]: "appliance",
101331
- [require_device_type.DeviceType.Dryer]: "appliance",
101332
- [require_device_type.DeviceType.Gateway]: "dummy"
101198
+ [require_composed_stable_id.DeviceType.Cover]: "cover",
101199
+ [require_composed_stable_id.DeviceType.Valve]: "valve",
101200
+ [require_composed_stable_id.DeviceType.Humidifier]: "humidifier",
101201
+ [require_composed_stable_id.DeviceType.WaterHeater]: "water-heater",
101202
+ [require_composed_stable_id.DeviceType.HeatPump]: "dummy",
101203
+ [require_composed_stable_id.DeviceType.Camera]: "dummy",
101204
+ [require_composed_stable_id.DeviceType.Hub]: "dummy",
101205
+ [require_composed_stable_id.DeviceType.Switch]: "switch",
101206
+ [require_composed_stable_id.DeviceType.Siren]: "switch",
101207
+ [require_composed_stable_id.DeviceType.Light]: "light",
101208
+ [require_composed_stable_id.DeviceType.Fan]: "fan",
101209
+ [require_composed_stable_id.DeviceType.Sensor]: "sensor",
101210
+ [require_composed_stable_id.DeviceType.Thermostat]: "thermostat",
101211
+ [require_composed_stable_id.DeviceType.Climate]: "climate",
101212
+ [require_composed_stable_id.DeviceType.Button]: "button",
101213
+ [require_composed_stable_id.DeviceType.EventEmitter]: "dummy",
101214
+ [require_composed_stable_id.DeviceType.Update]: "update",
101215
+ [require_composed_stable_id.DeviceType.Generic]: "dummy",
101216
+ [require_composed_stable_id.DeviceType.Notifier]: "dummy",
101217
+ [require_composed_stable_id.DeviceType.Script]: "script",
101218
+ [require_composed_stable_id.DeviceType.Automation]: "automation",
101219
+ [require_composed_stable_id.DeviceType.Lock]: "lock",
101220
+ [require_composed_stable_id.DeviceType.MediaPlayer]: "media-player",
101221
+ [require_composed_stable_id.DeviceType.AlarmPanel]: "alarm",
101222
+ [require_composed_stable_id.DeviceType.Control]: "control",
101223
+ [require_composed_stable_id.DeviceType.Presence]: "sensor",
101224
+ [require_composed_stable_id.DeviceType.Weather]: "weather",
101225
+ [require_composed_stable_id.DeviceType.Vacuum]: "vacuum",
101226
+ [require_composed_stable_id.DeviceType.LawnMower]: "lawn-mower",
101227
+ [require_composed_stable_id.DeviceType.Container]: "dummy",
101228
+ [require_composed_stable_id.DeviceType.Image]: "image",
101229
+ [require_composed_stable_id.DeviceType.PetFeeder]: "pet-feeder",
101230
+ [require_composed_stable_id.DeviceType.PetFountain]: "pet-fountain",
101231
+ [require_composed_stable_id.DeviceType.Heater]: "heater",
101232
+ [require_composed_stable_id.DeviceType.Dishwasher]: "dishwasher",
101233
+ [require_composed_stable_id.DeviceType.Washer]: "appliance",
101234
+ [require_composed_stable_id.DeviceType.Dryer]: "appliance",
101235
+ [require_composed_stable_id.DeviceType.Gateway]: "dummy"
101333
101236
  };
101334
- var DEVICE_TYPE_VALUES = new Set(Object.values(require_device_type.DeviceType));
101237
+ var DEVICE_TYPE_VALUES = new Set(Object.values(require_composed_stable_id.DeviceType));
101335
101238
  /**
101336
101239
  * Runtime-string-safe base resolver: a device row's `type` crosses the wire as
101337
101240
  * a plain string, so an unrecognised value resolves to `null` instead of
@@ -101375,15 +101278,15 @@ var SENSOR_FEATURES = [
101375
101278
  function pickAccessoryControl(device) {
101376
101279
  const set = new Set(device.features);
101377
101280
  switch (device.type) {
101378
- case require_device_type.DeviceType.Cover: return { kind: "cover" };
101379
- case require_device_type.DeviceType.Valve: return { kind: "valve" };
101380
- case require_device_type.DeviceType.Lock: return { kind: "lock" };
101381
- case require_device_type.DeviceType.AlarmPanel: return { kind: "alarm" };
101382
- case require_device_type.DeviceType.Light: return set.has("brightness") ? { kind: "brightness" } : { kind: "switch" };
101383
- case require_device_type.DeviceType.Switch:
101384
- case require_device_type.DeviceType.Siren: return { kind: "switch" };
101385
- case require_device_type.DeviceType.Sensor:
101386
- case require_device_type.DeviceType.Presence: {
101281
+ case require_composed_stable_id.DeviceType.Cover: return { kind: "cover" };
101282
+ case require_composed_stable_id.DeviceType.Valve: return { kind: "valve" };
101283
+ case require_composed_stable_id.DeviceType.Lock: return { kind: "lock" };
101284
+ case require_composed_stable_id.DeviceType.AlarmPanel: return { kind: "alarm" };
101285
+ case require_composed_stable_id.DeviceType.Light: return set.has("brightness") ? { kind: "brightness" } : { kind: "switch" };
101286
+ case require_composed_stable_id.DeviceType.Switch:
101287
+ case require_composed_stable_id.DeviceType.Siren: return { kind: "switch" };
101288
+ case require_composed_stable_id.DeviceType.Sensor:
101289
+ case require_composed_stable_id.DeviceType.Presence: {
101387
101290
  const sensor = SENSOR_FEATURES.find((f) => set.has(f));
101388
101291
  return sensor ? {
101389
101292
  kind: "sensor",
@@ -101570,7 +101473,7 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
101570
101473
  const title = words?.title ?? require_sleep.t("Unknown", "Sconosciuto");
101571
101474
  return {
101572
101475
  reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
101573
- rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(require_device_type.DeviceFeature.LockOpen)))],
101476
+ rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(require_composed_stable_id.DeviceFeature.LockOpen)))],
101574
101477
  ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
101575
101478
  ...words === null ? {} : { tiles: { left: [{
101576
101479
  label: require_sleep.t("Door", "Porta"),
@@ -101748,7 +101651,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
101748
101651
  const speed = slice?.speed ?? null;
101749
101652
  const state = speed === null ? "unknown" : speed > 0 ? "running" : "off";
101750
101653
  const controls = [];
101751
- if (speed !== null || has$3(ctx, require_device_type.DeviceFeature.FanSpeed)) controls.push({
101654
+ if (speed !== null || has$3(ctx, require_composed_stable_id.DeviceFeature.FanSpeed)) controls.push({
101752
101655
  kind: "slider",
101753
101656
  id: "fan.speed",
101754
101657
  label: require_sleep.t("Speed", "Velocità"),
@@ -101777,7 +101680,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
101777
101680
  },
101778
101681
  valueArg: "preset"
101779
101682
  });
101780
- if (slice?.oscillating != null || has$3(ctx, require_device_type.DeviceFeature.FanOscillating)) controls.push({
101683
+ if (slice?.oscillating != null || has$3(ctx, require_composed_stable_id.DeviceFeature.FanOscillating)) controls.push({
101781
101684
  kind: "toggle",
101782
101685
  id: "fan.oscillating",
101783
101686
  label: require_sleep.t("Oscillate", "Oscilla"),
@@ -101785,7 +101688,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
101785
101688
  turnOn: action("fan.oscillate.on", require_sleep.t("Oscillate", "Oscilla"), "refresh-cw", "fan-control", "setOscillating", { oscillating: true }),
101786
101689
  turnOff: action("fan.oscillate.off", require_sleep.t("Hold still", "Fermo"), "square", "fan-control", "setOscillating", { oscillating: false })
101787
101690
  });
101788
- if (slice?.direction != null || has$3(ctx, require_device_type.DeviceFeature.FanDirection)) controls.push({
101691
+ if (slice?.direction != null || has$3(ctx, require_composed_stable_id.DeviceFeature.FanDirection)) controls.push({
101789
101692
  kind: "picker",
101790
101693
  id: "fan.direction",
101791
101694
  label: require_sleep.t("Direction", "Direzione"),
@@ -102228,11 +102131,11 @@ var HUE_PRESETS = [
102228
102131
  ];
102229
102132
  function colorControls(ctx, current) {
102230
102133
  const controls = [];
102231
- if (has$2(ctx, require_device_type.DeviceFeature.LightColorMired)) for (const p of WHITE_PRESETS) controls.push(asAction(action(p.id, require_sleep.t(p.en, p.it), p.icon, "color", "setColor", { color: {
102134
+ if (has$2(ctx, require_composed_stable_id.DeviceFeature.LightColorMired)) for (const p of WHITE_PRESETS) controls.push(asAction(action(p.id, require_sleep.t(p.en, p.it), p.icon, "color", "setColor", { color: {
102232
102135
  mode: "mired",
102233
102136
  colorTemperature: p.mired
102234
102137
  } })));
102235
- if (has$2(ctx, require_device_type.DeviceFeature.LightColorHsv)) {
102138
+ if (has$2(ctx, require_composed_stable_id.DeviceFeature.LightColorHsv)) {
102236
102139
  const s = current?.s ?? 100;
102237
102140
  const v = current?.v ?? 100;
102238
102141
  for (const p of HUE_PRESETS) controls.push(asAction(action(p.id, require_sleep.t(p.en, p.it), "palette", "color", "setColor", { color: {
@@ -102331,7 +102234,7 @@ function travelFragment(s, state, position, tilt, ctx) {
102331
102234
  const words = travelWords(state, position);
102332
102235
  const controls = travelActions(s, state, state === "opening" || state === "closing").map(asAction);
102333
102236
  if (position !== null || s.positionable) controls.push(positionSlider(s, position));
102334
- if (s.cap === "cover" && (tilt !== null || has$2(ctx, require_device_type.DeviceFeature.CoverTilt))) controls.push({
102237
+ if (s.cap === "cover" && (tilt !== null || has$2(ctx, require_composed_stable_id.DeviceFeature.CoverTilt))) controls.push({
102335
102238
  kind: "slider",
102336
102239
  id: "cover.tilt",
102337
102240
  label: require_sleep.t("Tilt", "Inclinazione"),
@@ -102368,15 +102271,15 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
102368
102271
  cap: "cover",
102369
102272
  rowId: "cover",
102370
102273
  source: "cover",
102371
- stoppable: has$2(ctx, require_device_type.DeviceFeature.CoverStoppable),
102372
- positionable: has$2(ctx, require_device_type.DeviceFeature.CoverPositionable)
102274
+ stoppable: has$2(ctx, require_composed_stable_id.DeviceFeature.CoverStoppable),
102275
+ positionable: has$2(ctx, require_composed_stable_id.DeviceFeature.CoverPositionable)
102373
102276
  }, slice?.state, slice?.position ?? null, slice?.tiltPosition ?? null, ctx)),
102374
102277
  valve: contribution("valve", ValveStatusSchema, (slice, ctx) => travelFragment({
102375
102278
  cap: "valve",
102376
102279
  rowId: "valve",
102377
102280
  source: "valve",
102378
102281
  stoppable: false,
102379
- positionable: has$2(ctx, require_device_type.DeviceFeature.ValvePositionable)
102282
+ positionable: has$2(ctx, require_composed_stable_id.DeviceFeature.ValvePositionable)
102380
102283
  }, slice?.state, slice?.position ?? null, null, ctx)),
102381
102284
  humidifier: contribution("humidifier", HumidifierStatusSchema, (slice) => {
102382
102285
  if (slice === void 0) return { reading: reading("humidifier", "unknown") };
@@ -102996,7 +102899,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
102996
102899
  turnOn: action(`${id}.on`, require_sleep.t(en, it), "wind", "climate-control", method, { on: true }),
102997
102900
  turnOff: action(`${id}.off`, require_sleep.t(en, it), "wind", "climate-control", method, { on: false })
102998
102901
  }] : [];
102999
- fanControls.push(...swing("climate.swing-vertical", "Swing vertical", "Oscillazione verticale", "setSwingVertical", slice.swingVertical, require_device_type.DeviceFeature.ClimateSwingVertical), ...swing("climate.swing-horizontal", "Swing horizontal", "Oscillazione orizzontale", "setSwingHorizontal", slice.swingHorizontal, require_device_type.DeviceFeature.ClimateSwingHorizontal));
102902
+ fanControls.push(...swing("climate.swing-vertical", "Swing vertical", "Oscillazione verticale", "setSwingVertical", slice.swingVertical, require_composed_stable_id.DeviceFeature.ClimateSwingVertical), ...swing("climate.swing-horizontal", "Swing horizontal", "Oscillazione orizzontale", "setSwingHorizontal", slice.swingHorizontal, require_composed_stable_id.DeviceFeature.ClimateSwingHorizontal));
103000
102903
  const rows = [{
103001
102904
  id: "climate-mode",
103002
102905
  icon: "thermometer",
@@ -103194,7 +103097,7 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
103194
103097
  /**
103195
103098
  * The heat pump's contribution to a hero (D1026): the compressor scene, every
103196
103099
  * circuit as a row with its own label and icon, the powers as pills (the
103197
- * instantaneous COP only when both powers are known) and a "System" group with
103100
+ * instantaneous COP is "—" when it cannot be computed) and a "System" group with
103198
103101
  * one selector per mode. Values and their limits come from the slice, which the
103199
103102
  * gateway filled: a selector with no allowed value is not drawn, a missing
103200
103103
  * reading is never a 0 (D393).
@@ -103266,9 +103169,22 @@ function circuitRow(circuit) {
103266
103169
  };
103267
103170
  }
103268
103171
  var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
103172
+ /** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
103173
+ function copPill(cop) {
103174
+ if (cop === null) return {
103175
+ icon: "gauge",
103176
+ text: require_sleep.t("Instantaneous COP —", "COP istantaneo —"),
103177
+ tone: "muted"
103178
+ };
103179
+ const text = String(Number(cop.toFixed(1)));
103180
+ return {
103181
+ icon: "gauge",
103182
+ text: require_sleep.t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
103183
+ tone: "success"
103184
+ };
103185
+ }
103269
103186
  function powerPills(status) {
103270
103187
  const { thermalW, electricalW } = status.power;
103271
- const cop = heatPumpInstantCop(status.power);
103272
103188
  const pills = [];
103273
103189
  if (thermalW !== null) pills.push({
103274
103190
  icon: "flame",
@@ -103280,14 +103196,7 @@ function powerPills(status) {
103280
103196
  text: require_sleep.t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
103281
103197
  tone: "muted"
103282
103198
  });
103283
- if (cop !== null) {
103284
- const text = String(Number(cop.toFixed(1)));
103285
- pills.push({
103286
- icon: "gauge",
103287
- text: require_sleep.t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
103288
- tone: "success"
103289
- });
103290
- }
103199
+ pills.push(copPill(heatPumpInstantCop(status.power)));
103291
103200
  return pills;
103292
103201
  }
103293
103202
  /** The independent system modes, in the order the card draws them. */
@@ -103550,8 +103459,8 @@ function deriveMediaPlayerView(status, features, extras = {}) {
103550
103459
  return {
103551
103460
  ...derivePowerGatedView(status, features, extras),
103552
103461
  nowPlaying: nowPlayingOf(status),
103553
- shuffleReadOnly: status !== void 0 && status.shuffle !== null && !(features?.includes(require_device_type.DeviceFeature.MediaPlayerShuffle) ?? false),
103554
- repeatReadOnly: status !== void 0 && status.repeat !== null && !(features?.includes(require_device_type.DeviceFeature.MediaPlayerRepeat) ?? false)
103462
+ shuffleReadOnly: status !== void 0 && status.shuffle !== null && !(features?.includes(require_composed_stable_id.DeviceFeature.MediaPlayerShuffle) ?? false),
103463
+ repeatReadOnly: status !== void 0 && status.repeat !== null && !(features?.includes(require_composed_stable_id.DeviceFeature.MediaPlayerRepeat) ?? false)
103555
103464
  };
103556
103465
  }
103557
103466
  function derivePowerGatedView(status, features, extras) {
@@ -103588,7 +103497,7 @@ function channelOf(status) {
103588
103497
  }
103589
103498
  function deriveFromStatus(status, features) {
103590
103499
  const has = (f) => features?.includes(f) ?? false;
103591
- const canSwitchPower = has(require_device_type.DeviceFeature.MediaPlayerPower);
103500
+ const canSwitchPower = has(require_composed_stable_id.DeviceFeature.MediaPlayerPower);
103592
103501
  if (status === void 0 || status.state === void 0) return {
103593
103502
  ...UNKNOWN_VIEW,
103594
103503
  canSwitchPower
@@ -103603,8 +103512,8 @@ function deriveFromStatus(status, features) {
103603
103512
  canSwitchPower
103604
103513
  };
103605
103514
  if (power !== "on") return base;
103606
- const hasTransportFeature = has(require_device_type.DeviceFeature.MediaPlayerNext) || has(require_device_type.DeviceFeature.MediaPlayerPrevious) || has(require_device_type.DeviceFeature.MediaPlayerStop) || has(require_device_type.DeviceFeature.MediaPlayerSeek);
103607
- const volume = has(require_device_type.DeviceFeature.MediaPlayerVolume) ? "slider" : has(require_device_type.DeviceFeature.MediaPlayerVolumeStep) ? "steps" : "none";
103515
+ const hasTransportFeature = has(require_composed_stable_id.DeviceFeature.MediaPlayerNext) || has(require_composed_stable_id.DeviceFeature.MediaPlayerPrevious) || has(require_composed_stable_id.DeviceFeature.MediaPlayerStop) || has(require_composed_stable_id.DeviceFeature.MediaPlayerSeek);
103516
+ const volume = has(require_composed_stable_id.DeviceFeature.MediaPlayerVolume) ? "slider" : has(require_composed_stable_id.DeviceFeature.MediaPlayerVolumeStep) ? "steps" : "none";
103608
103517
  const sourceName = typeof status.source === "string" ? status.source.trim() : "";
103609
103518
  const options = status.availableSources ?? [];
103610
103519
  const hasSource = sourceName !== "" || options.length > 0;
@@ -103612,24 +103521,24 @@ function deriveFromStatus(status, features) {
103612
103521
  ...base,
103613
103522
  transport: {
103614
103523
  playPause: running !== "none" || hasTransportFeature,
103615
- previous: has(require_device_type.DeviceFeature.MediaPlayerPrevious),
103616
- next: has(require_device_type.DeviceFeature.MediaPlayerNext),
103617
- stop: has(require_device_type.DeviceFeature.MediaPlayerStop)
103524
+ previous: has(require_composed_stable_id.DeviceFeature.MediaPlayerPrevious),
103525
+ next: has(require_composed_stable_id.DeviceFeature.MediaPlayerNext),
103526
+ stop: has(require_composed_stable_id.DeviceFeature.MediaPlayerStop)
103618
103527
  },
103619
- seek: has(require_device_type.DeviceFeature.MediaPlayerSeek) && status.duration !== null && status.duration > 0,
103528
+ seek: has(require_composed_stable_id.DeviceFeature.MediaPlayerSeek) && status.duration !== null && status.duration > 0,
103620
103529
  volume,
103621
- mute: has(require_device_type.DeviceFeature.MediaPlayerMute) || volume === "slider" && status.isMuted !== null,
103530
+ mute: has(require_composed_stable_id.DeviceFeature.MediaPlayerMute) || volume === "slider" && status.isMuted !== null,
103622
103531
  volumeKnown: status.volumeLevel !== null,
103623
103532
  muteKnown: status.isMuted !== null,
103624
103533
  artworkUrl: artworkOf(status),
103625
103534
  source: hasSource ? {
103626
103535
  current: sourceName,
103627
103536
  options,
103628
- selectable: has(require_device_type.DeviceFeature.MediaPlayerSelectSource) && options.length > 1
103537
+ selectable: has(require_composed_stable_id.DeviceFeature.MediaPlayerSelectSource) && options.length > 1
103629
103538
  } : null,
103630
- channel: has(require_device_type.DeviceFeature.MediaPlayerChannelStep) ? { current: channelOf(status) } : null,
103631
- shuffle: has(require_device_type.DeviceFeature.MediaPlayerShuffle) && status.shuffle !== null,
103632
- repeat: has(require_device_type.DeviceFeature.MediaPlayerRepeat) && status.repeat !== null
103539
+ channel: has(require_composed_stable_id.DeviceFeature.MediaPlayerChannelStep) ? { current: channelOf(status) } : null,
103540
+ shuffle: has(require_composed_stable_id.DeviceFeature.MediaPlayerShuffle) && status.shuffle !== null,
103541
+ repeat: has(require_composed_stable_id.DeviceFeature.MediaPlayerRepeat) && status.repeat !== null
103633
103542
  };
103634
103543
  }
103635
103544
  //#endregion
@@ -103657,7 +103566,7 @@ function durationText(seconds) {
103657
103566
  return require_sleep.t(text, text);
103658
103567
  }
103659
103568
  function deviceTypeOf(type) {
103660
- return Object.values(require_device_type.DeviceType).find((t) => t === type);
103569
+ return Object.values(require_composed_stable_id.DeviceType).find((t) => t === type);
103661
103570
  }
103662
103571
  var switchContribution = contribution("switch", SwitchStatusSchema, (slice) => {
103663
103572
  const on = slice?.on ?? null;
@@ -104001,7 +103910,7 @@ function mediaReading(view) {
104001
103910
  var mp = (id, en, it, icon, method, emphasis = "normal") => asAction(action(`playback.${id}`, require_sleep.t(en, it), icon, "media-player", method, {}, emphasis));
104002
103911
  function playbackControls(view, ctx) {
104003
103912
  const controls = [];
104004
- const stop = has$1(ctx, require_device_type.DeviceFeature.MediaPlayerStop);
103913
+ const stop = has$1(ctx, require_composed_stable_id.DeviceFeature.MediaPlayerStop);
104005
103914
  if (view.power === "unknown") {
104006
103915
  controls.push(mp("play", "Play", "Riproduci", "play", "play"), mp("pause", "Pause", "Pausa", "pause", "pause"));
104007
103916
  if (stop) controls.push(mp("stop", "Stop", "Stop", "square", "stop"));
@@ -104272,47 +104181,47 @@ var UPDATE_LAYOUT = { rows: ["update"] };
104272
104181
  var CONTROL_LAYOUT = { rows: ["control"] };
104273
104182
  var BUTTON_LAYOUT = { rows: ["button"] };
104274
104183
  var HERO_LAYOUT_BY_TYPE = {
104275
- [require_device_type.DeviceType.Camera]: HERO_LAYOUT_DEFAULT,
104276
- [require_device_type.DeviceType.Hub]: HERO_LAYOUT_DEFAULT,
104277
- [require_device_type.DeviceType.Light]: LIGHT_LAYOUT,
104278
- [require_device_type.DeviceType.Siren]: HERO_LAYOUT_DEFAULT,
104279
- [require_device_type.DeviceType.Switch]: SWITCH_LAYOUT,
104280
- [require_device_type.DeviceType.Sensor]: HERO_LAYOUT_DEFAULT,
104281
- [require_device_type.DeviceType.Thermostat]: CLIMATE_LAYOUT,
104282
- [require_device_type.DeviceType.Climate]: CLIMATE_LAYOUT,
104283
- [require_device_type.DeviceType.Button]: BUTTON_LAYOUT,
104284
- [require_device_type.DeviceType.EventEmitter]: HERO_LAYOUT_DEFAULT,
104285
- [require_device_type.DeviceType.Update]: UPDATE_LAYOUT,
104286
- [require_device_type.DeviceType.Generic]: HERO_LAYOUT_DEFAULT,
104287
- [require_device_type.DeviceType.Notifier]: HERO_LAYOUT_DEFAULT,
104288
- [require_device_type.DeviceType.Script]: SCRIPT_LAYOUT,
104289
- [require_device_type.DeviceType.Automation]: AUTOMATION_LAYOUT,
104290
- [require_device_type.DeviceType.Lock]: LOCK_LAYOUT,
104291
- [require_device_type.DeviceType.Cover]: COVER_LAYOUT,
104292
- [require_device_type.DeviceType.Valve]: VALVE_LAYOUT,
104293
- [require_device_type.DeviceType.Humidifier]: HUMIDIFIER_LAYOUT,
104294
- [require_device_type.DeviceType.WaterHeater]: CLIMATE_LAYOUT,
104295
- [require_device_type.DeviceType.HeatPump]: HEAT_PUMP_LAYOUT,
104296
- [require_device_type.DeviceType.Fan]: FAN_LAYOUT,
104297
- [require_device_type.DeviceType.MediaPlayer]: MEDIA_PLAYER_LAYOUT,
104298
- [require_device_type.DeviceType.AlarmPanel]: ALARM_LAYOUT,
104299
- [require_device_type.DeviceType.Control]: CONTROL_LAYOUT,
104300
- [require_device_type.DeviceType.Presence]: HERO_LAYOUT_DEFAULT,
104301
- [require_device_type.DeviceType.Weather]: HERO_LAYOUT_DEFAULT,
104302
- [require_device_type.DeviceType.Vacuum]: VACUUM_LAYOUT,
104303
- [require_device_type.DeviceType.LawnMower]: MOWER_LAYOUT,
104304
- [require_device_type.DeviceType.Container]: HERO_LAYOUT_DEFAULT,
104305
- [require_device_type.DeviceType.Image]: HERO_LAYOUT_DEFAULT,
104306
- [require_device_type.DeviceType.PetFeeder]: FEEDER_LAYOUT,
104307
- [require_device_type.DeviceType.PetFountain]: FOUNTAIN_LAYOUT,
104308
- [require_device_type.DeviceType.Dishwasher]: DISHWASHER_LAYOUT,
104309
- [require_device_type.DeviceType.Washer]: APPLIANCE_LAYOUT,
104310
- [require_device_type.DeviceType.Heater]: HEATER_LAYOUT,
104311
- [require_device_type.DeviceType.Dryer]: APPLIANCE_LAYOUT,
104312
- [require_device_type.DeviceType.Gateway]: HERO_LAYOUT_DEFAULT
104184
+ [require_composed_stable_id.DeviceType.Camera]: HERO_LAYOUT_DEFAULT,
104185
+ [require_composed_stable_id.DeviceType.Hub]: HERO_LAYOUT_DEFAULT,
104186
+ [require_composed_stable_id.DeviceType.Light]: LIGHT_LAYOUT,
104187
+ [require_composed_stable_id.DeviceType.Siren]: HERO_LAYOUT_DEFAULT,
104188
+ [require_composed_stable_id.DeviceType.Switch]: SWITCH_LAYOUT,
104189
+ [require_composed_stable_id.DeviceType.Sensor]: HERO_LAYOUT_DEFAULT,
104190
+ [require_composed_stable_id.DeviceType.Thermostat]: CLIMATE_LAYOUT,
104191
+ [require_composed_stable_id.DeviceType.Climate]: CLIMATE_LAYOUT,
104192
+ [require_composed_stable_id.DeviceType.Button]: BUTTON_LAYOUT,
104193
+ [require_composed_stable_id.DeviceType.EventEmitter]: HERO_LAYOUT_DEFAULT,
104194
+ [require_composed_stable_id.DeviceType.Update]: UPDATE_LAYOUT,
104195
+ [require_composed_stable_id.DeviceType.Generic]: HERO_LAYOUT_DEFAULT,
104196
+ [require_composed_stable_id.DeviceType.Notifier]: HERO_LAYOUT_DEFAULT,
104197
+ [require_composed_stable_id.DeviceType.Script]: SCRIPT_LAYOUT,
104198
+ [require_composed_stable_id.DeviceType.Automation]: AUTOMATION_LAYOUT,
104199
+ [require_composed_stable_id.DeviceType.Lock]: LOCK_LAYOUT,
104200
+ [require_composed_stable_id.DeviceType.Cover]: COVER_LAYOUT,
104201
+ [require_composed_stable_id.DeviceType.Valve]: VALVE_LAYOUT,
104202
+ [require_composed_stable_id.DeviceType.Humidifier]: HUMIDIFIER_LAYOUT,
104203
+ [require_composed_stable_id.DeviceType.WaterHeater]: CLIMATE_LAYOUT,
104204
+ [require_composed_stable_id.DeviceType.HeatPump]: HEAT_PUMP_LAYOUT,
104205
+ [require_composed_stable_id.DeviceType.Fan]: FAN_LAYOUT,
104206
+ [require_composed_stable_id.DeviceType.MediaPlayer]: MEDIA_PLAYER_LAYOUT,
104207
+ [require_composed_stable_id.DeviceType.AlarmPanel]: ALARM_LAYOUT,
104208
+ [require_composed_stable_id.DeviceType.Control]: CONTROL_LAYOUT,
104209
+ [require_composed_stable_id.DeviceType.Presence]: HERO_LAYOUT_DEFAULT,
104210
+ [require_composed_stable_id.DeviceType.Weather]: HERO_LAYOUT_DEFAULT,
104211
+ [require_composed_stable_id.DeviceType.Vacuum]: VACUUM_LAYOUT,
104212
+ [require_composed_stable_id.DeviceType.LawnMower]: MOWER_LAYOUT,
104213
+ [require_composed_stable_id.DeviceType.Container]: HERO_LAYOUT_DEFAULT,
104214
+ [require_composed_stable_id.DeviceType.Image]: HERO_LAYOUT_DEFAULT,
104215
+ [require_composed_stable_id.DeviceType.PetFeeder]: FEEDER_LAYOUT,
104216
+ [require_composed_stable_id.DeviceType.PetFountain]: FOUNTAIN_LAYOUT,
104217
+ [require_composed_stable_id.DeviceType.Dishwasher]: DISHWASHER_LAYOUT,
104218
+ [require_composed_stable_id.DeviceType.Washer]: APPLIANCE_LAYOUT,
104219
+ [require_composed_stable_id.DeviceType.Heater]: HEATER_LAYOUT,
104220
+ [require_composed_stable_id.DeviceType.Dryer]: APPLIANCE_LAYOUT,
104221
+ [require_composed_stable_id.DeviceType.Gateway]: HERO_LAYOUT_DEFAULT
104313
104222
  };
104314
104223
  function isDeviceType$1(type) {
104315
- return Object.values(require_device_type.DeviceType).includes(type);
104224
+ return Object.values(require_composed_stable_id.DeviceType).includes(type);
104316
104225
  }
104317
104226
  /** The layout of a type; a type this build does not know gets the default. */
104318
104227
  function resolveHeroLayout(type) {
@@ -104996,113 +104905,113 @@ var HERO_MODE_LOOK = {
104996
104905
  open: null,
104997
104906
  closed: null
104998
104907
  };
104999
- var MODE_LOOK_TYPES = [require_device_type.DeviceType.Climate, require_device_type.DeviceType.Thermostat];
104908
+ var MODE_LOOK_TYPES = [require_composed_stable_id.DeviceType.Climate, require_composed_stable_id.DeviceType.Thermostat];
105000
104909
  var HERO_LOOK_BY_TYPE = {
105001
- [require_device_type.DeviceType.Camera]: CAMERA_LOOK,
105002
- [require_device_type.DeviceType.Hub]: HERO_LOOK_DEFAULT,
105003
- [require_device_type.DeviceType.Light]: LIGHT_LOOK,
105004
- [require_device_type.DeviceType.Siren]: HERO_LOOK_DEFAULT,
105005
- [require_device_type.DeviceType.Switch]: SWITCH_LOOK,
105006
- [require_device_type.DeviceType.Sensor]: READING_SENSOR_LOOK,
105007
- [require_device_type.DeviceType.Thermostat]: THERMOSTAT_LOOK,
105008
- [require_device_type.DeviceType.Climate]: CLIMATE_LOOK,
105009
- [require_device_type.DeviceType.Button]: BUTTON_LOOK,
105010
- [require_device_type.DeviceType.EventEmitter]: EVENT_EMITTER_LOOK,
105011
- [require_device_type.DeviceType.Update]: UPDATE_LOOK,
105012
- [require_device_type.DeviceType.Generic]: HERO_LOOK_DEFAULT,
105013
- [require_device_type.DeviceType.Notifier]: HERO_LOOK_DEFAULT,
105014
- [require_device_type.DeviceType.Script]: SCRIPT_LOOK,
105015
- [require_device_type.DeviceType.Automation]: AUTOMATION_LOOK,
105016
- [require_device_type.DeviceType.Lock]: LOCK_LOOK,
105017
- [require_device_type.DeviceType.Cover]: COVER_LOOK,
105018
- [require_device_type.DeviceType.Valve]: VALVE_LOOK,
105019
- [require_device_type.DeviceType.Humidifier]: HUMIDIFIER_LOOK,
105020
- [require_device_type.DeviceType.WaterHeater]: WATER_HEATER_LOOK,
105021
- [require_device_type.DeviceType.HeatPump]: HEAT_PUMP_LOOK,
105022
- [require_device_type.DeviceType.Fan]: FAN_LOOK,
105023
- [require_device_type.DeviceType.MediaPlayer]: MEDIA_PLAYER_LOOK,
105024
- [require_device_type.DeviceType.AlarmPanel]: ALARM_LOOK,
105025
- [require_device_type.DeviceType.Control]: CONTROL_LOOK,
105026
- [require_device_type.DeviceType.Presence]: PRESENCE_LOOK,
105027
- [require_device_type.DeviceType.Weather]: WEATHER_LOOK,
105028
- [require_device_type.DeviceType.Vacuum]: VACUUM_LOOK,
105029
- [require_device_type.DeviceType.LawnMower]: MOWER_LOOK,
105030
- [require_device_type.DeviceType.Container]: HERO_LOOK_DEFAULT,
105031
- [require_device_type.DeviceType.Image]: IMAGE_LOOK,
105032
- [require_device_type.DeviceType.PetFeeder]: FEEDER_LOOK,
105033
- [require_device_type.DeviceType.PetFountain]: FOUNTAIN_LOOK,
105034
- [require_device_type.DeviceType.Dishwasher]: DISHWASHER_LOOK,
105035
- [require_device_type.DeviceType.Washer]: WASHER_LOOK,
105036
- [require_device_type.DeviceType.Heater]: HEATER_LOOK,
105037
- [require_device_type.DeviceType.Dryer]: DRYER_LOOK,
105038
- [require_device_type.DeviceType.Gateway]: HERO_LOOK_DEFAULT
104910
+ [require_composed_stable_id.DeviceType.Camera]: CAMERA_LOOK,
104911
+ [require_composed_stable_id.DeviceType.Hub]: HERO_LOOK_DEFAULT,
104912
+ [require_composed_stable_id.DeviceType.Light]: LIGHT_LOOK,
104913
+ [require_composed_stable_id.DeviceType.Siren]: HERO_LOOK_DEFAULT,
104914
+ [require_composed_stable_id.DeviceType.Switch]: SWITCH_LOOK,
104915
+ [require_composed_stable_id.DeviceType.Sensor]: READING_SENSOR_LOOK,
104916
+ [require_composed_stable_id.DeviceType.Thermostat]: THERMOSTAT_LOOK,
104917
+ [require_composed_stable_id.DeviceType.Climate]: CLIMATE_LOOK,
104918
+ [require_composed_stable_id.DeviceType.Button]: BUTTON_LOOK,
104919
+ [require_composed_stable_id.DeviceType.EventEmitter]: EVENT_EMITTER_LOOK,
104920
+ [require_composed_stable_id.DeviceType.Update]: UPDATE_LOOK,
104921
+ [require_composed_stable_id.DeviceType.Generic]: HERO_LOOK_DEFAULT,
104922
+ [require_composed_stable_id.DeviceType.Notifier]: HERO_LOOK_DEFAULT,
104923
+ [require_composed_stable_id.DeviceType.Script]: SCRIPT_LOOK,
104924
+ [require_composed_stable_id.DeviceType.Automation]: AUTOMATION_LOOK,
104925
+ [require_composed_stable_id.DeviceType.Lock]: LOCK_LOOK,
104926
+ [require_composed_stable_id.DeviceType.Cover]: COVER_LOOK,
104927
+ [require_composed_stable_id.DeviceType.Valve]: VALVE_LOOK,
104928
+ [require_composed_stable_id.DeviceType.Humidifier]: HUMIDIFIER_LOOK,
104929
+ [require_composed_stable_id.DeviceType.WaterHeater]: WATER_HEATER_LOOK,
104930
+ [require_composed_stable_id.DeviceType.HeatPump]: HEAT_PUMP_LOOK,
104931
+ [require_composed_stable_id.DeviceType.Fan]: FAN_LOOK,
104932
+ [require_composed_stable_id.DeviceType.MediaPlayer]: MEDIA_PLAYER_LOOK,
104933
+ [require_composed_stable_id.DeviceType.AlarmPanel]: ALARM_LOOK,
104934
+ [require_composed_stable_id.DeviceType.Control]: CONTROL_LOOK,
104935
+ [require_composed_stable_id.DeviceType.Presence]: PRESENCE_LOOK,
104936
+ [require_composed_stable_id.DeviceType.Weather]: WEATHER_LOOK,
104937
+ [require_composed_stable_id.DeviceType.Vacuum]: VACUUM_LOOK,
104938
+ [require_composed_stable_id.DeviceType.LawnMower]: MOWER_LOOK,
104939
+ [require_composed_stable_id.DeviceType.Container]: HERO_LOOK_DEFAULT,
104940
+ [require_composed_stable_id.DeviceType.Image]: IMAGE_LOOK,
104941
+ [require_composed_stable_id.DeviceType.PetFeeder]: FEEDER_LOOK,
104942
+ [require_composed_stable_id.DeviceType.PetFountain]: FOUNTAIN_LOOK,
104943
+ [require_composed_stable_id.DeviceType.Dishwasher]: DISHWASHER_LOOK,
104944
+ [require_composed_stable_id.DeviceType.Washer]: WASHER_LOOK,
104945
+ [require_composed_stable_id.DeviceType.Heater]: HEATER_LOOK,
104946
+ [require_composed_stable_id.DeviceType.Dryer]: DRYER_LOOK,
104947
+ [require_composed_stable_id.DeviceType.Gateway]: HERO_LOOK_DEFAULT
105039
104948
  };
105040
104949
  /** `inherit` = take the type's look. A role only REFINES a type; it never replaces the type system. */
105041
104950
  var HERO_LOOK_BY_ROLE = {
105042
- [require_device_type.DeviceRole.Siren]: "inherit",
105043
- [require_device_type.DeviceRole.Floodlight]: "inherit",
105044
- [require_device_type.DeviceRole.Spotlight]: "inherit",
105045
- [require_device_type.DeviceRole.PirSensor]: MOTION_LOOK,
105046
- [require_device_type.DeviceRole.Chime]: "inherit",
105047
- [require_device_type.DeviceRole.Autotrack]: "inherit",
105048
- [require_device_type.DeviceRole.Nightvision]: "inherit",
105049
- [require_device_type.DeviceRole.PrivacyMask]: "inherit",
105050
- [require_device_type.DeviceRole.Doorbell]: DOORBELL_LOOK,
105051
- [require_device_type.DeviceRole.CoverBlind]: "inherit",
105052
- [require_device_type.DeviceRole.CoverShutter]: "inherit",
105053
- [require_device_type.DeviceRole.CoverAwning]: "inherit",
105054
- [require_device_type.DeviceRole.CoverCurtain]: "inherit",
105055
- [require_device_type.DeviceRole.CoverGarage]: "inherit",
105056
- [require_device_type.DeviceRole.CoverGate]: "inherit",
105057
- [require_device_type.DeviceRole.CoverDoor]: "inherit",
105058
- [require_device_type.DeviceRole.CoverWindow]: "inherit",
105059
- [require_device_type.DeviceRole.BinaryHelper]: "inherit",
105060
- [require_device_type.DeviceRole.Outlet]: "inherit",
105061
- [require_device_type.DeviceRole.MotionSensor]: MOTION_LOOK,
105062
- [require_device_type.DeviceRole.ContactSensor]: "inherit",
105063
- [require_device_type.DeviceRole.LeakSensor]: LEAK_LOOK,
105064
- [require_device_type.DeviceRole.SmokeSensor]: SMOKE_LOOK,
105065
- [require_device_type.DeviceRole.COSensor]: CO_LOOK,
105066
- [require_device_type.DeviceRole.GasSensor]: GAS_LOOK,
105067
- [require_device_type.DeviceRole.TamperSensor]: TAMPER_LOOK,
105068
- [require_device_type.DeviceRole.VibrationSensor]: VIBRATION_LOOK,
105069
- [require_device_type.DeviceRole.ConnectivitySensor]: "inherit",
105070
- [require_device_type.DeviceRole.SoundSensor]: "inherit",
105071
- [require_device_type.DeviceRole.BinarySensor]: "inherit",
105072
- [require_device_type.DeviceRole.TemperatureSensor]: TEMPERATURE_LOOK,
105073
- [require_device_type.DeviceRole.HumiditySensor]: HUMIDITY_LOOK,
105074
- [require_device_type.DeviceRole.AmbientLightSensor]: LIGHT_SENSOR_LOOK,
105075
- [require_device_type.DeviceRole.PressureSensor]: READING_SENSOR_LOOK,
105076
- [require_device_type.DeviceRole.WindSensor]: "inherit",
105077
- [require_device_type.DeviceRole.RainSensor]: "inherit",
105078
- [require_device_type.DeviceRole.UvSensor]: "inherit",
105079
- [require_device_type.DeviceRole.SolarRadiationSensor]: "inherit",
105080
- [require_device_type.DeviceRole.SoilMoistureSensor]: "inherit",
105081
- [require_device_type.DeviceRole.PowerSensor]: "inherit",
105082
- [require_device_type.DeviceRole.EnergySensor]: "inherit",
105083
- [require_device_type.DeviceRole.VoltageSensor]: "inherit",
105084
- [require_device_type.DeviceRole.CurrentSensor]: "inherit",
105085
- [require_device_type.DeviceRole.AirQualitySensor]: AIR_QUALITY_LOOK,
105086
- [require_device_type.DeviceRole.BatterySensor]: "inherit",
105087
- [require_device_type.DeviceRole.NumericSensor]: "inherit",
105088
- [require_device_type.DeviceRole.EnumSensor]: "inherit",
105089
- [require_device_type.DeviceRole.DateTimeSensor]: "inherit",
105090
- [require_device_type.DeviceRole.GenericSensor]: "inherit",
105091
- [require_device_type.DeviceRole.NumericControl]: "inherit",
105092
- [require_device_type.DeviceRole.SelectControl]: "inherit",
105093
- [require_device_type.DeviceRole.TextControl]: "inherit",
105094
- [require_device_type.DeviceRole.DateTimeControl]: "inherit",
105095
- [require_device_type.DeviceRole.MobilePushNotifier]: "inherit",
105096
- [require_device_type.DeviceRole.MessagingNotifier]: "inherit",
105097
- [require_device_type.DeviceRole.EmailNotifier]: "inherit",
105098
- [require_device_type.DeviceRole.GenericNotifier]: "inherit",
105099
- [require_device_type.DeviceRole.IrTransmitter]: "inherit"
104951
+ [require_composed_stable_id.DeviceRole.Siren]: "inherit",
104952
+ [require_composed_stable_id.DeviceRole.Floodlight]: "inherit",
104953
+ [require_composed_stable_id.DeviceRole.Spotlight]: "inherit",
104954
+ [require_composed_stable_id.DeviceRole.PirSensor]: MOTION_LOOK,
104955
+ [require_composed_stable_id.DeviceRole.Chime]: "inherit",
104956
+ [require_composed_stable_id.DeviceRole.Autotrack]: "inherit",
104957
+ [require_composed_stable_id.DeviceRole.Nightvision]: "inherit",
104958
+ [require_composed_stable_id.DeviceRole.PrivacyMask]: "inherit",
104959
+ [require_composed_stable_id.DeviceRole.Doorbell]: DOORBELL_LOOK,
104960
+ [require_composed_stable_id.DeviceRole.CoverBlind]: "inherit",
104961
+ [require_composed_stable_id.DeviceRole.CoverShutter]: "inherit",
104962
+ [require_composed_stable_id.DeviceRole.CoverAwning]: "inherit",
104963
+ [require_composed_stable_id.DeviceRole.CoverCurtain]: "inherit",
104964
+ [require_composed_stable_id.DeviceRole.CoverGarage]: "inherit",
104965
+ [require_composed_stable_id.DeviceRole.CoverGate]: "inherit",
104966
+ [require_composed_stable_id.DeviceRole.CoverDoor]: "inherit",
104967
+ [require_composed_stable_id.DeviceRole.CoverWindow]: "inherit",
104968
+ [require_composed_stable_id.DeviceRole.BinaryHelper]: "inherit",
104969
+ [require_composed_stable_id.DeviceRole.Outlet]: "inherit",
104970
+ [require_composed_stable_id.DeviceRole.MotionSensor]: MOTION_LOOK,
104971
+ [require_composed_stable_id.DeviceRole.ContactSensor]: "inherit",
104972
+ [require_composed_stable_id.DeviceRole.LeakSensor]: LEAK_LOOK,
104973
+ [require_composed_stable_id.DeviceRole.SmokeSensor]: SMOKE_LOOK,
104974
+ [require_composed_stable_id.DeviceRole.COSensor]: CO_LOOK,
104975
+ [require_composed_stable_id.DeviceRole.GasSensor]: GAS_LOOK,
104976
+ [require_composed_stable_id.DeviceRole.TamperSensor]: TAMPER_LOOK,
104977
+ [require_composed_stable_id.DeviceRole.VibrationSensor]: VIBRATION_LOOK,
104978
+ [require_composed_stable_id.DeviceRole.ConnectivitySensor]: "inherit",
104979
+ [require_composed_stable_id.DeviceRole.SoundSensor]: "inherit",
104980
+ [require_composed_stable_id.DeviceRole.BinarySensor]: "inherit",
104981
+ [require_composed_stable_id.DeviceRole.TemperatureSensor]: TEMPERATURE_LOOK,
104982
+ [require_composed_stable_id.DeviceRole.HumiditySensor]: HUMIDITY_LOOK,
104983
+ [require_composed_stable_id.DeviceRole.AmbientLightSensor]: LIGHT_SENSOR_LOOK,
104984
+ [require_composed_stable_id.DeviceRole.PressureSensor]: READING_SENSOR_LOOK,
104985
+ [require_composed_stable_id.DeviceRole.WindSensor]: "inherit",
104986
+ [require_composed_stable_id.DeviceRole.RainSensor]: "inherit",
104987
+ [require_composed_stable_id.DeviceRole.UvSensor]: "inherit",
104988
+ [require_composed_stable_id.DeviceRole.SolarRadiationSensor]: "inherit",
104989
+ [require_composed_stable_id.DeviceRole.SoilMoistureSensor]: "inherit",
104990
+ [require_composed_stable_id.DeviceRole.PowerSensor]: "inherit",
104991
+ [require_composed_stable_id.DeviceRole.EnergySensor]: "inherit",
104992
+ [require_composed_stable_id.DeviceRole.VoltageSensor]: "inherit",
104993
+ [require_composed_stable_id.DeviceRole.CurrentSensor]: "inherit",
104994
+ [require_composed_stable_id.DeviceRole.AirQualitySensor]: AIR_QUALITY_LOOK,
104995
+ [require_composed_stable_id.DeviceRole.BatterySensor]: "inherit",
104996
+ [require_composed_stable_id.DeviceRole.NumericSensor]: "inherit",
104997
+ [require_composed_stable_id.DeviceRole.EnumSensor]: "inherit",
104998
+ [require_composed_stable_id.DeviceRole.DateTimeSensor]: "inherit",
104999
+ [require_composed_stable_id.DeviceRole.GenericSensor]: "inherit",
105000
+ [require_composed_stable_id.DeviceRole.NumericControl]: "inherit",
105001
+ [require_composed_stable_id.DeviceRole.SelectControl]: "inherit",
105002
+ [require_composed_stable_id.DeviceRole.TextControl]: "inherit",
105003
+ [require_composed_stable_id.DeviceRole.DateTimeControl]: "inherit",
105004
+ [require_composed_stable_id.DeviceRole.MobilePushNotifier]: "inherit",
105005
+ [require_composed_stable_id.DeviceRole.MessagingNotifier]: "inherit",
105006
+ [require_composed_stable_id.DeviceRole.EmailNotifier]: "inherit",
105007
+ [require_composed_stable_id.DeviceRole.GenericNotifier]: "inherit",
105008
+ [require_composed_stable_id.DeviceRole.IrTransmitter]: "inherit"
105100
105009
  };
105101
105010
  function isDeviceType(type) {
105102
- return Object.values(require_device_type.DeviceType).includes(type);
105011
+ return Object.values(require_composed_stable_id.DeviceType).includes(type);
105103
105012
  }
105104
105013
  function isDeviceRole(role) {
105105
- return Object.values(require_device_type.DeviceRole).includes(role);
105014
+ return Object.values(require_composed_stable_id.DeviceRole).includes(role);
105106
105015
  }
105107
105016
  /**
105108
105017
  * The look of a (role, type) pair, for a state. Role beats type beats the generic default.
@@ -105276,11 +105185,11 @@ function tilesOf(fragments, side) {
105276
105185
  /** The foot button that opens the history, named for what the device keeps. */
105277
105186
  function historyLabelOf(type) {
105278
105187
  switch (type) {
105279
- case require_device_type.DeviceType.Washer:
105280
- case require_device_type.DeviceType.Dryer:
105281
- case require_device_type.DeviceType.Dishwasher: return require_sleep.t("Cycles", "Cicli");
105282
- case require_device_type.DeviceType.PetFeeder: return require_sleep.t("Meals", "Pasti");
105283
- case require_device_type.DeviceType.Lock: return require_sleep.t("Access", "Accessi");
105188
+ case require_composed_stable_id.DeviceType.Washer:
105189
+ case require_composed_stable_id.DeviceType.Dryer:
105190
+ case require_composed_stable_id.DeviceType.Dishwasher: return require_sleep.t("Cycles", "Cicli");
105191
+ case require_composed_stable_id.DeviceType.PetFeeder: return require_sleep.t("Meals", "Pasti");
105192
+ case require_composed_stable_id.DeviceType.Lock: return require_sleep.t("Access", "Accessi");
105284
105193
  default: return require_sleep.t("History", "Storico");
105285
105194
  }
105286
105195
  }
@@ -116441,7 +116350,7 @@ function bakedArgsEqual(action, args) {
116441
116350
  * filters to what the device actually binds.
116442
116351
  */
116443
116352
  var DEVICE_TYPE_DO_CAPS = {
116444
- [require_device_type.DeviceType.Camera]: [
116353
+ [require_composed_stable_id.DeviceType.Camera]: [
116445
116354
  "ptz",
116446
116355
  "ptz-autotrack",
116447
116356
  "privacy-mask",
@@ -116449,43 +116358,43 @@ var DEVICE_TYPE_DO_CAPS = {
116449
116358
  "reboot",
116450
116359
  "motion-trigger"
116451
116360
  ],
116452
- [require_device_type.DeviceType.Hub]: [],
116453
- [require_device_type.DeviceType.Light]: ["switch", "brightness"],
116454
- [require_device_type.DeviceType.Siren]: ["switch", "motion-trigger"],
116455
- [require_device_type.DeviceType.Switch]: ["switch", "motion-trigger"],
116456
- [require_device_type.DeviceType.Sensor]: [],
116457
- [require_device_type.DeviceType.Thermostat]: ["climate-control"],
116458
- [require_device_type.DeviceType.Climate]: ["climate-control"],
116459
- [require_device_type.DeviceType.Button]: ["button"],
116460
- [require_device_type.DeviceType.EventEmitter]: [],
116461
- [require_device_type.DeviceType.Update]: [],
116462
- [require_device_type.DeviceType.Generic]: [],
116463
- [require_device_type.DeviceType.Notifier]: [],
116464
- [require_device_type.DeviceType.Script]: ["script-runner"],
116465
- [require_device_type.DeviceType.Automation]: ["automation-control"],
116466
- [require_device_type.DeviceType.Lock]: ["lock-control"],
116467
- [require_device_type.DeviceType.Cover]: ["cover"],
116468
- [require_device_type.DeviceType.Valve]: ["valve"],
116469
- [require_device_type.DeviceType.Humidifier]: ["humidifier"],
116470
- [require_device_type.DeviceType.WaterHeater]: ["water-heater"],
116471
- [require_device_type.DeviceType.HeatPump]: ["heat-pump-control"],
116472
- [require_device_type.DeviceType.Fan]: ["fan-control", "switch"],
116473
- [require_device_type.DeviceType.MediaPlayer]: ["media-player"],
116474
- [require_device_type.DeviceType.AlarmPanel]: ["alarm-panel"],
116475
- [require_device_type.DeviceType.Control]: [],
116476
- [require_device_type.DeviceType.Presence]: [],
116477
- [require_device_type.DeviceType.Weather]: [],
116478
- [require_device_type.DeviceType.Vacuum]: ["vacuum-control"],
116479
- [require_device_type.DeviceType.LawnMower]: ["lawn-mower-control"],
116480
- [require_device_type.DeviceType.Container]: [],
116481
- [require_device_type.DeviceType.Image]: [],
116482
- [require_device_type.DeviceType.PetFeeder]: ["pet-feeder"],
116483
- [require_device_type.DeviceType.PetFountain]: ["pet-fountain", "timed-run"],
116484
- [require_device_type.DeviceType.Heater]: ["switch", "timed-run"],
116485
- [require_device_type.DeviceType.Dishwasher]: ["dishwasher"],
116486
- [require_device_type.DeviceType.Washer]: [],
116487
- [require_device_type.DeviceType.Dryer]: [],
116488
- [require_device_type.DeviceType.Gateway]: []
116361
+ [require_composed_stable_id.DeviceType.Hub]: [],
116362
+ [require_composed_stable_id.DeviceType.Light]: ["switch", "brightness"],
116363
+ [require_composed_stable_id.DeviceType.Siren]: ["switch", "motion-trigger"],
116364
+ [require_composed_stable_id.DeviceType.Switch]: ["switch", "motion-trigger"],
116365
+ [require_composed_stable_id.DeviceType.Sensor]: [],
116366
+ [require_composed_stable_id.DeviceType.Thermostat]: ["climate-control"],
116367
+ [require_composed_stable_id.DeviceType.Climate]: ["climate-control"],
116368
+ [require_composed_stable_id.DeviceType.Button]: ["button"],
116369
+ [require_composed_stable_id.DeviceType.EventEmitter]: [],
116370
+ [require_composed_stable_id.DeviceType.Update]: [],
116371
+ [require_composed_stable_id.DeviceType.Generic]: [],
116372
+ [require_composed_stable_id.DeviceType.Notifier]: [],
116373
+ [require_composed_stable_id.DeviceType.Script]: ["script-runner"],
116374
+ [require_composed_stable_id.DeviceType.Automation]: ["automation-control"],
116375
+ [require_composed_stable_id.DeviceType.Lock]: ["lock-control"],
116376
+ [require_composed_stable_id.DeviceType.Cover]: ["cover"],
116377
+ [require_composed_stable_id.DeviceType.Valve]: ["valve"],
116378
+ [require_composed_stable_id.DeviceType.Humidifier]: ["humidifier"],
116379
+ [require_composed_stable_id.DeviceType.WaterHeater]: ["water-heater"],
116380
+ [require_composed_stable_id.DeviceType.HeatPump]: ["heat-pump-control"],
116381
+ [require_composed_stable_id.DeviceType.Fan]: ["fan-control", "switch"],
116382
+ [require_composed_stable_id.DeviceType.MediaPlayer]: ["media-player"],
116383
+ [require_composed_stable_id.DeviceType.AlarmPanel]: ["alarm-panel"],
116384
+ [require_composed_stable_id.DeviceType.Control]: [],
116385
+ [require_composed_stable_id.DeviceType.Presence]: [],
116386
+ [require_composed_stable_id.DeviceType.Weather]: [],
116387
+ [require_composed_stable_id.DeviceType.Vacuum]: ["vacuum-control"],
116388
+ [require_composed_stable_id.DeviceType.LawnMower]: ["lawn-mower-control"],
116389
+ [require_composed_stable_id.DeviceType.Container]: [],
116390
+ [require_composed_stable_id.DeviceType.Image]: [],
116391
+ [require_composed_stable_id.DeviceType.PetFeeder]: ["pet-feeder"],
116392
+ [require_composed_stable_id.DeviceType.PetFountain]: ["pet-fountain", "timed-run"],
116393
+ [require_composed_stable_id.DeviceType.Heater]: ["switch", "timed-run"],
116394
+ [require_composed_stable_id.DeviceType.Dishwasher]: ["dishwasher"],
116395
+ [require_composed_stable_id.DeviceType.Washer]: [],
116396
+ [require_composed_stable_id.DeviceType.Dryer]: [],
116397
+ [require_composed_stable_id.DeviceType.Gateway]: []
116489
116398
  };
116490
116399
  /**
116491
116400
  * Whether a device type belongs in a Do / automation action device picker.
@@ -116494,7 +116403,7 @@ var DEVICE_TYPE_DO_CAPS = {
116494
116403
  * but must never appear as selectable targets — actuate the children instead.
116495
116404
  */
116496
116405
  function isDoPickerDeviceType(type) {
116497
- return type !== require_device_type.DeviceType.Container;
116406
+ return type !== require_composed_stable_id.DeviceType.Container;
116498
116407
  }
116499
116408
  /**
116500
116409
  * Do-picker family id — devices that share one may be multi-selected for
@@ -116505,18 +116414,18 @@ function isDoPickerDeviceType(type) {
116505
116414
  */
116506
116415
  function deviceDoFamily(type) {
116507
116416
  switch (type) {
116508
- case require_device_type.DeviceType.Climate:
116509
- case require_device_type.DeviceType.Thermostat:
116510
- case require_device_type.DeviceType.Humidifier:
116511
- case require_device_type.DeviceType.WaterHeater:
116512
- case require_device_type.DeviceType.HeatPump: return "climate-family";
116513
- case require_device_type.DeviceType.Cover:
116514
- case require_device_type.DeviceType.Valve: return "cover-family";
116515
- case require_device_type.DeviceType.Switch:
116516
- case require_device_type.DeviceType.Siren:
116517
- case require_device_type.DeviceType.Light: return "switch-family";
116518
- case require_device_type.DeviceType.Vacuum:
116519
- case require_device_type.DeviceType.LawnMower: return "robot-family";
116417
+ case require_composed_stable_id.DeviceType.Climate:
116418
+ case require_composed_stable_id.DeviceType.Thermostat:
116419
+ case require_composed_stable_id.DeviceType.Humidifier:
116420
+ case require_composed_stable_id.DeviceType.WaterHeater:
116421
+ case require_composed_stable_id.DeviceType.HeatPump: return "climate-family";
116422
+ case require_composed_stable_id.DeviceType.Cover:
116423
+ case require_composed_stable_id.DeviceType.Valve: return "cover-family";
116424
+ case require_composed_stable_id.DeviceType.Switch:
116425
+ case require_composed_stable_id.DeviceType.Siren:
116426
+ case require_composed_stable_id.DeviceType.Light: return "switch-family";
116427
+ case require_composed_stable_id.DeviceType.Vacuum:
116428
+ case require_composed_stable_id.DeviceType.LawnMower: return "robot-family";
116520
116429
  default: return type;
116521
116430
  }
116522
116431
  }
@@ -116541,7 +116450,7 @@ function actionsForBoundCaps(boundCaps) {
116541
116450
  * Unknown type strings → empty.
116542
116451
  */
116543
116452
  function actionsForDeviceType(type) {
116544
- if (!Object.values(require_device_type.DeviceType).includes(type)) return [];
116453
+ if (!Object.values(require_composed_stable_id.DeviceType).includes(type)) return [];
116545
116454
  return actionsForBoundCaps(DEVICE_TYPE_DO_CAPS[type]);
116546
116455
  }
116547
116456
  /**
@@ -116867,7 +116776,7 @@ function deviceMatchesProfile(features, profile) {
116867
116776
  var BATTERY_DEVICE_PROFILE = {
116868
116777
  id: "battery",
116869
116778
  label: "Battery-operated camera",
116870
- when: { hasFeature: require_device_type.DeviceFeature.BatteryOperated },
116779
+ when: { hasFeature: require_composed_stable_id.DeviceFeature.BatteryOperated },
116871
116780
  defaults: {
116872
116781
  audioMode: "disabled",
116873
116782
  detectionMode: "on-motion"
@@ -116897,9 +116806,9 @@ function resolveDeviceProfile(features) {
116897
116806
  * export cannot honour yet, so they are named and withheld.
116898
116807
  */
116899
116808
  var PLUG_APPLIANCE_TYPES = [
116900
- require_device_type.DeviceType.Washer,
116901
- require_device_type.DeviceType.Dryer,
116902
- require_device_type.DeviceType.Dishwasher
116809
+ require_composed_stable_id.DeviceType.Washer,
116810
+ require_composed_stable_id.DeviceType.Dryer,
116811
+ require_composed_stable_id.DeviceType.Dishwasher
116903
116812
  ];
116904
116813
  var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
116905
116814
  var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
@@ -116908,15 +116817,15 @@ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A pow
116908
116817
  var MATTER_REASON = "No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.";
116909
116818
  function withheld(reason) {
116910
116819
  return {
116911
- [require_device_type.DeviceType.Washer]: {
116820
+ [require_composed_stable_id.DeviceType.Washer]: {
116912
116821
  exported: false,
116913
116822
  reason
116914
116823
  },
116915
- [require_device_type.DeviceType.Dryer]: {
116824
+ [require_composed_stable_id.DeviceType.Dryer]: {
116916
116825
  exported: false,
116917
116826
  reason
116918
116827
  },
116919
- [require_device_type.DeviceType.Dishwasher]: {
116828
+ [require_composed_stable_id.DeviceType.Dishwasher]: {
116920
116829
  exported: false,
116921
116830
  reason
116922
116831
  }
@@ -116924,15 +116833,15 @@ function withheld(reason) {
116924
116833
  }
116925
116834
  function offered(received) {
116926
116835
  return {
116927
- [require_device_type.DeviceType.Washer]: {
116836
+ [require_composed_stable_id.DeviceType.Washer]: {
116928
116837
  exported: true,
116929
116838
  as: received
116930
116839
  },
116931
- [require_device_type.DeviceType.Dryer]: {
116840
+ [require_composed_stable_id.DeviceType.Dryer]: {
116932
116841
  exported: true,
116933
116842
  as: received
116934
116843
  },
116935
- [require_device_type.DeviceType.Dishwasher]: {
116844
+ [require_composed_stable_id.DeviceType.Dishwasher]: {
116936
116845
  exported: true,
116937
116846
  as: received
116938
116847
  }
@@ -122896,11 +122805,6 @@ function createSystemProxy(api) {
122896
122805
  updateRule: (input) => dispatch("notificationRules", "updateRule", "mutation", input),
122897
122806
  deleteRule: (input) => dispatch("notificationRules", "deleteRule", "mutation", input),
122898
122807
  setRuleEnabled: (input) => dispatch("notificationRules", "setRuleEnabled", "mutation", input),
122899
- listSequences: (input) => dispatch("notificationRules", "listSequences", "query", input),
122900
- getSequence: (input) => dispatch("notificationRules", "getSequence", "query", input),
122901
- createSequence: (input) => dispatch("notificationRules", "createSequence", "mutation", input),
122902
- updateSequence: (input) => dispatch("notificationRules", "updateSequence", "mutation", input),
122903
- deleteSequence: (input) => dispatch("notificationRules", "deleteSequence", "mutation", input),
122904
122808
  getClipRetentionAsks: (input) => dispatch("notificationRules", "getClipRetentionAsks", "query", input),
122905
122809
  listDeviceMutes: (input) => dispatch("notificationRules", "listDeviceMutes", "query", input),
122906
122810
  testRule: (input) => dispatch("notificationRules", "testRule", "mutation", input),
@@ -125472,12 +125376,8 @@ var NC_ALARM_CONTROLLABLE_CAPS = [
125472
125376
  function isAlarmControllableCap(cap) {
125473
125377
  return NC_ALARM_CONTROLLABLE_CAPS.includes(cap);
125474
125378
  }
125475
- function bindingPullsAlarmTrigger(binding, sequenceActionsOf) {
125476
- if (binding.kind === "do") {
125477
- const action = binding.action;
125478
- return action.kind === "cap" && action.cap === ALARM_PANEL_CAP && action.method === ALARM_PANEL_TRIGGER_METHOD;
125479
- }
125480
- const steps = sequenceActionsOf?.(binding.sequenceId);
125379
+ function actionPullsAlarmTrigger(actionId, actionStepsOf) {
125380
+ const steps = actionStepsOf?.(actionId);
125481
125381
  if (steps === void 0) return false;
125482
125382
  return steps.some((step) => step.kind === "cap" && step.cap === ALARM_PANEL_CAP && step.method === ALARM_PANEL_TRIGGER_METHOD);
125483
125383
  }
@@ -125487,19 +125387,19 @@ function ruleGatedOnArmedState(rule) {
125487
125387
  }
125488
125388
  /**
125489
125389
  * A rule belongs to the alarm when its `deviceState` gate names ANY device's
125490
- * `armed_*` word, or an on-match binding pulls the alarm panel's trigger
125491
- * (D630). Button-only sequences do NOT count — they are not an automatic
125390
+ * `armed_*` word, or an on-match Action pulls the alarm panel's trigger
125391
+ * (D630). Button-only Actions do NOT count — they are not an automatic
125492
125392
  * escalation.
125493
125393
  */
125494
125394
  function ruleBelongsToAlarm(rule) {
125495
125395
  if (ruleGatedOnArmedState(rule)) return true;
125496
- for (const binding of rule.actions?.onTrigger ?? []) if (bindingPullsAlarmTrigger(binding, rule.sequenceActionsOf)) return true;
125396
+ for (const actionId of rule.actions?.onTrigger ?? []) if (actionPullsAlarmTrigger(actionId, rule.actionStepsOf)) return true;
125497
125397
  return false;
125498
125398
  }
125499
125399
  /**
125500
125400
  * A rule gated on `armed_*` auto-triggers the CamStack `alarm-panel` on match
125501
- * — no `onTrigger` sequence required. Sirens are never part of this path.
125502
- * An explicit `alarm-panel.trigger` binding without an armed gate stays
125401
+ * — no `onTrigger` Action required. Sirens are never part of this path.
125402
+ * An explicit `alarm-panel.trigger` step without an armed gate stays
125503
125403
  * explicit actuation only ({@link ruleBelongsToAlarm}).
125504
125404
  */
125505
125405
  function ruleAutoTriggersAlarm(rule) {
@@ -132598,7 +132498,7 @@ var OrphanIntegrationSweep = class {
132598
132498
  } catch (err) {
132599
132499
  this.#logger.warn("Orphan integration device removal failed — kept as suspect", { meta: {
132600
132500
  integrationId: id,
132601
- error: require_device_type.errMsg(err)
132501
+ error: require_composed_stable_id.errMsg(err)
132602
132502
  } });
132603
132503
  }
132604
132504
  }
@@ -133879,7 +133779,7 @@ async function runInferenceStep(fn, timeoutMs) {
133879
133779
  output: void 0,
133880
133780
  durationMs: roundMs(performance.now() - t0),
133881
133781
  ok: false,
133882
- error: require_device_type.errMsg(err)
133782
+ error: require_composed_stable_id.errMsg(err)
133883
133783
  };
133884
133784
  }
133885
133785
  }
@@ -134453,7 +134353,7 @@ async function reconcileRemovedDevices(opts) {
134453
134353
  try {
134454
134354
  tombstones = await api.deviceManager.listDeletedSince.query({ sinceMs: now() - DEVICE_TOMBSTONE_RETENTION_MS });
134455
134355
  } catch (err) {
134456
- opts.logger.warn("device removal reconcile skipped — tombstones unreadable, nothing deleted", { meta: { error: require_device_type.errMsg(err) } });
134356
+ opts.logger.warn("device removal reconcile skipped — tombstones unreadable, nothing deleted", { meta: { error: require_composed_stable_id.errMsg(err) } });
134457
134357
  return {
134458
134358
  read: false,
134459
134359
  applied: 0,
@@ -134476,7 +134376,7 @@ async function reconcileRemovedDevices(opts) {
134476
134376
  failed += 1;
134477
134377
  opts.logger.warn("device removal reconcile failed for a device — retried next pass", {
134478
134378
  tags: { deviceId: tombstone.deviceId },
134479
- meta: { error: require_device_type.errMsg(err) }
134379
+ meta: { error: require_composed_stable_id.errMsg(err) }
134480
134380
  });
134481
134381
  }
134482
134382
  return {
@@ -134495,7 +134395,7 @@ function armRemovalReconcile(opts) {
134495
134395
  if (running) return;
134496
134396
  running = true;
134497
134397
  reconcileRemovedDevices(opts).catch((err) => {
134498
- opts.logger.warn("device removal reconcile pass crashed", { meta: { error: require_device_type.errMsg(err) } });
134398
+ opts.logger.warn("device removal reconcile pass crashed", { meta: { error: require_composed_stable_id.errMsg(err) } });
134499
134399
  }).finally(() => {
134500
134400
  running = false;
134501
134401
  });
@@ -134981,6 +134881,7 @@ exports.ActionError = ActionError;
134981
134881
  exports.ActionErrorCodeSchema = ActionErrorCodeSchema;
134982
134882
  exports.ActionInputSchema = ActionInputSchema;
134983
134883
  exports.ActionLinksSchema = ActionLinksSchema;
134884
+ exports.ActionMinDelaySecSchema = ActionMinDelaySecSchema;
134984
134885
  exports.ActionRunChangedSchema = ActionRunChangedSchema;
134985
134886
  exports.ActionRunOriginSchema = ActionRunOriginSchema;
134986
134887
  exports.ActionRunOutcomeSchema = ActionRunOutcomeSchema;
@@ -135184,7 +135085,7 @@ exports.CLUSTER_MODEL_SECTION_ID = CLUSTER_MODEL_SECTION_ID;
135184
135085
  exports.CLUSTER_STEP_SETTING_FIELDS = CLUSTER_STEP_SETTING_FIELDS;
135185
135086
  exports.COCO_80_LABELS = COCO_80_LABELS;
135186
135087
  exports.COCO_TO_MACRO = COCO_TO_MACRO;
135187
- exports.COMPOSED_DEVICE_STABLE_ID_PREFIX = require_composition.COMPOSED_DEVICE_STABLE_ID_PREFIX;
135088
+ exports.COMPOSED_DEVICE_STABLE_ID_PREFIX = require_composed_stable_id.COMPOSED_DEVICE_STABLE_ID_PREFIX;
135188
135089
  exports.COMPOSED_ITEM_FIXED_FIELDS = COMPOSED_ITEM_FIXED_FIELDS;
135189
135090
  exports.COMPOSER_ADDON_ID = require_composition.COMPOSER_ADDON_ID;
135190
135091
  exports.COMPOSER_RUNNER_ID = COMPOSER_RUNNER_ID;
@@ -135195,6 +135096,7 @@ exports.COMPOSITION_LINK_KINDS = COMPOSITION_LINK_KINDS;
135195
135096
  exports.COMPOSITION_TARGET_CAP_NAMES = COMPOSITION_TARGET_CAP_NAMES;
135196
135097
  exports.CONNECTION_TEST_TIMEOUT_MS = CONNECTION_TEST_TIMEOUT_MS;
135197
135098
  exports.CONTAINER_CHILD_PRIORITY = CONTAINER_CHILD_PRIORITY;
135099
+ exports.CONTAINER_PRIMARY_CHILD_RULES = CONTAINER_PRIMARY_CHILD_RULES;
135198
135100
  exports.CORAL_DEFAULT_MODEL_ID = CORAL_DEFAULT_MODEL_ID;
135199
135101
  exports.CORE_BLOCKS_ADDON_ID = CORE_BLOCKS_ADDON_ID;
135200
135102
  exports.CORE_BLOCK_ADDON_PREFIX = CORE_BLOCK_ADDON_PREFIX;
@@ -135273,7 +135175,7 @@ exports.CapacitySourceSchema = CapacitySourceSchema;
135273
135175
  exports.CarbonMonoxideStatusSchema = CarbonMonoxideStatusSchema;
135274
135176
  exports.CatalogFileSchema = CatalogFileSchema;
135275
135177
  exports.CatalogLangSchema = CatalogLangSchema;
135276
- exports.ChargingStatus = require_device_type.ChargingStatus;
135178
+ exports.ChargingStatus = require_composed_stable_id.ChargingStatus;
135277
135179
  exports.ClaimOutcomeSchema = ClaimOutcomeSchema;
135278
135180
  exports.ClaimsListingSchema = ClaimsListingSchema;
135279
135181
  exports.CleanupDeletedDevicesResultSchema = CleanupDeletedDevicesResultSchema;
@@ -135551,7 +135453,7 @@ exports.DeviceExportExposeInputSchema = ExposeInputSchema;
135551
135453
  exports.DeviceExportInstancePinSchema = InstancePinSchema;
135552
135454
  exports.DeviceExportStatusSchema = DeviceExportStatusSchema;
135553
135455
  exports.DeviceExportUnexposeInputSchema = UnexposeInputSchema;
135554
- exports.DeviceFeature = require_device_type.DeviceFeature;
135456
+ exports.DeviceFeature = require_composed_stable_id.DeviceFeature;
135555
135457
  exports.DeviceHistoryKindSchema = DeviceHistoryKindSchema;
135556
135458
  exports.DeviceHistoryOrphanDeleteRefusalSchema = DeviceHistoryOrphanDeleteRefusalSchema;
135557
135459
  exports.DeviceHistoryOrphanReasonSchema = DeviceHistoryOrphanReasonSchema;
@@ -135571,7 +135473,7 @@ exports.DeviceRefusalSchema = DeviceRefusalSchema;
135571
135473
  exports.DeviceRemovedInputSchema = DeviceRemovedInputSchema;
135572
135474
  exports.DeviceRemovedResultSchema = DeviceRemovedResultSchema;
135573
135475
  exports.DeviceRestoreRetryScheduler = DeviceRestoreRetryScheduler;
135574
- exports.DeviceRole = require_device_type.DeviceRole;
135476
+ exports.DeviceRole = require_composed_stable_id.DeviceRole;
135575
135477
  exports.DeviceRunDetailSchema = DeviceRunDetailSchema;
135576
135478
  exports.DeviceRunEnergyMethodSchema = DeviceRunEnergyMethodSchema;
135577
135479
  exports.DeviceRunKindSchema = DeviceRunKindSchema;
@@ -135590,7 +135492,7 @@ exports.DeviceTemplateSchema = DeviceTemplateSchema;
135590
135492
  exports.DeviceTemplateTraceEntrySchema = DeviceTemplateTraceEntrySchema;
135591
135493
  exports.DeviceTombstoneSchema = DeviceTombstoneSchema;
135592
135494
  exports.DeviceTransitionSchema = require_sleep.DeviceTransitionSchema;
135593
- exports.DeviceType = require_device_type.DeviceType;
135495
+ exports.DeviceType = require_composed_stable_id.DeviceType;
135594
135496
  exports.DiagnosticIdSchema = DiagnosticIdSchema;
135595
135497
  exports.DiagnosticWindowPatchSchema = DiagnosticWindowPatchSchema;
135596
135498
  exports.DiagnosticWindowSchema = DiagnosticWindowSchema;
@@ -136332,7 +136234,7 @@ exports.NavigationMoveCommandSchema = NavigationMoveCommandSchema;
136332
136234
  exports.NavigationPointSchema = NavigationPointSchema;
136333
136235
  exports.NavigationRuntimeStateSchema = NavigationRuntimeStateSchema;
136334
136236
  exports.NavigationStatusSchema = NavigationStatusSchema;
136335
- exports.NcActionBindingSchema = NcActionBindingSchema;
136237
+ exports.NcActionIdSchema = NcActionIdSchema;
136336
136238
  exports.NcAlarmBlockingEditSchema = NcAlarmBlockingEditSchema;
136337
136239
  exports.NcAlarmBlockingSchema = NcAlarmBlockingSchema;
136338
136240
  exports.NcAlarmConfigSchema = NcAlarmConfigSchema;
@@ -136373,16 +136275,13 @@ exports.NcHistoryFilterSchema = NcHistoryFilterSchema;
136373
136275
  exports.NcHistoryRecordKindSchema = NcHistoryRecordKindSchema;
136374
136276
  exports.NcHistoryStatusSchema = NcHistoryStatusSchema;
136375
136277
  exports.NcHistorySubjectSchema = NcHistorySubjectSchema;
136376
- exports.NcHookBindingsSchema = NcHookBindingsSchema;
136377
- exports.NcLegacyRuleActionSequenceSchema = NcLegacyRuleActionSequenceSchema;
136278
+ exports.NcHookActionIdsSchema = NcHookActionIdsSchema;
136378
136279
  exports.NcLinkedCameraModeSchema = NcLinkedCameraModeSchema;
136379
136280
  exports.NcMediaFrameSchema = NcMediaFrameSchema;
136380
136281
  exports.NcMediaImageSchema = NcMediaImageSchema;
136381
136282
  exports.NcMediaPolicySchema = NcMediaPolicySchema;
136382
136283
  exports.NcOccupancyConditionSchema = NcOccupancyConditionSchema;
136383
136284
  exports.NcPlateMatcherSchema = NcPlateMatcherSchema;
136384
- exports.NcRuleActionSchema = NcRuleActionSchema;
136385
- exports.NcRuleActionSequenceSchema = NcRuleActionSequenceSchema;
136386
136285
  exports.NcRuleActionsSchema = NcRuleActionsSchema;
136387
136286
  exports.NcRuleClearableKeySchema = NcRuleClearableKeySchema;
136388
136287
  exports.NcRuleInputSchema = NcRuleInputSchema;
@@ -136398,8 +136297,6 @@ exports.NcSceneConditionSchema = NcSceneConditionSchema;
136398
136297
  exports.NcScheduleSchema = NcScheduleSchema;
136399
136298
  exports.NcScheduleWindowSchema = NcScheduleWindowSchema;
136400
136299
  exports.NcSensorTransitionSchema = NcSensorTransitionSchema;
136401
- exports.NcSharedSequenceInputSchema = NcSharedSequenceInputSchema;
136402
- exports.NcSharedSequenceSchema = NcSharedSequenceSchema;
136403
136300
  exports.NcSnoozeInputSchema = NcSnoozeInputSchema;
136404
136301
  exports.NcSnoozeSchema = NcSnoozeSchema;
136405
136302
  exports.NcSnoozeScopeSchema = NcSnoozeScopeSchema;
@@ -136919,6 +136816,7 @@ exports.RollingWindowSchema = require_composition.RollingWindowSchema;
136919
136816
  exports.RootStepSupplySchema = RootStepSupplySchema;
136920
136817
  exports.RtpSourceSchema = RtpSourceSchema;
136921
136818
  exports.RtspRestreamEntrySchema = RtspRestreamEntrySchema;
136819
+ exports.RuleFireOriginSchema = require_sleep.RuleFireOriginSchema;
136922
136820
  exports.RunGate = RunGate;
136923
136821
  exports.RunnerBootCheckSchema = RunnerBootCheckSchema;
136924
136822
  exports.RunnerCameraConfigSchema = RunnerCameraConfigSchema;
@@ -137438,6 +137336,7 @@ exports.applyModeDelaysEdits = applyModeDelaysEdits;
137438
137336
  exports.applyModeDeviceListEdit = applyModeDeviceListEdit;
137439
137337
  exports.applyModelBoundSettings = applyModelBoundSettings;
137440
137338
  exports.applyNonBlockingEdit = applyNonBlockingEdit;
137339
+ exports.applyPrimaryChildRule = applyPrimaryChildRule;
137441
137340
  exports.applySecureOnArmEdit = applySecureOnArmEdit;
137442
137341
  exports.arithmeticDraft = arithmeticDraft;
137443
137342
  exports.armRemovalReconcile = armRemovalReconcile;
@@ -137791,7 +137690,7 @@ exports.enumSensorCapability = enumSensorCapability;
137791
137690
  exports.enumerateInferenceDevices = enumerateInferenceDevices;
137792
137691
  exports.enumerateItemArrayFields = enumerateItemArrayFields;
137793
137692
  exports.enumerateSchemaFields = enumerateSchemaFields;
137794
- exports.errMsg = require_device_type.errMsg;
137693
+ exports.errMsg = require_composed_stable_id.errMsg;
137795
137694
  exports.estimateNodeBenchmarkDurationMs = estimateNodeBenchmarkDurationMs;
137796
137695
  exports.evaluateAggregate = evaluateAggregate;
137797
137696
  exports.evaluateAst = require_composition.evaluateAst;
@@ -137839,7 +137738,7 @@ exports.featureForwards = featureForwards;
137839
137738
  exports.featureOfRole = featureOfRole;
137840
137739
  exports.featureProbeCapability = featureProbeCapability;
137841
137740
  exports.featureSources = require_composition.featureSources;
137842
- exports.featuresOfBoundCaps = require_device_type.featuresOfBoundCaps;
137741
+ exports.featuresOfBoundCaps = require_composed_stable_id.featuresOfBoundCaps;
137843
137742
  exports.feederCustomizationExample = feederCustomizationExample;
137844
137743
  exports.feederExampleSources = feederExampleSources;
137845
137744
  exports.ffmpegRate = ffmpegRate;
@@ -138188,8 +138087,6 @@ exports.normalizeAudioLabel = normalizeAudioLabel;
138188
138087
  exports.normalizeCapStep = normalizeCapStep;
138189
138088
  exports.normalizeConditionUnits = normalizeConditionUnits;
138190
138089
  exports.normalizeCoreBlockWrite = normalizeCoreBlockWrite;
138191
- exports.normalizeNcAction = normalizeNcAction;
138192
- exports.normalizeNcCapTarget = normalizeNcCapTarget;
138193
138090
  exports.normalizeNcMediaPolicy = normalizeNcMediaPolicy;
138194
138091
  exports.normalizeNodeId = require_sleep.normalizeNodeId;
138195
138092
  exports.normalizeOffSeconds = normalizeOffSeconds;
@@ -138478,6 +138375,7 @@ exports.ruleBelongsToAlarm = ruleBelongsToAlarm;
138478
138375
  exports.ruleDeviceCompatCapNames = ruleDeviceCompatCapNames;
138479
138376
  exports.ruleDeviceCompatCapQueries = ruleDeviceCompatCapQueries;
138480
138377
  exports.ruleEditorSectionsForKind = ruleEditorSectionsForKind;
138378
+ exports.ruleFireOfClaim = require_sleep.ruleFireOfClaim;
138481
138379
  exports.ruleGatedOnArmedState = ruleGatedOnArmedState;
138482
138380
  exports.ruleGroupingApplies = ruleGroupingApplies;
138483
138381
  exports.ruleKindOf = ruleKindOf;