@camstack/addon-provider-homematic 1.2.190 → 1.2.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.mjs CHANGED
@@ -6054,7 +6054,7 @@ var ZodIssueCode = {
6054
6054
  var ZodFirstPartyTypeKind;
6055
6055
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6056
6056
  //#endregion
6057
- //#region ../types/dist/sleep-Bn346wCJ.mjs
6057
+ //#region ../types/dist/sleep-D0roI_CZ.mjs
6058
6058
  /**
6059
6059
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6060
6060
  * window to float samples (D455).
@@ -16209,6 +16209,10 @@ Object.freeze({
16209
16209
  "path": "lastEvent.eventType",
16210
16210
  "valueType": "string"
16211
16211
  },
16212
+ {
16213
+ "path": "lastEvent.sourceId",
16214
+ "valueType": "string"
16215
+ },
16212
16216
  {
16213
16217
  "path": "lastEvent.timestamp",
16214
16218
  "valueType": "number"
@@ -44786,9 +44790,12 @@ function convertLegacyWhen(half) {
44786
44790
  * every caller — automations, Actions, and the notification centre, which runs
44787
44791
  * only Actions (planning#473).
44788
44792
  */
44793
+ /** The longest one `wait` step lasts. It is cut by a restart of the run and does not survive a hub restart. */
44794
+ var WAIT_MAX_SECONDS = 3600;
44795
+ var WAIT_TOO_LONG = `a wait is at most one hour (${WAIT_MAX_SECONDS} s)`;
44789
44796
  var AutomationWaitStepSchema = object({
44790
44797
  kind: literal("wait"),
44791
- seconds: number$1().min(0).max(300)
44798
+ seconds: number$1().min(0).max(WAIT_MAX_SECONDS, WAIT_TOO_LONG)
44792
44799
  });
44793
44800
  /** The legacy `deviceId` of a cap step: still READ, never written (D983). */
44794
44801
  var LegacyStepDeviceSchema = union([
@@ -44858,39 +44865,227 @@ var elseNeedsIf = {
44858
44865
  path: ["else"]
44859
44866
  };
44860
44867
  var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44861
- var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44862
- message: "a cap step needs a target",
44863
- path: ["target"]
44864
- }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44865
- message: "a domain target needs the vocabulary action it applies to (actionId)",
44866
- path: ["actionId"]
44867
- }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44868
44868
  /**
44869
44869
  * A step of a STANDALONE list (an action, a scheduler point, a preset): the
44870
44870
  * same two step kinds an automation runs, minus a guard that reads the
44871
44871
  * automation's trigger, which such a list does not have.
44872
44872
  */
44873
- var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]).superRefine((step, ctx) => {
44873
+ var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44874
+ message: "a cap step needs a target",
44875
+ path: ["target"]
44876
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44877
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44878
+ path: ["actionId"]
44879
+ }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf)]).superRefine((step, ctx) => {
44874
44880
  if (step.if !== void 0 && hasTriggeredByLeaves(step.if)) ctx.addIssue({
44875
44881
  code: "custom",
44876
44882
  message: TRIGGERED_BY_NEEDS_AUTOMATION,
44877
44883
  path: ["if"]
44878
44884
  });
44879
44885
  });
44886
+ /**
44887
+ * Flow control of an AUTOMATION's list (#500). A standalone list (an action, a
44888
+ * scheduler point, a preset) stays `wait` and `cap`: it has no run of its own
44889
+ * to end and no variable bag to write.
44890
+ */
44891
+ var continueOnErrorShape = {
44892
+ /** A failure of this step is traced `failed-continued` and the next step runs. */
44893
+ continueOnError: literal(true).optional() };
44894
+ /** An automation's cap step: the shared guarded cap step, plus `continueOnError`. */
44895
+ var AutomationGuardedCapStepSchema = AutomationCapStepBaseSchema.extend({
44896
+ ...stepGuardShape,
44897
+ ...continueOnErrorShape
44898
+ }).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44899
+ message: "a cap step needs a target",
44900
+ path: ["target"]
44901
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44902
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44903
+ path: ["actionId"]
44904
+ }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44905
+ /** End the run here, on purpose. `reason` may carry `{{vars.x}}` slots. */
44906
+ var AutomationStopStepSchema = object({
44907
+ kind: literal("stop"),
44908
+ reason: string().min(1, "a stop needs a reason: it is what the run trace shows").max(200),
44909
+ /** `ok`: the run ends as a success. `failed`: it ends as a failure, with the reason. */
44910
+ outcome: _enum(["ok", "failed"]),
44911
+ /** Stop only when this reads true; false or unknown does not stop. */
44912
+ if: AutomationWhenSchema.optional()
44913
+ });
44914
+ var SET_VAR_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]{0,39}$/;
44915
+ /** Names the run itself writes and reads (`leaf` is what `triggered-by` judges): a step may not overwrite them. */
44916
+ var RESERVED_RUN_VARS = [
44917
+ "kind",
44918
+ "leaf",
44919
+ "at"
44920
+ ];
44921
+ /**
44922
+ * Write variables into the run's bag, for the steps after it. SUBSTITUTION
44923
+ * only, never evaluation: a text value may carry `{{vars.x}}` slots.
44924
+ */
44925
+ var AutomationSetStepSchema = object({
44926
+ kind: literal("set"),
44927
+ vars: record(string(), union([
44928
+ string().max(500),
44929
+ number$1(),
44930
+ boolean()
44931
+ ])).refine((vars) => Object.keys(vars).every((name) => SET_VAR_NAME_RE.test(name)), { message: "a variable name is letters, digits and _, not starting with a digit (max 40)" }).refine((vars) => Object.keys(vars).length >= 1, { message: "set needs at least one variable" }).refine((vars) => Object.keys(vars).length <= 20, { message: `set holds at most 20 variables` }).refine((vars) => Object.keys(vars).every((name) => !RESERVED_RUN_VARS.includes(name)), { message: `the names ${RESERVED_RUN_VARS.join(", ")} belong to the run and cannot be set` }),
44932
+ /** Set only when this reads true; false or unknown leaves the bag as it is. */
44933
+ if: AutomationWhenSchema.optional()
44934
+ });
44935
+ var AutomationRunActionStepSchema = object({
44936
+ kind: literal("action"),
44937
+ /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
44938
+ actionId: string().min(1),
44939
+ /** Values for the action's declared variables; the others take their default. */
44940
+ variables: record(string(), union([
44941
+ string(),
44942
+ number$1(),
44943
+ boolean()
44944
+ ])).optional(),
44945
+ ...continueOnErrorShape
44946
+ });
44947
+ /**
44948
+ * A step INSIDE a branch of a `choose`: a flow step with no condition of its
44949
+ * own (the branch is the condition) and no block inside it. Strict, so an `if`
44950
+ * written on such a step is refused rather than dropped.
44951
+ */
44952
+ /** The longest a `wait-until` may wait: six hours. */
44953
+ var WAIT_UNTIL_TIMEOUT_MAX_S = 21600;
44954
+ /**
44955
+ * Pause the run until a condition is true (#500). The timeout is mandatory: a
44956
+ * run never waits without an end. `onTimeout` says what a wait that ran out
44957
+ * does: `continue` goes on to the next step, `stop` ends the run as a failure.
44958
+ * A condition that cannot be read is not "true": the wait goes on (D49).
44959
+ */
44960
+ var AutomationWaitUntilStepSchema = object({
44961
+ kind: literal("wait-until"),
44962
+ when: AutomationWhenSchema,
44963
+ timeoutS: number$1().int().min(1, "a wait needs a timeout of at least one second").max(WAIT_UNTIL_TIMEOUT_MAX_S, `a wait for a condition is at most six hours (${WAIT_UNTIL_TIMEOUT_MAX_S} s)`),
44964
+ onTimeout: _enum(["continue", "stop"])
44965
+ }).strict();
44966
+ /** The step kinds that hold steps of their own, or pause on a condition: they nest two levels at most. */
44967
+ var BLOCK_STEP_KINDS = [
44968
+ "choose",
44969
+ "repeat",
44970
+ "parallel",
44971
+ "wait-until"
44972
+ ];
44973
+ var NEST_TOO_DEEP = `steps nest two levels at most: a step inside a nested choose or repeat can be a plain step only`;
44974
+ function kindOf(input) {
44975
+ return typeof input === "object" && input !== null ? Reflect.get(input, "kind") : void 0;
44976
+ }
44977
+ /** Where the nesting ends, a block step is refused in words rather than as an unknown kind. */
44978
+ function nestTooDeep(issue) {
44979
+ const kind = kindOf(issue.input);
44980
+ return typeof kind === "string" && BLOCK_STEP_KINDS.includes(kind) ? NEST_TOO_DEEP : void 0;
44981
+ }
44982
+ var plainStepSchemas = [
44983
+ AutomationWaitStepSchema.strict(),
44984
+ AutomationCapStepBaseSchema.extend(continueOnErrorShape).strict().refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44985
+ message: "a cap step needs a target",
44986
+ path: ["target"]
44987
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44988
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44989
+ path: ["actionId"]
44990
+ }),
44991
+ AutomationStopStepSchema.omit({ if: true }).strict(),
44992
+ AutomationSetStepSchema.omit({ if: true }).strict(),
44993
+ AutomationRunActionStepSchema.strict()
44994
+ ];
44995
+ /**
44996
+ * A plain step: a flow step with no condition of its own and no step inside
44997
+ * it. The second (last) level of nesting holds these only.
44998
+ */
44999
+ var AutomationBranchStepSchema = discriminatedUnion("kind", plainStepSchemas, { error: nestTooDeep });
45000
+ /** A step that can run beside others: it writes no variable and does not end the run. */
45001
+ var AutomationParallelMemberSchema = AutomationBranchStepSchema.refine((step) => step.kind === "cap" || step.kind === "action" || step.kind === "wait", "a parallel holds device commands, actions and waits only: a set or a stop beside other steps has no order");
45002
+ /**
45003
+ * Several steps at once (#500): all are started together and all are awaited.
45004
+ * A failure fails the run once the others finished, as in a sequence; a member
45005
+ * marked "continue if this fails" does not.
45006
+ */
45007
+ var AutomationParallelStepSchema = object({
45008
+ kind: literal("parallel"),
45009
+ steps: array(AutomationParallelMemberSchema).min(2, "a parallel needs at least two steps").max(5, `a parallel takes at most 5 steps`)
45010
+ }).strict();
45011
+ var REPEAT_NEEDS_MAX = "a repeat on a condition needs a maximum number of iterations";
45012
+ /** A loop on a condition: the bound is mandatory, so a run never loops without an end. */
45013
+ var repeatConditionShape = {
45014
+ when: AutomationWhenSchema,
45015
+ maxIterations: number$1({ error: REPEAT_NEEDS_MAX }).int().min(1, REPEAT_NEEDS_MAX).max(50, `a repeat on a condition runs at most 50 times`),
45016
+ /** A pause between two iterations, never after the last. */
45017
+ waitS: number$1().int().min(1).max(WAIT_MAX_SECONDS, WAIT_TOO_LONG).optional()
45018
+ };
45019
+ /** What decides how many times a `repeat` runs. */
45020
+ var AutomationRepeatLoopSchema = discriminatedUnion("by", [
45021
+ object({
45022
+ by: literal("count"),
45023
+ count: number$1().int().min(1).max(20, `a repeat runs at most 20 times`)
45024
+ }).strict(),
45025
+ object({
45026
+ by: literal("while"),
45027
+ ...repeatConditionShape
45028
+ }).strict(),
45029
+ object({
45030
+ by: literal("until"),
45031
+ ...repeatConditionShape
45032
+ }).strict(),
45033
+ object({
45034
+ by: literal("forEach"),
45035
+ target: object({
45036
+ kind: literal("devices"),
45037
+ ids: array(number$1().int()).min(1, "a repeat over devices needs at least one device").max(50, `a repeat over devices takes at most 50 devices`)
45038
+ }).strict()
45039
+ }).strict()
45040
+ ]);
45041
+ /**
45042
+ * The same steps several times (#500). Every form is bounded at save, so a
45043
+ * run cannot loop without an end. A failure or a `stop` in the steps ends the
45044
+ * loop and the run, as in a sequence.
45045
+ */
45046
+ function repeatSchemaOf(step) {
45047
+ return object({
45048
+ kind: literal("repeat"),
45049
+ loop: AutomationRepeatLoopSchema,
45050
+ steps: array(step).min(1, "a repeat needs at least one step").max(10, `a repeat takes at most 10 steps`)
45051
+ }).strict();
45052
+ }
45053
+ /**
45054
+ * One step, several ways (#500): the branches are read in order and the FIRST
45055
+ * whose condition is true runs; `else` runs when every branch is false. A
45056
+ * branch that cannot be read ends the choice: nothing runs, not the branches
45057
+ * after it and not the else (D49). The #472 `if` / `else` of a wait or cap
45058
+ * step is the one-branch case and stays as it is stored.
45059
+ */
45060
+ function chooseSchemaOf(step) {
45061
+ const steps = array(step).max(10);
45062
+ return object({
45063
+ kind: literal("choose"),
45064
+ branches: array(object({
45065
+ if: AutomationWhenSchema,
45066
+ steps: steps.min(1, "a branch needs at least one step")
45067
+ })).min(1, "a choose needs at least one branch").max(6, `a choose takes at most 6 branches`),
45068
+ else: steps.optional()
45069
+ });
45070
+ }
45071
+ var AutomationBodyStepSchema = discriminatedUnion("kind", [
45072
+ ...plainStepSchemas,
45073
+ AutomationWaitUntilStepSchema,
45074
+ AutomationParallelStepSchema,
45075
+ chooseSchemaOf(AutomationBranchStepSchema),
45076
+ repeatSchemaOf(AutomationBranchStepSchema)
45077
+ ]);
45078
+ var AutomationRepeatStepSchema = repeatSchemaOf(AutomationBodyStepSchema);
44880
45079
  var AutomationActionSchema = discriminatedUnion("kind", [
44881
45080
  GuardedWaitStepSchema,
44882
- GuardedCapStepSchema,
44883
- object({
44884
- kind: literal("action"),
44885
- /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
44886
- actionId: string().min(1),
44887
- /** Values for the action's declared variables; the others take their default. */
44888
- variables: record(string(), union([
44889
- string(),
44890
- number$1(),
44891
- boolean()
44892
- ])).optional()
44893
- }),
45081
+ AutomationGuardedCapStepSchema,
45082
+ AutomationStopStepSchema,
45083
+ AutomationSetStepSchema,
45084
+ chooseSchemaOf(AutomationBodyStepSchema),
45085
+ AutomationWaitUntilStepSchema,
45086
+ AutomationParallelStepSchema,
45087
+ AutomationRepeatStepSchema,
45088
+ AutomationRunActionStepSchema,
44894
45089
  object({
44895
45090
  kind: literal("code"),
44896
45091
  /** Compiled into the automation's OWN block by esbuild — not a third
@@ -44953,11 +45148,6 @@ function convertLegacyRecipe(legacy) {
44953
45148
  ...rest
44954
45149
  };
44955
45150
  }
44956
- /**
44957
- * Where recipes are PARSED (the core-blocks cap, the MCP tool, the literal a
44958
- * saved block carries): the new shape as it is, or the old shape converted to
44959
- * it. The output type is always the new one.
44960
- */
44961
45151
  var AutomationRecipeSchema = union([CurrentAutomationRecipeSchema, LegacyAutomationRecipeSchema.transform(convertLegacyRecipe)]);
44962
45152
  var DETECTION_DESCRIPTIONS = {
44963
45153
  deviceId: "the camera that saw it",
@@ -45042,12 +45232,16 @@ var HoldOverrideSchema = discriminatedUnion("mode", [object({ mode: literal("res
45042
45232
  })]);
45043
45233
  /** A missed edge up to this late still runs. */
45044
45234
  var DEFAULT_MAX_LATE_MS = 10 * 6e4;
45235
+ var SchedulerStepSchema = ActionStepSchema.refine((step) => step.kind !== "wait" || step.seconds <= 300, {
45236
+ message: `a scheduler point waits at most five minutes (300 s); put a longer wait in an action`,
45237
+ path: ["seconds"]
45238
+ });
45045
45239
  var SchedulerPointSchema = object({
45046
45240
  id: string().min(1).max(64),
45047
45241
  at: SchedulerTimeSpecSchema,
45048
45242
  mode: SchedulerPointModeSchema,
45049
45243
  /** The actions of an `edge` or `hold`; a `release` has none. */
45050
- steps: array(ActionStepSchema).max(20).default([]),
45244
+ steps: array(SchedulerStepSchema).max(20).default([]),
45051
45245
  /** Checked when the point runs (an edge) or is applied (a hold). */
45052
45246
  conditions: SchedulerStateTreeSchema.optional(),
45053
45247
  /** Hold only; absent means `respect`. */
@@ -45315,18 +45509,46 @@ var StepTraceBaseSchema = object({
45315
45509
  ]).optional(),
45316
45510
  /** Why the condition read what it read, in the evaluator's own words. */
45317
45511
  conditionReason: string().optional(),
45318
- /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. */
45512
+ /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. `failed-continued`: it failed and was marked to be passed over (#500). */
45319
45513
  outcome: _enum([
45320
45514
  "ok",
45321
45515
  "error",
45322
45516
  "not-run",
45323
45517
  "empty",
45324
- "skipped"
45518
+ "skipped",
45519
+ "failed-continued",
45520
+ "timed-out"
45325
45521
  ]),
45326
45522
  message: string().optional()
45327
45523
  });
45524
+ /** What a block step adds to its row: which list ran, what each branch read, how many rounds. */
45525
+ var blockTraceShape = {
45526
+ /** A `choose` step (#500): the list that ran, `branches.<n>` or `else`. Absent when none did. */
45527
+ branch: string().optional(),
45528
+ /** A `choose` step: what each branch read, in order, up to the one that decided. */
45529
+ branchChecks: array(object({
45530
+ condition: _enum([
45531
+ "true",
45532
+ "false",
45533
+ "unknown"
45534
+ ]),
45535
+ conditionReason: string().optional()
45536
+ })).optional(),
45537
+ /** A `repeat` step (#500): how many times its steps ran. */
45538
+ iterations: number$1().int().optional()
45539
+ };
45540
+ /** A step one level down: it may be a block step itself, whose own steps are plain rows (the nesting ends there). */
45541
+ var NestedStepTraceSchema = StepTraceBaseSchema.extend({
45542
+ ...blockTraceShape,
45543
+ steps: array(StepTraceBaseSchema).optional()
45544
+ });
45328
45545
  /** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
45329
- var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: array(StepTraceBaseSchema).optional() });
45546
+ var AutomationStepTraceSchema = StepTraceBaseSchema.extend({
45547
+ else: array(StepTraceBaseSchema).optional(),
45548
+ ...blockTraceShape,
45549
+ /** A `choose` step: the steps of the list that ran. A `parallel`: its members. A `repeat`: the LAST iteration. */
45550
+ steps: array(NestedStepTraceSchema).optional()
45551
+ });
45330
45552
  var AutomationRunTraceSchema = object({
45331
45553
  runId: string().min(1),
45332
45554
  startedAt: number$1(),
@@ -45733,7 +45955,9 @@ var AddonHttpRouteSchema = object({
45733
45955
  ]).optional(),
45734
45956
  description: string().optional(),
45735
45957
  /** The hub limits this route per client address before the handler runs. */
45736
- rateLimit: _enum(["auth"]).optional()
45958
+ rateLimit: _enum(["auth"]).optional(),
45959
+ /** Served once per integration instance; the handler reads `instanceId`. */
45960
+ perInstance: boolean().optional()
45737
45961
  });
45738
45962
  /**
45739
45963
  * Cross-process route invocation envelope. The hub captures the
@@ -45750,6 +45974,8 @@ var InvokeRequestSchema = object({
45750
45974
  query: record(string(), string()),
45751
45975
  body: unknown(),
45752
45976
  headers: record(string(), string()),
45977
+ /** The instance the hub resolved for a `perInstance` route. */
45978
+ instanceId: string().optional(),
45753
45979
  user: object({
45754
45980
  id: string(),
45755
45981
  username: string(),
@@ -56442,25 +56668,89 @@ var enumSensorCapability = {
56442
56668
  * whether persisting is worth a SQLite commit. */
56443
56669
  volatileStateFields: ["lastFetchedAt", "timestamp"]
56444
56670
  };
56671
+ var EventVocabularyKindSchema = _enum([
56672
+ "press",
56673
+ "long-press",
56674
+ "long-press-start",
56675
+ "release",
56676
+ "repeat",
56677
+ "double-press",
56678
+ "other"
56679
+ ]);
56680
+ /** The part of the device an event comes from: a button, a channel. */
56681
+ var EventVocabularySourceSchema = object({
56682
+ id: string().min(1),
56683
+ label: string().min(1)
56684
+ });
56685
+ /** One scalar field of an event's `data`, by dotted path. */
56686
+ var EventVocabularyFieldSchema = object({
56687
+ path: string().min(1),
56688
+ kind: _enum([
56689
+ "string",
56690
+ "number",
56691
+ "boolean",
56692
+ "enum"
56693
+ ]),
56694
+ enumValues: array(string()).optional(),
56695
+ label: string().min(1).optional()
56696
+ });
56697
+ var EventVocabularyEntrySchema = object({
56698
+ /** The native token, verbatim. */
56699
+ id: string().min(1),
56700
+ source: EventVocabularySourceSchema.optional(),
56701
+ label: string().min(1),
56702
+ description: string().optional(),
56703
+ kind: EventVocabularyKindSchema.optional(),
56704
+ payload: array(EventVocabularyFieldSchema).optional()
56705
+ });
56706
+ /**
56707
+ * The vocabulary of a source that declares tokens and nothing else: one
56708
+ * entry per token, labelled with the token itself.
56709
+ */
56710
+ function plainEventVocabulary(eventTypes) {
56711
+ return [...new Set(eventTypes)].filter((eventType) => eventType !== "").map((eventType) => ({
56712
+ id: eventType,
56713
+ label: eventType
56714
+ }));
56715
+ }
56716
+ /** The native tokens of a vocabulary, each once, in declaration order. */
56717
+ function eventTypesOfVocabulary(vocabulary) {
56718
+ return [...new Set(vocabulary.map((entry) => entry.id))];
56719
+ }
56720
+ /** The entry a fire belongs to: same token, same source (or both without one). */
56721
+ function findVocabularyEntry(vocabulary, eventType, sourceId) {
56722
+ return vocabulary.find((entry) => entry.id === eventType && entry.source?.id === sourceId);
56723
+ }
56445
56724
  /**
56446
56725
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
56447
56726
  * device. Carries the device's EXACT declared event vocabulary verbatim
56448
56727
  * (NO normalization). Two shapes:
56449
- * - structured source (HA `event.*` entity) → `eventTypes` is the fixed
56450
- * declared vocabulary (e.g. ['press_short','press_long',...]).
56451
- * - generic/legacy source (HA bus events, e.g. zha_event) → `eventTypes`
56728
+ * - structured source (HA `event.*` entity) → `vocabulary` is the fixed
56729
+ * declared set (e.g. press_short, press_long, …).
56730
+ * - generic/legacy source (HA bus events, e.g. zha_event) → `vocabulary`
56452
56731
  * is [] (open) and `lastEvent.data` carries the complex payload.
56732
+ * `vocabulary` (D1044) names each event for a person and types it for a
56733
+ * rule; `eventTypes` is its list of native tokens, kept for older readers.
56734
+ * A fire names the part of the device it came from in `sourceId` when the
56735
+ * vocabulary declares sources (a remote's buttons).
56453
56736
  * `seq` is monotonic so two identical events still produce distinct slice writes.
56454
56737
  */
56455
56738
  var EventFireSchema = object({
56456
56739
  deviceId: number$1(),
56457
56740
  eventType: string(),
56741
+ sourceId: string().optional(),
56458
56742
  data: record(string(), unknown()).nullable(),
56459
56743
  timestamp: number$1().meta(readingMeta("none")),
56460
56744
  seq: number$1().meta(readingMeta("count"))
56461
56745
  });
56462
56746
  var EventEmitterStatusSchema = object({
56463
56747
  eventTypes: array(string()),
56748
+ /**
56749
+ * Required of a provider by the type. A status written before the field
56750
+ * existed still parses, as an empty vocabulary: read it through
56751
+ * `readEventVocabulary`, which then answers with the plain tokens.
56752
+ */
56753
+ vocabulary: array(EventVocabularyEntrySchema).default([]),
56464
56754
  lastEvent: EventFireSchema.nullable(),
56465
56755
  eventCountSinceStart: number$1().meta(readingMeta("count"))
56466
56756
  });
@@ -71952,7 +72242,18 @@ var OauthIntegrationDescriptorSchema = object({
71952
72242
  * The value is baked into the authorization code at `/authorize` and travels
71953
72243
  * on the tokens, so editing this field changes FUTURE links only.
71954
72244
  */
71955
- refreshTokenTtlSec: union([number$1().int().positive(), literal("never")]).optional()
72245
+ refreshTokenTtlSec: union([number$1().int().positive(), literal("never")]).optional(),
72246
+ /**
72247
+ * The integration instances an account can be linked to (planning#415),
72248
+ * beside the default one. `/api/oauth2/authorize?instance=<id>` is accepted
72249
+ * only for an id listed here; with no `instance=` the link is made to the
72250
+ * default instance, which is never listed and always accepted — it is the
72251
+ * address third parties already hold. Omit for a single-instance integration.
72252
+ */
72253
+ instances: array(object({
72254
+ id: string(),
72255
+ displayName: string()
72256
+ })).optional()
71956
72257
  });
71957
72258
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
71958
72259
  /**
@@ -78881,6 +79182,13 @@ var SsoBridgeClaimsSchema = object({
78881
79182
  /** OAuth authorization-code binding — set only on `oauth-code` tokens. */
78882
79183
  redirectUri: string().optional(),
78883
79184
  integrationId: string().optional(),
79185
+ /**
79186
+ * The integration INSTANCE an OAuth link was made for (planning#415). Set on
79187
+ * `oauth-code`, `oauth-access` and `oauth-refresh` tokens of a link made
79188
+ * with `instance=`; absent on a link to the default instance. A cloud relay
79189
+ * reads it off the access token to route; the hub answers from the session.
79190
+ */
79191
+ instanceId: string().optional(),
78884
79192
  /** JWT ID — unique per issued code; consumed-set enforces single-use. */
78885
79193
  jti: string().optional(),
78886
79194
  /** PKCE S256 challenge — set only on `oauth-code` tokens issued to a public
@@ -81259,6 +81567,8 @@ var OauthSessionSummarySchema = object({
81259
81567
  userId: string(),
81260
81568
  username: string(),
81261
81569
  integrationId: string(),
81570
+ /** The instance the link was made for; `null` = the default instance. */
81571
+ instanceId: string().nullable().optional(),
81262
81572
  scopes: array(TokenScopeSchema),
81263
81573
  createdAt: number$1(),
81264
81574
  lastUsedAt: number$1(),
@@ -81358,6 +81668,9 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), ob
81358
81668
  access: "view"
81359
81669
  }), method(object({
81360
81670
  integrationId: string(),
81671
+ /** The integration instance the link is for. Omit for the default
81672
+ * instance — never pass the addon id to mean it. */
81673
+ instanceId: string().optional(),
81361
81674
  userId: string(),
81362
81675
  username: string(),
81363
81676
  scopes: array(TokenScopeSchema),
@@ -81396,7 +81709,13 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), ob
81396
81709
  }), method(object({ token: string() }), object({
81397
81710
  userId: string(),
81398
81711
  username: string(),
81399
- scopes: array(TokenScopeSchema)
81712
+ scopes: array(TokenScopeSchema),
81713
+ /** The instance the link was made for, read from the SESSION.
81714
+ * Absent = the default instance. `oauthLinkServesInstance` is the
81715
+ * helper a per-instance route calls to compare it with the instance
81716
+ * of its path; no route declares `perInstance` yet (the Alexa
81717
+ * per-instance route, T3, is the first consumer). */
81718
+ instanceId: string().optional()
81400
81719
  }).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
81401
81720
  userId: string(),
81402
81721
  issuer: string()
@@ -98151,6 +98470,149 @@ function offered(received) {
98151
98470
  };
98152
98471
  }
98153
98472
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
98473
+ var PowerSwitchRefusedError = class extends Error {
98474
+ reason;
98475
+ constructor(reason, message) {
98476
+ super(message);
98477
+ this.name = "PowerSwitchRefusedError";
98478
+ this.reason = reason;
98479
+ }
98480
+ };
98481
+ /** `true` / `false` from the owner slice, `null` when the hinted field is
98482
+ * absent or not of the hinted shape. */
98483
+ function powerOnFromSlice(hint, slice) {
98484
+ const value = slice?.[hint.field];
98485
+ switch (hint.kind) {
98486
+ case "field": return typeof value === "boolean" ? value : null;
98487
+ case "methods": return typeof value === "string" ? !hint.offValues.includes(value) : null;
98488
+ case "mode": return typeof value === "string" ? value !== hint.offValue : null;
98489
+ }
98490
+ }
98491
+ function ownerMethod(owner, name, capName) {
98492
+ const fn = Reflect.get(owner, name);
98493
+ if (typeof fn !== "function") throw new PowerSwitchRefusedError("owner-method-missing", `${capName} provider does not serve '${name}', which its power hint names`);
98494
+ return async (input) => fn.call(owner, input);
98495
+ }
98496
+ async function lastNonOffMode(host, capName, hint) {
98497
+ const isMode = (v) => typeof v === "string" && v.length > 0 && v !== hint.offValue;
98498
+ const fromHub = (await host.readHubSlice(capName).catch(() => null))?.[hint.lastField];
98499
+ if (isMode(fromHub)) return fromHub;
98500
+ const local = host.runtimeState.getCapState(capName)?.[hint.lastField];
98501
+ return isMode(local) ? local : null;
98502
+ }
98503
+ async function applyPower(host, capName, hint, owner, on) {
98504
+ const deviceId = host.deviceId;
98505
+ switch (hint.kind) {
98506
+ case "field":
98507
+ await ownerMethod(owner, hint.set, capName)({
98508
+ deviceId,
98509
+ on
98510
+ });
98511
+ return;
98512
+ case "methods":
98513
+ await ownerMethod(owner, on ? hint.on : hint.off, capName)({ deviceId });
98514
+ return;
98515
+ case "mode": {
98516
+ const set = ownerMethod(owner, hint.set, capName);
98517
+ if (!on) {
98518
+ await set({
98519
+ deviceId,
98520
+ mode: hint.offValue
98521
+ });
98522
+ return;
98523
+ }
98524
+ const mode = await lastNonOffMode(host, capName, hint);
98525
+ if (mode === null) throw new PowerSwitchRefusedError("no-last-mode", `device ${deviceId}: ${capName} has no last non-off mode to restore; pick a mode instead`);
98526
+ await set({
98527
+ deviceId,
98528
+ mode
98529
+ });
98530
+ return;
98531
+ }
98532
+ }
98533
+ }
98534
+ function hintedMethods(hint) {
98535
+ return hint.kind === "methods" ? [hint.on, hint.off] : [hint.set];
98536
+ }
98537
+ /** Whether `owner` serves every method its cap's power hint names. A media
98538
+ * player whose `turnOn` / `turnOff` are not served has no power, so no switch. */
98539
+ function powerServedBy(hint, owner) {
98540
+ if (hint === void 0) return false;
98541
+ return hintedMethods(hint).every((name) => typeof Reflect.get(owner, name) === "function");
98542
+ }
98543
+ /** Builds the `switch` provider and starts the slice projection. Exported
98544
+ * for the specs; providers call `registerPowerSwitch`. */
98545
+ function buildPowerSwitch(host, cap, owner) {
98546
+ const hint = cap.power;
98547
+ if (hint === void 0) throw new Error(`capability '${cap.name}' has no power hint: it has no switch to project`);
98548
+ const read = () => powerOnFromSlice(hint, host.runtimeState.getCapState(cap.name));
98549
+ const project = () => {
98550
+ const on = read();
98551
+ const current = host.runtimeState.getCapState(switchCapability.name);
98552
+ if (current !== void 0 && current["on"] === on) return;
98553
+ const next = {
98554
+ on,
98555
+ lastChangedAt: Date.now()
98556
+ };
98557
+ host.runtimeState.setCapState(switchCapability.name, next);
98558
+ };
98559
+ const stop = host.runtimeState.subscribeCap(cap.name, project);
98560
+ if (host.runtimeState.getCapState(cap.name) !== void 0) project();
98561
+ return {
98562
+ provider: {
98563
+ getStatus: async () => {
98564
+ const current = host.runtimeState.getCapState(switchCapability.name);
98565
+ const lastChangedAt = typeof current?.["lastChangedAt"] === "number" ? current["lastChangedAt"] : 0;
98566
+ return {
98567
+ on: read(),
98568
+ lastChangedAt
98569
+ };
98570
+ },
98571
+ setState: async ({ on }) => applyPower(host, cap.name, hint, owner, on)
98572
+ },
98573
+ dispose: stop
98574
+ };
98575
+ }
98576
+ /**
98577
+ * Registers `switch` for a device whose `cap` carries a `power` hint, built
98578
+ * from `owner` (the provider the device registered for `cap`). Call it right
98579
+ * after `registerNativeCap(cap, owner)`.
98580
+ */
98581
+ function registerPowerSwitch(device, cap, owner) {
98582
+ const deviceId = device.ctx.id;
98583
+ if (cap.power !== void 0 && !powerServedBy(cap.power, owner)) {
98584
+ device.ctx.logger.debug("power switch: owner serves no power control, no switch registered", {
98585
+ tags: { deviceId },
98586
+ meta: { capName: cap.name }
98587
+ });
98588
+ return () => {};
98589
+ }
98590
+ const host = {
98591
+ deviceId,
98592
+ runtimeState: device.runtimeState,
98593
+ registerNativeCap: (c, p) => device.ctx.registerNativeCap(c, p),
98594
+ readHubSlice: async (capName) => {
98595
+ try {
98596
+ return await device.ctx.api.deviceState.getCapSlice.query({
98597
+ deviceId,
98598
+ capName
98599
+ });
98600
+ } catch (err) {
98601
+ device.ctx.logger.warn("power switch: hub slice read failed", {
98602
+ tags: { deviceId },
98603
+ meta: {
98604
+ capName,
98605
+ error: err instanceof Error ? err.message : String(err)
98606
+ }
98607
+ });
98608
+ return null;
98609
+ }
98610
+ }
98611
+ };
98612
+ const built = buildPowerSwitch(host, cap, owner);
98613
+ host.registerNativeCap(switchCapability, built.provider);
98614
+ return built.dispose;
98615
+ }
98154
98616
  Object.freeze({
98155
98617
  "accessories.getStatus": [{
98156
98618
  name: "deviceId",
@@ -127693,9 +128155,10 @@ var HM_KEY_PRESS_DATAPOINTS = [
127693
128155
  /** Set form for O(1) fire-detection membership tests. */
127694
128156
  var HM_KEY_PRESS_SET = new Set(HM_KEY_PRESS_DATAPOINTS);
127695
128157
  /** Cold-start event-emitter slice; vocabulary supplied per-device. */
127696
- function coldEventEmitter(eventTypes) {
128158
+ function coldEventEmitter(vocabulary) {
127697
128159
  return {
127698
- eventTypes: [...eventTypes],
128160
+ eventTypes: eventTypesOfVocabulary(vocabulary),
128161
+ vocabulary: [...vocabulary],
127699
128162
  lastEvent: null,
127700
128163
  eventCountSinceStart: 0
127701
128164
  };
@@ -128539,7 +129002,7 @@ var HmActuatorDevice = class extends HmChildDevice {
128539
129002
  }
128540
129003
  registerClimateCap() {
128541
129004
  const channel = this.actuatorChannel;
128542
- this.ctx.registerNativeCap(climateControlCapability, {
129005
+ const provider = {
128543
129006
  getStatus: async () => this.runtimeState.getCapState("climate-control") ?? COLD_CLIMATE,
128544
129007
  setMode: async ({ mode }) => {
128545
129008
  await this.requireFacade().climateSetMode(this.address, channel, toHmClimateMode(mode));
@@ -128555,7 +129018,9 @@ var HmActuatorDevice = class extends HmChildDevice {
128555
129018
  setTargetHumidity: async () => this.unsupported("climate humidity control"),
128556
129019
  setSwingVertical: async () => this.unsupported("climate vertical swing"),
128557
129020
  setSwingHorizontal: async () => this.unsupported("climate horizontal swing")
128558
- });
129021
+ };
129022
+ this.ctx.registerNativeCap(climateControlCapability, provider);
129023
+ registerPowerSwitch(this, climateControlCapability, provider);
128559
129024
  this.runtimeState.setCapState("climate-control", COLD_CLIMATE);
128560
129025
  this.registeredCap = "climate-control";
128561
129026
  }
@@ -128773,6 +129238,64 @@ var HmSensorDevice = class extends HmChildDevice {
128773
129238
  }
128774
129239
  };
128775
129240
  //#endregion
129241
+ //#region src/devices/hm-key-vocabulary.ts
129242
+ var PRESS_MEANING = {
129243
+ PRESS_SHORT: {
129244
+ label: "Short press",
129245
+ kind: "press"
129246
+ },
129247
+ PRESS_LONG: {
129248
+ label: "Long press",
129249
+ kind: "long-press"
129250
+ },
129251
+ PRESS_LONG_START: {
129252
+ label: "Long press started",
129253
+ kind: "long-press-start"
129254
+ },
129255
+ PRESS_LONG_RELEASE: {
129256
+ label: "Long press released",
129257
+ kind: "release"
129258
+ },
129259
+ PRESS_CONT: {
129260
+ label: "Long press held",
129261
+ kind: "repeat"
129262
+ }
129263
+ };
129264
+ /** The channels of a device that are buttons, in channel order. */
129265
+ function hmKeyChannels(device) {
129266
+ return mapHmDeviceChannels(device).filter(({ mapping }) => mapping.capabilities.includes("event-emitter")).map(({ channel }) => channel);
129267
+ }
129268
+ /** The presses one key channel has; the standard set when it lists none. */
129269
+ function pressesOf(channel) {
129270
+ const listed = new Set((channel.dataPoints ?? []).map((dataPoint) => dataPoint.parameter).filter((parameter) => HM_KEY_PRESS_SET.has(parameter)));
129271
+ if (listed.size === 0) return HM_KEY_PRESS_DATAPOINTS;
129272
+ return HM_KEY_PRESS_DATAPOINTS.filter((parameter) => listed.has(parameter));
129273
+ }
129274
+ function entryOf(parameter, source) {
129275
+ const meaning = PRESS_MEANING[parameter];
129276
+ if (meaning === void 0) return {
129277
+ id: parameter,
129278
+ source,
129279
+ label: parameter
129280
+ };
129281
+ return {
129282
+ id: parameter,
129283
+ source,
129284
+ label: meaning.label,
129285
+ kind: meaning.kind
129286
+ };
129287
+ }
129288
+ function hmKeyVocabulary(device) {
129289
+ return hmKeyChannels(device).flatMap((channel, position) => {
129290
+ const index = channelIndexFromAddress(channel.address) ?? String(channel.index);
129291
+ const source = {
129292
+ id: index,
129293
+ label: `Button ${position + 1} (channel ${index})`
129294
+ };
129295
+ return pressesOf(channel).map((parameter) => entryOf(parameter, source));
129296
+ });
129297
+ }
129298
+ //#endregion
128776
129299
  //#region src/devices/hm-event-emitter-device.ts
128777
129300
  /**
128778
129301
  * Event-emitter child config: the persisted native press vocabulary for the
@@ -128783,31 +129306,93 @@ var hmEventEmitterSchema = hmChildSchema.extend({ eventTypes: array(string()).op
128783
129306
  /**
128784
129307
  * ONE Homematic event-emitter accessory child collapsing all of a device's key
128785
129308
  * channels (HmIP-WRC* wall switches / HmIP-RC* remotes / KEY channels). The
128786
- * event vocabulary is the verbatim union of the channels' native `PRESS_*`
128787
- * datapoints (persisted in config at adoption). Presses fire
128788
- * `EventCategory.EventEmitted` with the button index (`:N` channel suffix) in
128789
- * `data.channel` — lifted VERBATIM from the legacy flat device.
129309
+ * event vocabulary is one source per key channel with that channel's native
129310
+ * `PRESS_*` datapoints, verbatim (`hm-key-vocabulary.ts`). Presses fire
129311
+ * `EventCategory.EventEmitted` with the button index (`:N` channel suffix)
129312
+ * as `sourceId`.
128790
129313
  */
128791
129314
  var HmEventEmitterDevice = class extends HmChildDevice {
128792
- eventTypes;
129315
+ /** The tokens persisted at adoption: the vocabulary of last resort. */
129316
+ persistedEventTypes;
129317
+ /** The vocabulary read from the CCU's channel list, once it answered. */
129318
+ #declared = null;
129319
+ /** Fires already reported as outside the vocabulary, as `source:token`. */
129320
+ #undeclaredLogged = /* @__PURE__ */ new Set();
128793
129321
  #eventSeq = 0;
128794
129322
  #eventCount = 0;
129323
+ /** Unsubscribe for the integration's state-change fan-out. */
129324
+ #snapshotUnsub = null;
128795
129325
  constructor(ctx) {
128796
129326
  super(ctx, hmEventEmitterSchema);
128797
129327
  const persisted = this.config.values.eventTypes;
128798
- this.eventTypes = persisted && persisted.length > 0 ? persisted : HM_KEY_PRESS_DATAPOINTS;
129328
+ this.persistedEventTypes = persisted && persisted.length > 0 ? persisted : HM_KEY_PRESS_DATAPOINTS;
128799
129329
  this.registerEventEmitterCap();
128800
129330
  this.attachValueChangedListener((event) => this.decodeKeyPress(event));
129331
+ if (this.integrationId !== void 0) this.#snapshotUnsub = homematicFacades.onSnapshot(this.integrationId, () => this.refreshDeclaredVocabulary());
129332
+ }
129333
+ /**
129334
+ * Rewrite the slice with the buttons once the CCU's channel list carries
129335
+ * them. A no-op while it does not, and after the buttons were declared.
129336
+ */
129337
+ refreshDeclaredVocabulary() {
129338
+ if (this.#declared !== null) return;
129339
+ const vocabulary = this.vocabulary();
129340
+ if (this.#declared === null) return;
129341
+ const current = this.runtimeState.getCapState("event-emitter");
129342
+ this.runtimeState.setCapState("event-emitter", {
129343
+ eventTypes: eventTypesOfVocabulary(vocabulary),
129344
+ vocabulary: [...vocabulary],
129345
+ lastEvent: current?.lastEvent ?? null,
129346
+ eventCountSinceStart: current?.eventCountSinceStart ?? 0
129347
+ });
129348
+ }
129349
+ async removeDevice() {
129350
+ this.#snapshotUnsub?.();
129351
+ this.#snapshotUnsub = null;
129352
+ await super.removeDevice();
128801
129353
  }
128802
129354
  registerEventEmitterCap() {
128803
- this.ctx.registerNativeCap(eventEmitterCapability, { getStatus: async () => this.runtimeState.getCapState("event-emitter") ?? coldEventEmitter(this.eventTypes) });
128804
- this.runtimeState.setCapState("event-emitter", coldEventEmitter(this.eventTypes));
129355
+ this.ctx.registerNativeCap(eventEmitterCapability, { getStatus: async () => this.runtimeState.getCapState("event-emitter") ?? coldEventEmitter(this.vocabulary()) });
129356
+ this.runtimeState.setCapState("event-emitter", coldEventEmitter(this.vocabulary()));
129357
+ }
129358
+ /**
129359
+ * The buttons and their presses, read LIVE from the CCU's channel list.
129360
+ *
129361
+ * Not from the child's config: that is written once, at adoption, so a
129362
+ * remote adopted before the vocabulary existed would never get its
129363
+ * buttons. While the CCU has not answered, the persisted tokens stand in,
129364
+ * with no button; the next write after it answers carries the buttons.
129365
+ */
129366
+ vocabulary() {
129367
+ if (this.#declared !== null) return this.#declared;
129368
+ const device = this.resolveHmDevice();
129369
+ const live = device === null ? [] : hmKeyVocabulary(device);
129370
+ if (live.length === 0) return plainEventVocabulary(this.persistedEventTypes);
129371
+ this.#declared = live;
129372
+ return live;
129373
+ }
129374
+ /** A press the vocabulary does not declare is delivered, and said once. */
129375
+ noteUndeclared(vocabulary, eventType, sourceId) {
129376
+ if (this.#declared === null) return;
129377
+ if (findVocabularyEntry(vocabulary, eventType, sourceId ?? void 0) !== void 0) return;
129378
+ const key = `${sourceId ?? ""}:${eventType}`;
129379
+ if (this.#undeclaredLogged.has(key)) return;
129380
+ this.#undeclaredLogged.add(key);
129381
+ this.ctx.logger.warn("Homematic press is not in the declared event vocabulary", {
129382
+ tags: { deviceId: this.ctx.id },
129383
+ meta: {
129384
+ address: this.address,
129385
+ eventType,
129386
+ sourceId
129387
+ }
129388
+ });
128805
129389
  }
128806
129390
  /**
128807
129391
  * Translate a key-channel `PRESS_*` datapoint into an `EventFire`: emit
128808
129392
  * `EventCategory.EventEmitted` on the bus and write the `event-emitter`
128809
129393
  * slice. The `eventType` is the native datapoint name VERBATIM; the button
128810
- * index (`:N` suffix of the channel address) travels in `data.channel`.
129394
+ * index (`:N` suffix of the channel address) is the fire's `sourceId`, and
129395
+ * stays in `data.channel` for readers older than the vocabulary.
128811
129396
  * Non-key datapoints and value resets are ignored.
128812
129397
  */
128813
129398
  decodeKeyPress(event) {
@@ -128819,6 +129404,7 @@ var HmEventEmitterDevice = class extends HmChildDevice {
128819
129404
  const fire = {
128820
129405
  deviceId: this.id,
128821
129406
  eventType: parameter,
129407
+ ...channelIndex !== null ? { sourceId: channelIndex } : {},
128822
129408
  data: channelIndex !== null ? { channel: channelIndex } : {},
128823
129409
  timestamp: now,
128824
129410
  seq: ++this.#eventSeq
@@ -128829,8 +129415,11 @@ var HmEventEmitterDevice = class extends HmChildDevice {
128829
129415
  deviceId: this.id,
128830
129416
  addonId: this.ctx.deviceMeta.addonId
128831
129417
  }, fire));
129418
+ const vocabulary = this.vocabulary();
129419
+ this.noteUndeclared(vocabulary, parameter, channelIndex);
128832
129420
  const slice = {
128833
- eventTypes: [...this.eventTypes],
129421
+ eventTypes: eventTypesOfVocabulary(vocabulary),
129422
+ vocabulary: [...vocabulary],
128834
129423
  lastEvent: fire,
128835
129424
  eventCountSinceStart: ++this.#eventCount
128836
129425
  };