@project-chip/matter.js 0.10.5 → 0.10.7

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 (63) hide show
  1. package/dist/cjs/behavior/definitions/level-control/LevelControlServer.js +1 -1
  2. package/dist/cjs/behavior/definitions/level-control/LevelControlServer.js.map +2 -2
  3. package/dist/cjs/cluster/definitions/LevelControlCluster.d.ts +18 -18
  4. package/dist/cjs/cluster/definitions/LevelControlCluster.js +2 -2
  5. package/dist/cjs/cluster/definitions/LevelControlCluster.js.map +2 -2
  6. package/dist/cjs/cluster/definitions/PulseWidthModulationCluster.d.ts +44 -44
  7. package/dist/cjs/device/LegacyInteractionServer.d.ts +1 -1
  8. package/dist/cjs/device/LegacyInteractionServer.d.ts.map +1 -1
  9. package/dist/cjs/device/LegacyInteractionServer.js +4 -2
  10. package/dist/cjs/device/LegacyInteractionServer.js.map +2 -2
  11. package/dist/cjs/model/standard/elements/LevelControl.js +2 -2
  12. package/dist/cjs/model/standard/elements/LevelControl.js.map +1 -1
  13. package/dist/cjs/node/server/TransactionalInteractionServer.d.ts +1 -1
  14. package/dist/cjs/node/server/TransactionalInteractionServer.d.ts.map +1 -1
  15. package/dist/cjs/node/server/TransactionalInteractionServer.js +6 -2
  16. package/dist/cjs/node/server/TransactionalInteractionServer.js.map +2 -2
  17. package/dist/cjs/protocol/interaction/InteractionServer.d.ts +1 -1
  18. package/dist/cjs/protocol/interaction/InteractionServer.d.ts.map +1 -1
  19. package/dist/cjs/protocol/interaction/InteractionServer.js +5 -4
  20. package/dist/cjs/protocol/interaction/InteractionServer.js.map +2 -2
  21. package/dist/cjs/protocol/interaction/SubscriptionHandler.d.ts +1 -1
  22. package/dist/cjs/protocol/interaction/SubscriptionHandler.d.ts.map +1 -1
  23. package/dist/cjs/protocol/interaction/SubscriptionHandler.js +1 -1
  24. package/dist/cjs/protocol/interaction/SubscriptionHandler.js.map +2 -2
  25. package/dist/cjs/session/SecureSession.d.ts.map +1 -1
  26. package/dist/cjs/session/SecureSession.js +2 -1
  27. package/dist/cjs/session/SecureSession.js.map +2 -2
  28. package/dist/esm/behavior/definitions/level-control/LevelControlServer.js +1 -1
  29. package/dist/esm/behavior/definitions/level-control/LevelControlServer.js.map +2 -2
  30. package/dist/esm/cluster/definitions/LevelControlCluster.d.ts +18 -18
  31. package/dist/esm/cluster/definitions/LevelControlCluster.js +3 -3
  32. package/dist/esm/cluster/definitions/LevelControlCluster.js.map +2 -2
  33. package/dist/esm/cluster/definitions/PulseWidthModulationCluster.d.ts +44 -44
  34. package/dist/esm/device/LegacyInteractionServer.d.ts +1 -1
  35. package/dist/esm/device/LegacyInteractionServer.d.ts.map +1 -1
  36. package/dist/esm/device/LegacyInteractionServer.js +4 -2
  37. package/dist/esm/device/LegacyInteractionServer.js.map +2 -2
  38. package/dist/esm/model/standard/elements/LevelControl.js +2 -2
  39. package/dist/esm/model/standard/elements/LevelControl.js.map +1 -1
  40. package/dist/esm/node/server/TransactionalInteractionServer.d.ts +1 -1
  41. package/dist/esm/node/server/TransactionalInteractionServer.d.ts.map +1 -1
  42. package/dist/esm/node/server/TransactionalInteractionServer.js +6 -2
  43. package/dist/esm/node/server/TransactionalInteractionServer.js.map +2 -2
  44. package/dist/esm/protocol/interaction/InteractionServer.d.ts +1 -1
  45. package/dist/esm/protocol/interaction/InteractionServer.d.ts.map +1 -1
  46. package/dist/esm/protocol/interaction/InteractionServer.js +5 -4
  47. package/dist/esm/protocol/interaction/InteractionServer.js.map +2 -2
  48. package/dist/esm/protocol/interaction/SubscriptionHandler.d.ts +1 -1
  49. package/dist/esm/protocol/interaction/SubscriptionHandler.d.ts.map +1 -1
  50. package/dist/esm/protocol/interaction/SubscriptionHandler.js +1 -1
  51. package/dist/esm/protocol/interaction/SubscriptionHandler.js.map +2 -2
  52. package/dist/esm/session/SecureSession.d.ts.map +1 -1
  53. package/dist/esm/session/SecureSession.js +2 -1
  54. package/dist/esm/session/SecureSession.js.map +2 -2
  55. package/package.json +3 -3
  56. package/src/behavior/definitions/level-control/LevelControlServer.ts +1 -1
  57. package/src/cluster/definitions/LevelControlCluster.ts +3 -3
  58. package/src/device/LegacyInteractionServer.ts +5 -1
  59. package/src/model/standard/elements/LevelControl.ts +2 -2
  60. package/src/node/server/TransactionalInteractionServer.ts +9 -1
  61. package/src/protocol/interaction/InteractionServer.ts +4 -2
  62. package/src/protocol/interaction/SubscriptionHandler.ts +8 -4
  63. package/src/session/SecureSession.ts +1 -0
@@ -118,7 +118,7 @@ class LevelControlServerLogic extends LevelControlLogicBase {
118
118
  * If you want to implement own logic just override {@link moveToLevelLogic} with is also used for {@link moveToLevelWithOnOff}.
119
119
  */
120
120
  moveToLevel({ level, transitionTime, optionsMask, optionsOverride }) {
121
- const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);
121
+ const effectiveOptions = this.#calculateEffectiveOptions(optionsMask ?? {}, optionsOverride ?? {});
122
122
  if (!this.#optionsAllowExecution(effectiveOptions)) {
123
123
  return;
124
124
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/behavior/definitions/level-control/LevelControlServer.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright 2022-2024 Matter.js Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { LevelControl } from \"../../../cluster/definitions/LevelControlCluster.js\";\nimport { GeneralDiagnostics } from \"../../../cluster/definitions/index.js\";\nimport { RootEndpoint } from \"../../../endpoint/definitions/system/RootEndpoint.js\";\nimport { Logger } from \"../../../log/Logger.js\";\nimport { StatusCode, StatusResponseError } from \"../../../protocol/interaction/StatusCode.js\";\nimport { TypeFromPartialBitSchema } from \"../../../schema/BitmapSchema.js\";\nimport { Time, Timer } from \"../../../time/Time.js\";\nimport { cropValueRange } from \"../../../util/Number.js\";\nimport { MaybePromise } from \"../../../util/Promises.js\";\nimport { ColorControlServer } from \"../color-control/ColorControlServer.js\";\nimport { GeneralDiagnosticsBehavior } from \"../general-diagnostics/GeneralDiagnosticsBehavior.js\";\nimport { OnOffServer } from \"../on-off/OnOffServer.js\";\nimport { LevelControlBehavior } from \"./LevelControlBehavior.js\";\n\nconst logger = Logger.get(\"LevelControlServer\");\n\nconst LevelControlLogicBase = LevelControlBehavior.with(LevelControl.Feature.OnOff, LevelControl.Feature.Lighting);\n\n/**\n * This is the default server implementation of {@link LevelControlBehavior}.\n *\n * This implementation includes all features of {@link LevelControl.Cluster} and implements all mandatory commands. The\n * On-Off Feature is automatically turned on as defined by the matter specification.\n * You should use {@link LevelControlServer.with} to specialize the class for the features your implementation supports.\n *\n * This default implementation also handles the OnOff cluster dependency and the ColorControl dependency as defined by\n * the Matter specification automatically.\n *\n * This implementation ignores by default all transition times and sets the level immediately. Alternatively, you can\n * set the `managedTransitionTimeHandling` state attribute to true to have matter.js manage transition times by\n * changing the level value step-wise every second. This might be an intermediate solution if you develop\n * independently of defined hardware.\n *\n * If you develop for a specific hardware you should extend the {@link LevelControlServer} class and implement the\n * following methods to natively use device features to correctly support the transition times. For this the default\n * implementation uses special protected methods which are used by the real commands and are only responsible for the\n * actual value change logic. The benefit of this structure is that basic data validations and options checks are\n * already done and you can focus on the actual hardware interaction:\n * * {@link LevelControlServerLogic.moveToLevelLogic} Logic to move the value to a defined level with a transition time\n * * {@link LevelControlServerLogic.moveLogic} Logic to move the value up or down with a defined rate\n * * {@link LevelControlServerLogic.stepLogic} Logic to step the value up or down with a defined step size and transition\n * * {@link LevelControlServerLogic.stopLogic} Logic to stop any currently running transitions\n * * {@link LevelControlServerLogic.handleOnOffChange} Logic to handle dimming to onLevel when device got turned on by connected OnOff cluster\n *\n * If you add own implementation you can use:\n * * {@link LevelControlServerLogic.setLevel} to set the level attribute including automatic handling of the onoff dependency\n * * {@link LevelControlServerLogic.setRemainingTime} to set the remaining time attribute when Lighting feature is enabled\n *\n * All overridable methods except setRemainingTime can be implemented sync or async by returning a Promise.\n */\nexport class LevelControlServerLogic extends LevelControlLogicBase {\n protected declare internal: LevelControlServerLogic.Internal;\n declare state: LevelControlServerLogic.State;\n\n /** Returns the minimum level, including feature specific fallback value handling. */\n get minLevel() {\n return this.state.minLevel ?? (this.features.lighting ? 1 : 0);\n }\n\n /** Returns the maximum level, including feature specific fallback value handling. */\n get maxLevel() {\n return this.state.maxLevel ?? 0xfe;\n }\n\n /**\n * The current level value as number.\n * Throws an StatusResponse Error when null!\n */\n get currentLevel(): number {\n if (this.state.currentLevel === null) {\n throw new StatusResponseError(\n \"The currentLevel value is null, so we cannot operate on it.\",\n StatusCode.Failure,\n );\n }\n return this.state.currentLevel;\n }\n\n override initialize() {\n if (this.state.managedTransitionTimeHandling) {\n this.internal.transitionIntervalTimer = Time.getPeriodicTimer(\n \"LevelControl.step/move\",\n 1000,\n this.callback(this.#stepIntervalTick),\n );\n }\n\n if (this.features.lighting) {\n if (this.state.currentLevel === 0) {\n logger.warn(\n `The currentLevel value of ${this.state.currentLevel} is invalid according to Matter specification. The value must not be 0.`,\n );\n }\n if (this.minLevel !== 1) {\n logger.warn(\n `The minLevel value of ${this.minLevel} is invalid according to Matter specification. The value should be 1.`,\n );\n }\n if (this.maxLevel !== 0xfe) {\n logger.warn(\n `The maxLevel value of ${this.maxLevel} is invalid according to Matter specification. The value should be 254.`,\n );\n }\n\n if (this.#getBootReason() !== GeneralDiagnostics.BootReason.SoftwareUpdateCompleted) {\n const startUpLevelValue = this.state.startUpCurrentLevel ?? null;\n const currentLevelValue = this.state.currentLevel;\n let targetLevelValue: number | null;\n switch (startUpLevelValue) {\n case 0:\n targetLevelValue = this.minLevel;\n break;\n case null:\n targetLevelValue = currentLevelValue;\n break;\n default:\n targetLevelValue = startUpLevelValue;\n break;\n }\n if (targetLevelValue !== currentLevelValue) {\n this.state.currentLevel = targetLevelValue;\n }\n }\n }\n\n if (this.features.onOff && this.agent.has(OnOffServer)) {\n this.reactTo(this.agent.get(OnOffServer).events.onOff$Changed, this.handleOnOffChange);\n }\n }\n\n /**\n * Default implementation notes:\n * This method ignores the transition time provided by the command or settings and just sets the level to the\n * requested value. After the options and value checks it uses the {@link moveToLevelLogic} method to set the level.\n * If you want to implement own logic just override {@link moveToLevelLogic} with is also used for {@link moveToLevelWithOnOff}.\n */\n override moveToLevel({ level, transitionTime, optionsMask, optionsOverride }: LevelControl.MoveToLevelRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n\n this.#assertLevelValue(level);\n\n return this.moveToLevelLogic(level, transitionTime, false, effectiveOptions);\n }\n\n /**\n * Default implementation notes:\n * This method ignores the transition time provided by the command or settings and just sets the level to the\n * requested value. After the options and value checks it uses the {@link moveToLevelLogic} method to set the level.\n * If you want to implement own logic just override {@link moveToLevelLogic} with is also used for {@link moveToLevel}.\n */\n override moveToLevelWithOnOff({ level, transitionTime }: LevelControl.MoveToLevelRequest) {\n this.#assertLevelValue(level);\n\n return this.moveToLevelLogic(level, transitionTime, true);\n }\n\n /**\n * Default implementation of the moveToLevel logic. When a transition time is specified the implementation uses a\n * step based logic to manage the move. It also checks if the level is within the min and max level range and sets\n * the level accordingly. The method uses {@link setLevel} to set the level and handle the on/off state if the method\n * is called by a *WithOnOff command.\n *\n * @param level Level to set\n * @param transitionTime Transition time, ignored in this default implementation\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected moveToLevelLogic(\n level: number,\n transitionTime: number | null,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n // Determine effective transition time\n const transitionTimeValue = transitionTime ?? this.state.onOffTransitionTime ?? null;\n\n // Adjust target level\n level = cropValueRange(level, this.minLevel, this.maxLevel);\n\n // If we should move to the new level as fast as possible ...\n if (\n !this.state.managedTransitionTimeHandling ||\n transitionTimeValue === null ||\n transitionTimeValue === 0 ||\n this.currentLevel === level\n ) {\n this.setRemainingTime(0);\n return this.setLevel(level, withOnOff, options);\n }\n\n // Else calculate a rate by second and manage the transition\n const effectiveRate = Math.ceil(((level - this.currentLevel) / transitionTimeValue) * 10);\n return this.#initiateTransition(effectiveRate, withOnOff, level, options);\n }\n\n /**\n * Default implementation notes:\n * After the options checks it uses the {@link moveLogic} method to set the level.\n * If you want to implement own logic just override {@link moveLogic} with is also used for {@link moveWithOnOff}.\n * The logic is implemented as follows: When no move rate is provided and also no default move rate is set, the\n * server will move as fast as possible, so we set to min/max directly. Else the step logic is applied and the\n * level is increased or decreased by the step size every second.\n */\n override move({ moveMode, rate, optionsMask, optionsOverride }: LevelControl.MoveRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n\n return this.moveLogic(moveMode, rate, false, effectiveOptions);\n }\n\n /**\n * Default implementation notes:\n * This implementation uses the {@link moveLogic} method to set the level.\n * If you want to implement own logic just override {@link moveLogic} with is also used for {@link move}.\n * The logic is implemented as follows: When no move rate is provided and also no default move rate is set, the\n * server will move as fast as possible, so we set to min/max directly. Else the step logic is applied and the\n * level is increased or decreased by the step size every second.\n */\n override moveWithOnOff({ moveMode, rate }: LevelControl.MoveRequest) {\n return this.moveLogic(moveMode, rate, true);\n }\n\n /**\n * Default implementation of the move logic. When no move rate is provided and also no default move rate is set, the\n * server will move as fast as possible, so it is set to min/max directly. Else the step logic is applied and the\n * level is increased or decreased by the step size every second. The method uses {@link setLevel} to set the level\n * and handle the on/off state if the method is called by a *WithOnOff command.\n *\n * @param moveMode Mode (Up/Down) of the move action\n * @param rate Rate of the move action, null if no rate is provided and the default should be used\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected moveLogic(\n moveMode: LevelControl.MoveMode,\n rate: number | null,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n const effectiveRate = rate ?? this.state.defaultMoveRate ?? null;\n if (!this.state.managedTransitionTimeHandling || effectiveRate === null || effectiveRate === 0) {\n // If null rate is requested and also no default rate is set, we should move as fast as possible, so we set\n // to min/max value directly. If rate 0 is requested no change on level should be done.\n const level =\n effectiveRate === 0\n ? this.currentLevel\n : moveMode === LevelControl.MoveMode.Up\n ? this.maxLevel\n : this.minLevel;\n this.setRemainingTime(0);\n return this.setLevel(level, withOnOff, options);\n }\n return this.#initiateTransition(\n effectiveRate * (moveMode === LevelControl.MoveMode.Up ? 1 : -1),\n withOnOff,\n undefined,\n options,\n );\n }\n\n /**\n * Default implementation notes:\n * After the options checks it uses the {@link stepLogic} method to set the level.\n * If you want to implement own logic just override {@link stepLogic} with is also used for {@link stepWithOnOff}.\n * The logic is implemented as follows: When no transition time is provided, the server will move as fast as\n * possible, so we set to currentlevel +/- stepSize directly. Else the step logic is applied and the level is\n * increased or decreased by the step size every transition time interval.\n */\n override step({ stepMode, stepSize, transitionTime, optionsMask, optionsOverride }: LevelControl.StepRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n return this.stepLogic(stepMode, stepSize, transitionTime, false, effectiveOptions);\n }\n\n /**\n * Default implementation notes:\n * This implementation uses the {@link stepLogic} method to set the level.\n * If you want to implement own logic just override {@link stepLogic} with is also used for {@link step}.\n * The logic is implemented as follows: When no transition time is provided, the server will move as fast as\n * possible, so we set to min/max directly. Else the step logic is applied and the level is increased or decreased\n * by the step size every transition time interval.\n */\n override stepWithOnOff({ stepMode, stepSize, transitionTime }: LevelControl.StepRequest) {\n return this.stepLogic(stepMode, stepSize, transitionTime, true);\n }\n\n /**\n * Default implementation of the step logic. When no transition time is provided, the server will move as fast as\n * possible, so it is set to min/max directly. Else the level is increased or decreased by the step size every\n * second. The method uses {@link setLevel} to set the level and handle the on/off state if the method is called\n * by a *WithOnOff command. The remaining time is updated with every step.\n *\n * @param stepMode Mode (Up/Down) of the step action\n * @param stepSize Size of the step action\n * @param transitionTime Time of the step action in 10th of a second\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected stepLogic(\n stepMode: LevelControl.StepMode,\n stepSize: number,\n transitionTime: number | null,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n const targetLevel = cropValueRange(\n stepMode === LevelControl.StepMode.Up ? this.currentLevel + stepSize : this.currentLevel - stepSize,\n this.minLevel,\n this.maxLevel,\n );\n\n if (!this.state.managedTransitionTimeHandling || transitionTime === null || transitionTime === 0) {\n // If null/0 transitionTime is requested we should move as fast as possible, so we set to min/max value directly\n this.setRemainingTime(0);\n return this.setLevel(targetLevel, withOnOff, options);\n }\n\n const effectiveRate =\n Math.ceil((stepSize / transitionTime) * 10) * (stepMode === LevelControl.StepMode.Up ? 1 : -1);\n\n return this.#initiateTransition(effectiveRate, withOnOff, targetLevel, options);\n }\n\n override stop({ optionsMask, optionsOverride }: LevelControl.StopRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n\n return this.stopLogic(effectiveOptions);\n }\n\n override stopWithOnOff() {\n return this.stopLogic();\n }\n\n /**\n * Default implementation of the stop logic. This stops any level transitions currently appening and sets the\n * remaining time to 0.\n *\n * @protected\n */\n protected stopLogic(_options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {}): MaybePromise<void> {\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n }\n\n /**\n * Method to set the remaining time attribute when Lighting feature is enabled.\n *\n * @param remainingTime Remaining time in 1/10th of a second\n * @protected\n */\n protected setRemainingTime(remainingTime: number) {\n if (!this.features.lighting) {\n return;\n }\n this.state.remainingTime = remainingTime;\n }\n\n /**\n * Default implementation of the logic to set the level including the handing of the on/off state when one of the\n * *WithOnOff commands is called. This implementation checks if the level is at the minLevel and the device is on,\n * it will turn off the device. If the level is above the minLevel and the device is off, it will turn on the device.\n *\n * @param level Level which is set by the command\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected setLevel(\n level: number,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ): MaybePromise<void> {\n const onOffServer =\n this.features.onOff && withOnOff && this.agent.has(OnOffServer) ? this.agent.get(OnOffServer) : undefined;\n\n if (onOffServer !== undefined && level === this.minLevel && onOffServer.state.onOff) {\n const offPromise = onOffServer.off();\n return MaybePromise.then(offPromise, () => {\n this.state.currentLevel = level;\n });\n }\n\n this.state.currentLevel = level;\n\n let colorSyncResult;\n // Sync color temperature with level if the feature is enabled and the option is set\n if (this.features.lighting && options.coupleColorTempToLevel && this.agent.has(ColorControlServer)) {\n colorSyncResult = this.agent.get(ColorControlServer).syncColorTemperatureWithLevel(level);\n }\n\n if (onOffServer !== undefined && level > this.minLevel && !onOffServer.state.onOff) {\n return MaybePromise.then(colorSyncResult, () => onOffServer.on());\n } else {\n return colorSyncResult;\n }\n }\n\n #calculateEffectiveOptions(\n optionsMask: TypeFromPartialBitSchema<typeof LevelControl.Options>,\n optionsOverride: TypeFromPartialBitSchema<typeof LevelControl.Options>,\n ): TypeFromPartialBitSchema<typeof LevelControl.Options> {\n const options = this.state.options ?? {};\n return {\n executeIfOff: optionsMask.executeIfOff ? optionsOverride.executeIfOff : options.executeIfOff,\n coupleColorTempToLevel: this.features.lighting\n ? optionsMask.coupleColorTempToLevel\n ? optionsOverride.coupleColorTempToLevel\n : options.coupleColorTempToLevel\n : false,\n };\n }\n\n #optionsAllowExecution(options: TypeFromPartialBitSchema<typeof LevelControl.Options>) {\n return (\n options.executeIfOff ||\n !this.features.onOff ||\n !this.agent.has(OnOffServer) ||\n this.agent.get(OnOffServer).state.onOff\n );\n }\n\n #assertLevelValue(level: number) {\n if (level < this.minLevel) {\n throw new StatusResponseError(\n `The level value of ${level} is invalid. It must be greater or equal to ${this.minLevel}.`,\n StatusCode.ConstraintError,\n );\n }\n if (level > this.maxLevel) {\n throw new StatusResponseError(\n `The level value of ${level} is invalid. It must be less or equal to ${this.maxLevel}.`,\n StatusCode.ConstraintError,\n );\n }\n }\n\n /**\n * This is the default implementation of the required interaction with the OnOff cluster on the same endpoint when\n * the onOff feature is used.\n * This implementation just sets the current level to the onLevel value when the device is turned on. Other fading\n * up/down logic required by the {@link MatterSpecification.v12.Cluster} \u00A71.6.4.1.1 needs to be implemented in a\n * specialized class if needed.\n *\n * @param onOff The new onOff state\n * @protected\n */\n protected handleOnOffChange(onOff: boolean) {\n if (!onOff || this.state.onLevel === null) {\n return;\n }\n this.state.currentLevel = this.state.onLevel;\n }\n\n #initiateTransition(\n stepSize: number,\n withOnOff: boolean,\n targetLevel?: number,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n this.internal.transitionIntervalTimer?.stop();\n\n this.internal.currentTransitionData = {\n changeRate: stepSize,\n withOnOff,\n targetLevel,\n options,\n };\n logger.debug(`Starting transition interval with changeRate: ${this.internal.currentTransitionData.changeRate}`);\n this.internal.transitionIntervalTimer?.start();\n // Re-Set the current level as start level for the step interval to handle OnOff state changes\n return this.setLevel(this.currentLevel, withOnOff, options);\n }\n\n async #stepIntervalTick() {\n if (this.internal.currentTransitionData === undefined || this.state.currentLevel === null) {\n this.internal.transitionIntervalTimer?.stop();\n return;\n }\n const { changeRate, withOnOff, targetLevel, options } = this.internal.currentTransitionData;\n const newLevel = this.state.currentLevel + changeRate;\n if (newLevel <= this.minLevel) {\n logger.debug(`Stopping transition interval at minLevel: ${this.minLevel}.`);\n await this.setLevel(this.minLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n } else if (newLevel >= this.maxLevel) {\n logger.debug(`Stopping transition interval at maxLevel: ${this.maxLevel}.`);\n await this.setLevel(this.maxLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n } else {\n // Check if we reached the targetLevel if there is one\n if (targetLevel !== undefined) {\n if (changeRate > 0 && newLevel >= targetLevel) {\n logger.debug(`Stopping transition interval at targetLevel: ${targetLevel}.`);\n await this.setLevel(targetLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n return;\n } else if (changeRate < 0 && newLevel <= targetLevel) {\n logger.debug(`Stopping transition interval at targetLevel: ${targetLevel}.`);\n await this.setLevel(targetLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n return;\n }\n }\n logger.debug(`Setting new level in transition interval: ${newLevel}.`);\n await this.setLevel(newLevel, withOnOff, options);\n\n // There is no definition on how often the remaining time should be updated, so we update it with every step\n if (changeRate > 0) {\n this.setRemainingTime(\n Math.floor(Math.ceil(((targetLevel ?? this.maxLevel) - newLevel) / changeRate) * 10),\n );\n } else {\n this.setRemainingTime(\n Math.floor(Math.ceil((newLevel - (targetLevel ?? this.minLevel)) / -changeRate) * 10),\n );\n }\n }\n }\n\n #getBootReason() {\n const rootEndpoint = this.endpoint.ownerOfType(RootEndpoint);\n if (rootEndpoint !== undefined && rootEndpoint.behaviors.has(GeneralDiagnosticsBehavior)) {\n return rootEndpoint.stateOf(GeneralDiagnosticsBehavior).bootReason;\n }\n }\n\n override async [Symbol.asyncDispose]() {\n this.internal.transitionIntervalTimer?.stop();\n await super[Symbol.asyncDispose]?.();\n }\n}\n\nexport namespace LevelControlServerLogic {\n export class Internal {\n /** Timer for the managed transition */\n transitionIntervalTimer?: Timer;\n\n /** Structure to store the data of the current managed transition */\n currentTransitionData?: {\n changeRate: number;\n withOnOff: boolean;\n targetLevel?: number;\n options?: TypeFromPartialBitSchema<typeof LevelControl.Options>;\n };\n }\n\n export class State extends LevelControlLogicBase.State {\n /**\n * The default implementation always set the target level immediately and so ignores all transition times\n * requested or configured.\n * Set this to true to manage transition times by changing the level value step wise every second. This is in\n * most cases not the best way because hardware supporting levels usually have ways to specify the change rate\n * or target value and transition time.\n */\n managedTransitionTimeHandling = false;\n }\n\n export declare const ExtensionInterface: {\n moveToLevelLogic(level: number, transitionTime: number | null, withOnOff: boolean): MaybePromise<void>;\n moveLogic(moveMode: LevelControl.MoveMode, rate: number | null, withOnOff: boolean): MaybePromise<void>;\n stepLogic(\n stepMode: LevelControl.StepMode,\n stepSize: number,\n transitionTime: number | null,\n withOnOff: boolean,\n ): MaybePromise<void>;\n stopLogic(): MaybePromise<void>;\n setLevel(level: number, withOnOff: boolean): MaybePromise<void>;\n setRemainingTime(remainingTime: number): void;\n handleOnOffChange(onOff: boolean): void;\n };\n}\n\n// We had turned on some more features to provide da default implementation, but export the cluster with default\n// Features again.\nexport class LevelControlServer extends LevelControlServerLogic.with(LevelControl.Feature.OnOff) {}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,iCAA6B;AAC7B,yBAAmC;AACnC,0BAA6B;AAC7B,oBAAuB;AACvB,wBAAgD;AAEhD,kBAA4B;AAC5B,oBAA+B;AAC/B,sBAA6B;AAC7B,gCAAmC;AACnC,wCAA2C;AAC3C,yBAA4B;AAC5B,kCAAqC;AAlBrC;AAAA;AAAA;AAAA;AAAA;AAoBA,MAAM,SAAS,qBAAO,IAAI,oBAAoB;AAE9C,MAAM,wBAAwB,iDAAqB,KAAK,wCAAa,QAAQ,OAAO,wCAAa,QAAQ,QAAQ;AAkC1G,MAAM,gCAAgC,sBAAsB;AAAA;AAAA,EAK/D,IAAI,WAAW;AACX,WAAO,KAAK,MAAM,aAAa,KAAK,SAAS,WAAW,IAAI;AAAA,EAChE;AAAA;AAAA,EAGA,IAAI,WAAW;AACX,WAAO,KAAK,MAAM,YAAY;AAAA,EAClC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,eAAuB;AACvB,QAAI,KAAK,MAAM,iBAAiB,MAAM;AAClC,YAAM,IAAI;AAAA,QACN;AAAA,QACA,6BAAW;AAAA,MACf;AAAA,IACJ;AACA,WAAO,KAAK,MAAM;AAAA,EACtB;AAAA,EAES,a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M,2BAA2B,wBAAwB,KAAK,wCAAa,QAAQ,KAAK,EAAE;AAAC;",
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2022-2024 Matter.js Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { LevelControl } from \"../../../cluster/definitions/LevelControlCluster.js\";\nimport { GeneralDiagnostics } from \"../../../cluster/definitions/index.js\";\nimport { RootEndpoint } from \"../../../endpoint/definitions/system/RootEndpoint.js\";\nimport { Logger } from \"../../../log/Logger.js\";\nimport { StatusCode, StatusResponseError } from \"../../../protocol/interaction/StatusCode.js\";\nimport { TypeFromPartialBitSchema } from \"../../../schema/BitmapSchema.js\";\nimport { Time, Timer } from \"../../../time/Time.js\";\nimport { cropValueRange } from \"../../../util/Number.js\";\nimport { MaybePromise } from \"../../../util/Promises.js\";\nimport { ColorControlServer } from \"../color-control/ColorControlServer.js\";\nimport { GeneralDiagnosticsBehavior } from \"../general-diagnostics/GeneralDiagnosticsBehavior.js\";\nimport { OnOffServer } from \"../on-off/OnOffServer.js\";\nimport { LevelControlBehavior } from \"./LevelControlBehavior.js\";\n\nconst logger = Logger.get(\"LevelControlServer\");\n\nconst LevelControlLogicBase = LevelControlBehavior.with(LevelControl.Feature.OnOff, LevelControl.Feature.Lighting);\n\n/**\n * This is the default server implementation of {@link LevelControlBehavior}.\n *\n * This implementation includes all features of {@link LevelControl.Cluster} and implements all mandatory commands. The\n * On-Off Feature is automatically turned on as defined by the matter specification.\n * You should use {@link LevelControlServer.with} to specialize the class for the features your implementation supports.\n *\n * This default implementation also handles the OnOff cluster dependency and the ColorControl dependency as defined by\n * the Matter specification automatically.\n *\n * This implementation ignores by default all transition times and sets the level immediately. Alternatively, you can\n * set the `managedTransitionTimeHandling` state attribute to true to have matter.js manage transition times by\n * changing the level value step-wise every second. This might be an intermediate solution if you develop\n * independently of defined hardware.\n *\n * If you develop for a specific hardware you should extend the {@link LevelControlServer} class and implement the\n * following methods to natively use device features to correctly support the transition times. For this the default\n * implementation uses special protected methods which are used by the real commands and are only responsible for the\n * actual value change logic. The benefit of this structure is that basic data validations and options checks are\n * already done and you can focus on the actual hardware interaction:\n * * {@link LevelControlServerLogic.moveToLevelLogic} Logic to move the value to a defined level with a transition time\n * * {@link LevelControlServerLogic.moveLogic} Logic to move the value up or down with a defined rate\n * * {@link LevelControlServerLogic.stepLogic} Logic to step the value up or down with a defined step size and transition\n * * {@link LevelControlServerLogic.stopLogic} Logic to stop any currently running transitions\n * * {@link LevelControlServerLogic.handleOnOffChange} Logic to handle dimming to onLevel when device got turned on by connected OnOff cluster\n *\n * If you add own implementation you can use:\n * * {@link LevelControlServerLogic.setLevel} to set the level attribute including automatic handling of the onoff dependency\n * * {@link LevelControlServerLogic.setRemainingTime} to set the remaining time attribute when Lighting feature is enabled\n *\n * All overridable methods except setRemainingTime can be implemented sync or async by returning a Promise.\n */\nexport class LevelControlServerLogic extends LevelControlLogicBase {\n protected declare internal: LevelControlServerLogic.Internal;\n declare state: LevelControlServerLogic.State;\n\n /** Returns the minimum level, including feature specific fallback value handling. */\n get minLevel() {\n return this.state.minLevel ?? (this.features.lighting ? 1 : 0);\n }\n\n /** Returns the maximum level, including feature specific fallback value handling. */\n get maxLevel() {\n return this.state.maxLevel ?? 0xfe;\n }\n\n /**\n * The current level value as number.\n * Throws an StatusResponse Error when null!\n */\n get currentLevel(): number {\n if (this.state.currentLevel === null) {\n throw new StatusResponseError(\n \"The currentLevel value is null, so we cannot operate on it.\",\n StatusCode.Failure,\n );\n }\n return this.state.currentLevel;\n }\n\n override initialize() {\n if (this.state.managedTransitionTimeHandling) {\n this.internal.transitionIntervalTimer = Time.getPeriodicTimer(\n \"LevelControl.step/move\",\n 1000,\n this.callback(this.#stepIntervalTick),\n );\n }\n\n if (this.features.lighting) {\n if (this.state.currentLevel === 0) {\n logger.warn(\n `The currentLevel value of ${this.state.currentLevel} is invalid according to Matter specification. The value must not be 0.`,\n );\n }\n if (this.minLevel !== 1) {\n logger.warn(\n `The minLevel value of ${this.minLevel} is invalid according to Matter specification. The value should be 1.`,\n );\n }\n if (this.maxLevel !== 0xfe) {\n logger.warn(\n `The maxLevel value of ${this.maxLevel} is invalid according to Matter specification. The value should be 254.`,\n );\n }\n\n if (this.#getBootReason() !== GeneralDiagnostics.BootReason.SoftwareUpdateCompleted) {\n const startUpLevelValue = this.state.startUpCurrentLevel ?? null;\n const currentLevelValue = this.state.currentLevel;\n let targetLevelValue: number | null;\n switch (startUpLevelValue) {\n case 0:\n targetLevelValue = this.minLevel;\n break;\n case null:\n targetLevelValue = currentLevelValue;\n break;\n default:\n targetLevelValue = startUpLevelValue;\n break;\n }\n if (targetLevelValue !== currentLevelValue) {\n this.state.currentLevel = targetLevelValue;\n }\n }\n }\n\n if (this.features.onOff && this.agent.has(OnOffServer)) {\n this.reactTo(this.agent.get(OnOffServer).events.onOff$Changed, this.handleOnOffChange);\n }\n }\n\n /**\n * Default implementation notes:\n * This method ignores the transition time provided by the command or settings and just sets the level to the\n * requested value. After the options and value checks it uses the {@link moveToLevelLogic} method to set the level.\n * If you want to implement own logic just override {@link moveToLevelLogic} with is also used for {@link moveToLevelWithOnOff}.\n */\n override moveToLevel({ level, transitionTime, optionsMask, optionsOverride }: LevelControl.MoveToLevelRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask ?? {}, optionsOverride ?? {});\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n\n this.#assertLevelValue(level);\n\n return this.moveToLevelLogic(level, transitionTime, false, effectiveOptions);\n }\n\n /**\n * Default implementation notes:\n * This method ignores the transition time provided by the command or settings and just sets the level to the\n * requested value. After the options and value checks it uses the {@link moveToLevelLogic} method to set the level.\n * If you want to implement own logic just override {@link moveToLevelLogic} with is also used for {@link moveToLevel}.\n */\n override moveToLevelWithOnOff({ level, transitionTime }: LevelControl.MoveToLevelRequest) {\n this.#assertLevelValue(level);\n\n return this.moveToLevelLogic(level, transitionTime, true);\n }\n\n /**\n * Default implementation of the moveToLevel logic. When a transition time is specified the implementation uses a\n * step based logic to manage the move. It also checks if the level is within the min and max level range and sets\n * the level accordingly. The method uses {@link setLevel} to set the level and handle the on/off state if the method\n * is called by a *WithOnOff command.\n *\n * @param level Level to set\n * @param transitionTime Transition time, ignored in this default implementation\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected moveToLevelLogic(\n level: number,\n transitionTime: number | null,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n // Determine effective transition time\n const transitionTimeValue = transitionTime ?? this.state.onOffTransitionTime ?? null;\n\n // Adjust target level\n level = cropValueRange(level, this.minLevel, this.maxLevel);\n\n // If we should move to the new level as fast as possible ...\n if (\n !this.state.managedTransitionTimeHandling ||\n transitionTimeValue === null ||\n transitionTimeValue === 0 ||\n this.currentLevel === level\n ) {\n this.setRemainingTime(0);\n return this.setLevel(level, withOnOff, options);\n }\n\n // Else calculate a rate by second and manage the transition\n const effectiveRate = Math.ceil(((level - this.currentLevel) / transitionTimeValue) * 10);\n return this.#initiateTransition(effectiveRate, withOnOff, level, options);\n }\n\n /**\n * Default implementation notes:\n * After the options checks it uses the {@link moveLogic} method to set the level.\n * If you want to implement own logic just override {@link moveLogic} with is also used for {@link moveWithOnOff}.\n * The logic is implemented as follows: When no move rate is provided and also no default move rate is set, the\n * server will move as fast as possible, so we set to min/max directly. Else the step logic is applied and the\n * level is increased or decreased by the step size every second.\n */\n override move({ moveMode, rate, optionsMask, optionsOverride }: LevelControl.MoveRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n\n return this.moveLogic(moveMode, rate, false, effectiveOptions);\n }\n\n /**\n * Default implementation notes:\n * This implementation uses the {@link moveLogic} method to set the level.\n * If you want to implement own logic just override {@link moveLogic} with is also used for {@link move}.\n * The logic is implemented as follows: When no move rate is provided and also no default move rate is set, the\n * server will move as fast as possible, so we set to min/max directly. Else the step logic is applied and the\n * level is increased or decreased by the step size every second.\n */\n override moveWithOnOff({ moveMode, rate }: LevelControl.MoveRequest) {\n return this.moveLogic(moveMode, rate, true);\n }\n\n /**\n * Default implementation of the move logic. When no move rate is provided and also no default move rate is set, the\n * server will move as fast as possible, so it is set to min/max directly. Else the step logic is applied and the\n * level is increased or decreased by the step size every second. The method uses {@link setLevel} to set the level\n * and handle the on/off state if the method is called by a *WithOnOff command.\n *\n * @param moveMode Mode (Up/Down) of the move action\n * @param rate Rate of the move action, null if no rate is provided and the default should be used\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected moveLogic(\n moveMode: LevelControl.MoveMode,\n rate: number | null,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n const effectiveRate = rate ?? this.state.defaultMoveRate ?? null;\n if (!this.state.managedTransitionTimeHandling || effectiveRate === null || effectiveRate === 0) {\n // If null rate is requested and also no default rate is set, we should move as fast as possible, so we set\n // to min/max value directly. If rate 0 is requested no change on level should be done.\n const level =\n effectiveRate === 0\n ? this.currentLevel\n : moveMode === LevelControl.MoveMode.Up\n ? this.maxLevel\n : this.minLevel;\n this.setRemainingTime(0);\n return this.setLevel(level, withOnOff, options);\n }\n return this.#initiateTransition(\n effectiveRate * (moveMode === LevelControl.MoveMode.Up ? 1 : -1),\n withOnOff,\n undefined,\n options,\n );\n }\n\n /**\n * Default implementation notes:\n * After the options checks it uses the {@link stepLogic} method to set the level.\n * If you want to implement own logic just override {@link stepLogic} with is also used for {@link stepWithOnOff}.\n * The logic is implemented as follows: When no transition time is provided, the server will move as fast as\n * possible, so we set to currentlevel +/- stepSize directly. Else the step logic is applied and the level is\n * increased or decreased by the step size every transition time interval.\n */\n override step({ stepMode, stepSize, transitionTime, optionsMask, optionsOverride }: LevelControl.StepRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n return this.stepLogic(stepMode, stepSize, transitionTime, false, effectiveOptions);\n }\n\n /**\n * Default implementation notes:\n * This implementation uses the {@link stepLogic} method to set the level.\n * If you want to implement own logic just override {@link stepLogic} with is also used for {@link step}.\n * The logic is implemented as follows: When no transition time is provided, the server will move as fast as\n * possible, so we set to min/max directly. Else the step logic is applied and the level is increased or decreased\n * by the step size every transition time interval.\n */\n override stepWithOnOff({ stepMode, stepSize, transitionTime }: LevelControl.StepRequest) {\n return this.stepLogic(stepMode, stepSize, transitionTime, true);\n }\n\n /**\n * Default implementation of the step logic. When no transition time is provided, the server will move as fast as\n * possible, so it is set to min/max directly. Else the level is increased or decreased by the step size every\n * second. The method uses {@link setLevel} to set the level and handle the on/off state if the method is called\n * by a *WithOnOff command. The remaining time is updated with every step.\n *\n * @param stepMode Mode (Up/Down) of the step action\n * @param stepSize Size of the step action\n * @param transitionTime Time of the step action in 10th of a second\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected stepLogic(\n stepMode: LevelControl.StepMode,\n stepSize: number,\n transitionTime: number | null,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n const targetLevel = cropValueRange(\n stepMode === LevelControl.StepMode.Up ? this.currentLevel + stepSize : this.currentLevel - stepSize,\n this.minLevel,\n this.maxLevel,\n );\n\n if (!this.state.managedTransitionTimeHandling || transitionTime === null || transitionTime === 0) {\n // If null/0 transitionTime is requested we should move as fast as possible, so we set to min/max value directly\n this.setRemainingTime(0);\n return this.setLevel(targetLevel, withOnOff, options);\n }\n\n const effectiveRate =\n Math.ceil((stepSize / transitionTime) * 10) * (stepMode === LevelControl.StepMode.Up ? 1 : -1);\n\n return this.#initiateTransition(effectiveRate, withOnOff, targetLevel, options);\n }\n\n override stop({ optionsMask, optionsOverride }: LevelControl.StopRequest) {\n const effectiveOptions = this.#calculateEffectiveOptions(optionsMask, optionsOverride);\n if (!this.#optionsAllowExecution(effectiveOptions)) {\n return;\n }\n\n return this.stopLogic(effectiveOptions);\n }\n\n override stopWithOnOff() {\n return this.stopLogic();\n }\n\n /**\n * Default implementation of the stop logic. This stops any level transitions currently appening and sets the\n * remaining time to 0.\n *\n * @protected\n */\n protected stopLogic(_options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {}): MaybePromise<void> {\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n }\n\n /**\n * Method to set the remaining time attribute when Lighting feature is enabled.\n *\n * @param remainingTime Remaining time in 1/10th of a second\n * @protected\n */\n protected setRemainingTime(remainingTime: number) {\n if (!this.features.lighting) {\n return;\n }\n this.state.remainingTime = remainingTime;\n }\n\n /**\n * Default implementation of the logic to set the level including the handing of the on/off state when one of the\n * *WithOnOff commands is called. This implementation checks if the level is at the minLevel and the device is on,\n * it will turn off the device. If the level is above the minLevel and the device is off, it will turn on the device.\n *\n * @param level Level which is set by the command\n * @param withOnOff true if the method is called by a *WithOnOff command\n * @param options Options for the command\n * @protected\n */\n protected setLevel(\n level: number,\n withOnOff: boolean,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ): MaybePromise<void> {\n const onOffServer =\n this.features.onOff && withOnOff && this.agent.has(OnOffServer) ? this.agent.get(OnOffServer) : undefined;\n\n if (onOffServer !== undefined && level === this.minLevel && onOffServer.state.onOff) {\n const offPromise = onOffServer.off();\n return MaybePromise.then(offPromise, () => {\n this.state.currentLevel = level;\n });\n }\n\n this.state.currentLevel = level;\n\n let colorSyncResult;\n // Sync color temperature with level if the feature is enabled and the option is set\n if (this.features.lighting && options.coupleColorTempToLevel && this.agent.has(ColorControlServer)) {\n colorSyncResult = this.agent.get(ColorControlServer).syncColorTemperatureWithLevel(level);\n }\n\n if (onOffServer !== undefined && level > this.minLevel && !onOffServer.state.onOff) {\n return MaybePromise.then(colorSyncResult, () => onOffServer.on());\n } else {\n return colorSyncResult;\n }\n }\n\n #calculateEffectiveOptions(\n optionsMask: TypeFromPartialBitSchema<typeof LevelControl.Options>,\n optionsOverride: TypeFromPartialBitSchema<typeof LevelControl.Options>,\n ): TypeFromPartialBitSchema<typeof LevelControl.Options> {\n const options = this.state.options ?? {};\n return {\n executeIfOff: optionsMask.executeIfOff ? optionsOverride.executeIfOff : options.executeIfOff,\n coupleColorTempToLevel: this.features.lighting\n ? optionsMask.coupleColorTempToLevel\n ? optionsOverride.coupleColorTempToLevel\n : options.coupleColorTempToLevel\n : false,\n };\n }\n\n #optionsAllowExecution(options: TypeFromPartialBitSchema<typeof LevelControl.Options>) {\n return (\n options.executeIfOff ||\n !this.features.onOff ||\n !this.agent.has(OnOffServer) ||\n this.agent.get(OnOffServer).state.onOff\n );\n }\n\n #assertLevelValue(level: number) {\n if (level < this.minLevel) {\n throw new StatusResponseError(\n `The level value of ${level} is invalid. It must be greater or equal to ${this.minLevel}.`,\n StatusCode.ConstraintError,\n );\n }\n if (level > this.maxLevel) {\n throw new StatusResponseError(\n `The level value of ${level} is invalid. It must be less or equal to ${this.maxLevel}.`,\n StatusCode.ConstraintError,\n );\n }\n }\n\n /**\n * This is the default implementation of the required interaction with the OnOff cluster on the same endpoint when\n * the onOff feature is used.\n * This implementation just sets the current level to the onLevel value when the device is turned on. Other fading\n * up/down logic required by the {@link MatterSpecification.v12.Cluster} \u00A71.6.4.1.1 needs to be implemented in a\n * specialized class if needed.\n *\n * @param onOff The new onOff state\n * @protected\n */\n protected handleOnOffChange(onOff: boolean) {\n if (!onOff || this.state.onLevel === null) {\n return;\n }\n this.state.currentLevel = this.state.onLevel;\n }\n\n #initiateTransition(\n stepSize: number,\n withOnOff: boolean,\n targetLevel?: number,\n options: TypeFromPartialBitSchema<typeof LevelControl.Options> = {},\n ) {\n this.internal.transitionIntervalTimer?.stop();\n\n this.internal.currentTransitionData = {\n changeRate: stepSize,\n withOnOff,\n targetLevel,\n options,\n };\n logger.debug(`Starting transition interval with changeRate: ${this.internal.currentTransitionData.changeRate}`);\n this.internal.transitionIntervalTimer?.start();\n // Re-Set the current level as start level for the step interval to handle OnOff state changes\n return this.setLevel(this.currentLevel, withOnOff, options);\n }\n\n async #stepIntervalTick() {\n if (this.internal.currentTransitionData === undefined || this.state.currentLevel === null) {\n this.internal.transitionIntervalTimer?.stop();\n return;\n }\n const { changeRate, withOnOff, targetLevel, options } = this.internal.currentTransitionData;\n const newLevel = this.state.currentLevel + changeRate;\n if (newLevel <= this.minLevel) {\n logger.debug(`Stopping transition interval at minLevel: ${this.minLevel}.`);\n await this.setLevel(this.minLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n } else if (newLevel >= this.maxLevel) {\n logger.debug(`Stopping transition interval at maxLevel: ${this.maxLevel}.`);\n await this.setLevel(this.maxLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n } else {\n // Check if we reached the targetLevel if there is one\n if (targetLevel !== undefined) {\n if (changeRate > 0 && newLevel >= targetLevel) {\n logger.debug(`Stopping transition interval at targetLevel: ${targetLevel}.`);\n await this.setLevel(targetLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n return;\n } else if (changeRate < 0 && newLevel <= targetLevel) {\n logger.debug(`Stopping transition interval at targetLevel: ${targetLevel}.`);\n await this.setLevel(targetLevel, withOnOff, options);\n this.internal.transitionIntervalTimer?.stop();\n this.setRemainingTime(0);\n return;\n }\n }\n logger.debug(`Setting new level in transition interval: ${newLevel}.`);\n await this.setLevel(newLevel, withOnOff, options);\n\n // There is no definition on how often the remaining time should be updated, so we update it with every step\n if (changeRate > 0) {\n this.setRemainingTime(\n Math.floor(Math.ceil(((targetLevel ?? this.maxLevel) - newLevel) / changeRate) * 10),\n );\n } else {\n this.setRemainingTime(\n Math.floor(Math.ceil((newLevel - (targetLevel ?? this.minLevel)) / -changeRate) * 10),\n );\n }\n }\n }\n\n #getBootReason() {\n const rootEndpoint = this.endpoint.ownerOfType(RootEndpoint);\n if (rootEndpoint !== undefined && rootEndpoint.behaviors.has(GeneralDiagnosticsBehavior)) {\n return rootEndpoint.stateOf(GeneralDiagnosticsBehavior).bootReason;\n }\n }\n\n override async [Symbol.asyncDispose]() {\n this.internal.transitionIntervalTimer?.stop();\n await super[Symbol.asyncDispose]?.();\n }\n}\n\nexport namespace LevelControlServerLogic {\n export class Internal {\n /** Timer for the managed transition */\n transitionIntervalTimer?: Timer;\n\n /** Structure to store the data of the current managed transition */\n currentTransitionData?: {\n changeRate: number;\n withOnOff: boolean;\n targetLevel?: number;\n options?: TypeFromPartialBitSchema<typeof LevelControl.Options>;\n };\n }\n\n export class State extends LevelControlLogicBase.State {\n /**\n * The default implementation always set the target level immediately and so ignores all transition times\n * requested or configured.\n * Set this to true to manage transition times by changing the level value step wise every second. This is in\n * most cases not the best way because hardware supporting levels usually have ways to specify the change rate\n * or target value and transition time.\n */\n managedTransitionTimeHandling = false;\n }\n\n export declare const ExtensionInterface: {\n moveToLevelLogic(level: number, transitionTime: number | null, withOnOff: boolean): MaybePromise<void>;\n moveLogic(moveMode: LevelControl.MoveMode, rate: number | null, withOnOff: boolean): MaybePromise<void>;\n stepLogic(\n stepMode: LevelControl.StepMode,\n stepSize: number,\n transitionTime: number | null,\n withOnOff: boolean,\n ): MaybePromise<void>;\n stopLogic(): MaybePromise<void>;\n setLevel(level: number, withOnOff: boolean): MaybePromise<void>;\n setRemainingTime(remainingTime: number): void;\n handleOnOffChange(onOff: boolean): void;\n };\n}\n\n// We had turned on some more features to provide da default implementation, but export the cluster with default\n// Features again.\nexport class LevelControlServer extends LevelControlServerLogic.with(LevelControl.Feature.OnOff) {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,iCAA6B;AAC7B,yBAAmC;AACnC,0BAA6B;AAC7B,oBAAuB;AACvB,wBAAgD;AAEhD,kBAA4B;AAC5B,oBAA+B;AAC/B,sBAA6B;AAC7B,gCAAmC;AACnC,wCAA2C;AAC3C,yBAA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AAAA,EACJ;AAAA,EAEA,iBAAiB;AACb,UAAM,eAAe,KAAK,SAAS,YAAY,gCAAY;AAC3D,QAAI,iBAAiB,UAAa,aAAa,UAAU,IAAI,4DAA0B,GAAG;AACtF,aAAO,aAAa,QAAQ,4DAA0B,EAAE;AAAA,IAC5D;AAAA,EACJ;AAAA,EAEA,OAAgB,OAAO,YAAY,IAAI;AACnC,SAAK,SAAS,yBAAyB,KAAK;AAC5C,UAAM,MAAM,OAAO,YAAY,IAAI;AAAA,EACvC;AACJ;AAAA,CAEO,CAAUA,6BAAV;AAAA,EACI,MAAM,SAAS;AAAA;AAAA,IAElB;AAAA;AAAA,IAGA;AAAA,EAMJ;AAXO,EAAAA,yBAAM;AAAA,EAaN,MAAM,cAAc,sBAAsB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQnD,gCAAgC;AAAA,EACpC;AATO,EAAAA,yBAAM;AAAA,GAdA;AA2CV,MAAM,2BAA2B,wBAAwB,KAAK,wCAAa,QAAQ,KAAK,EAAE;AAAC;",
6
6
  "names": ["LevelControlServerLogic"]
7
7
  }
@@ -93,7 +93,7 @@ export declare namespace LevelControl {
93
93
  const TlvMoveToLevelRequest: import("../../tlv/TlvObject.js").ObjectSchema<{
94
94
  level: import("../../tlv/TlvObject.js").FieldType<number>;
95
95
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
96
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
96
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
97
97
  /**
98
98
  * Dependency on On/Off cluster
99
99
  *
@@ -111,7 +111,7 @@ export declare namespace LevelControl {
111
111
  */
112
112
  coupleColorTempToLevel: BitFlag;
113
113
  }>>;
114
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
114
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
115
115
  /**
116
116
  * Dependency on On/Off cluster
117
117
  *
@@ -580,7 +580,7 @@ export declare namespace LevelControl {
580
580
  readonly moveToLevel: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
581
581
  level: import("../../tlv/TlvObject.js").FieldType<number>;
582
582
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
583
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
583
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
584
584
  /**
585
585
  * Dependency on On/Off cluster
586
586
  *
@@ -598,7 +598,7 @@ export declare namespace LevelControl {
598
598
  */
599
599
  coupleColorTempToLevel: BitFlag;
600
600
  }>>;
601
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
601
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
602
602
  /**
603
603
  * Dependency on On/Off cluster
604
604
  *
@@ -785,7 +785,7 @@ export declare namespace LevelControl {
785
785
  readonly moveToLevelWithOnOff: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
786
786
  level: import("../../tlv/TlvObject.js").FieldType<number>;
787
787
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
788
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
788
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
789
789
  /**
790
790
  * Dependency on On/Off cluster
791
791
  *
@@ -803,7 +803,7 @@ export declare namespace LevelControl {
803
803
  */
804
804
  coupleColorTempToLevel: BitFlag;
805
805
  }>>;
806
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
806
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
807
807
  /**
808
808
  * Dependency on On/Off cluster
809
809
  *
@@ -1226,7 +1226,7 @@ export declare namespace LevelControl {
1226
1226
  readonly moveToLevel: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
1227
1227
  level: import("../../tlv/TlvObject.js").FieldType<number>;
1228
1228
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
1229
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1229
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1230
1230
  /**
1231
1231
  * Dependency on On/Off cluster
1232
1232
  *
@@ -1244,7 +1244,7 @@ export declare namespace LevelControl {
1244
1244
  */
1245
1245
  coupleColorTempToLevel: BitFlag;
1246
1246
  }>>;
1247
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1247
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1248
1248
  /**
1249
1249
  * Dependency on On/Off cluster
1250
1250
  *
@@ -1431,7 +1431,7 @@ export declare namespace LevelControl {
1431
1431
  readonly moveToLevelWithOnOff: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
1432
1432
  level: import("../../tlv/TlvObject.js").FieldType<number>;
1433
1433
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
1434
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1434
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1435
1435
  /**
1436
1436
  * Dependency on On/Off cluster
1437
1437
  *
@@ -1449,7 +1449,7 @@ export declare namespace LevelControl {
1449
1449
  */
1450
1450
  coupleColorTempToLevel: BitFlag;
1451
1451
  }>>;
1452
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1452
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1453
1453
  /**
1454
1454
  * Dependency on On/Off cluster
1455
1455
  *
@@ -1864,7 +1864,7 @@ export declare namespace LevelControl {
1864
1864
  readonly moveToLevel: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
1865
1865
  level: import("../../tlv/TlvObject.js").FieldType<number>;
1866
1866
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
1867
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1867
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1868
1868
  /**
1869
1869
  * Dependency on On/Off cluster
1870
1870
  *
@@ -1882,7 +1882,7 @@ export declare namespace LevelControl {
1882
1882
  */
1883
1883
  coupleColorTempToLevel: BitFlag;
1884
1884
  }>>;
1885
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1885
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
1886
1886
  /**
1887
1887
  * Dependency on On/Off cluster
1888
1888
  *
@@ -2069,7 +2069,7 @@ export declare namespace LevelControl {
2069
2069
  readonly moveToLevelWithOnOff: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
2070
2070
  level: import("../../tlv/TlvObject.js").FieldType<number>;
2071
2071
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
2072
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2072
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2073
2073
  /**
2074
2074
  * Dependency on On/Off cluster
2075
2075
  *
@@ -2087,7 +2087,7 @@ export declare namespace LevelControl {
2087
2087
  */
2088
2088
  coupleColorTempToLevel: BitFlag;
2089
2089
  }>>;
2090
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2090
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2091
2091
  /**
2092
2092
  * Dependency on On/Off cluster
2093
2093
  *
@@ -2545,7 +2545,7 @@ export declare namespace LevelControl {
2545
2545
  readonly moveToLevel: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
2546
2546
  level: import("../../tlv/TlvObject.js").FieldType<number>;
2547
2547
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
2548
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2548
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2549
2549
  /**
2550
2550
  * Dependency on On/Off cluster
2551
2551
  *
@@ -2563,7 +2563,7 @@ export declare namespace LevelControl {
2563
2563
  */
2564
2564
  coupleColorTempToLevel: BitFlag;
2565
2565
  }>>;
2566
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2566
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2567
2567
  /**
2568
2568
  * Dependency on On/Off cluster
2569
2569
  *
@@ -2738,7 +2738,7 @@ export declare namespace LevelControl {
2738
2738
  readonly moveToLevelWithOnOff: Command<import("../../tlv/TlvObject.js").TypeFromFields<{
2739
2739
  level: import("../../tlv/TlvObject.js").FieldType<number>;
2740
2740
  transitionTime: import("../../tlv/TlvObject.js").FieldType<number | null>;
2741
- optionsMask: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2741
+ optionsMask: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2742
2742
  /**
2743
2743
  * Dependency on On/Off cluster
2744
2744
  *
@@ -2756,7 +2756,7 @@ export declare namespace LevelControl {
2756
2756
  */
2757
2757
  coupleColorTempToLevel: BitFlag;
2758
2758
  }>>;
2759
- optionsOverride: import("../../tlv/TlvObject.js").FieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2759
+ optionsOverride: import("../../tlv/TlvObject.js").OptionalFieldType<import("../../schema/BitmapSchema.js").TypeFromPartialBitSchema<{
2760
2760
  /**
2761
2761
  * Dependency on On/Off cluster
2762
2762
  *
@@ -65,8 +65,8 @@ var LevelControl;
65
65
  LevelControl2.TlvMoveToLevelRequest = (0, import_TlvObject.TlvObject)({
66
66
  level: (0, import_TlvObject.TlvField)(0, import_TlvNumber.TlvUInt8.bound({ max: 254 })),
67
67
  transitionTime: (0, import_TlvObject.TlvField)(1, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16)),
68
- optionsMask: (0, import_TlvObject.TlvField)(2, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt8, LevelControl2.Options)),
69
- optionsOverride: (0, import_TlvObject.TlvField)(3, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt8, LevelControl2.Options))
68
+ optionsMask: (0, import_TlvObject.TlvOptionalField)(2, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt8, LevelControl2.Options)),
69
+ optionsOverride: (0, import_TlvObject.TlvOptionalField)(3, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt8, LevelControl2.Options))
70
70
  });
71
71
  let MoveMode;
72
72
  ((MoveMode2) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cluster/definitions/LevelControlCluster.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright 2022-2024 Matter.js Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*** THIS FILE IS GENERATED, DO NOT EDIT ***/\n\nimport { MutableCluster } from \"../mutation/MutableCluster.js\";\nimport {\n Attribute,\n OptionalAttribute,\n WritableAttribute,\n AccessLevel,\n Command,\n TlvNoResponse,\n OptionalWritableAttribute\n} from \"../Cluster.js\";\nimport { TlvUInt16, TlvUInt8, TlvBitmap, TlvEnum } from \"../../tlv/TlvNumber.js\";\nimport { TlvNullable } from \"../../tlv/TlvNullable.js\";\nimport { TlvField, TlvObject } from \"../../tlv/TlvObject.js\";\nimport { TypeFromSchema } from \"../../tlv/TlvSchema.js\";\nimport { BitFlag } from \"../../schema/BitmapSchema.js\";\nimport { ClusterType } from \"../ClusterType.js\";\nimport { Identity } from \"../../util/Type.js\";\nimport { ClusterRegistry } from \"../ClusterRegistry.js\";\n\nexport namespace LevelControl {\n /**\n * These are optional features supported by LevelControlCluster.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4\n */\n export enum Feature {\n /**\n * OnOff (OO)\n *\n * Dependency with the On/Off cluster\n */\n OnOff = \"OnOff\",\n\n /**\n * Lighting (LT)\n *\n * This feature supports an interface for controlling the level of a light source. For the CurrentLevel\n * attribute:\n *\n * A value of 0x00 shall NOT be used.\n *\n * A value of 0x01 shall indicate the minimum level that can be attained on a device. A value of 0xFE shall\n * indicate the maximum level that can be attained on a device. A value of null shall represent an undefined\n * value.\n *\n * All other values are application specific gradations from the minimum to the maximum level.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.2\n */\n Lighting = \"Lighting\",\n\n /**\n * Frequency (FQ)\n *\n * NOTE The Frequency feature is provisional.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.3\n */\n Frequency = \"Frequency\"\n }\n\n /**\n * Input to the LevelControl moveToClosestFrequency command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.5\n */\n export const TlvMoveToClosestFrequencyRequest = TlvObject({ frequency: TlvField(0, TlvUInt16) });\n\n /**\n * Input to the LevelControl moveToClosestFrequency command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.5\n */\n export interface MoveToClosestFrequencyRequest extends TypeFromSchema<typeof TlvMoveToClosestFrequencyRequest> {}\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.1\n */\n export const Options = {\n /**\n * Dependency on On/Off cluster\n *\n * This bit indicates if this cluster has a dependency with the On/Off cluster.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.1.1\n */\n executeIfOff: BitFlag(0),\n\n /**\n * Dependency on Color Control cluster\n *\n * This bit indicates if this cluster has a dependency with the Color Control cluster.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.1.2\n */\n coupleColorTempToLevel: BitFlag(1)\n };\n\n /**\n * Input to the LevelControl moveToLevel command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.1\n */\n export const TlvMoveToLevelRequest = TlvObject({\n level: TlvField(0, TlvUInt8.bound({ max: 254 })),\n transitionTime: TlvField(1, TlvNullable(TlvUInt16)),\n optionsMask: TlvField(2, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(3, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl moveToLevel command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.1\n */\n export interface MoveToLevelRequest extends TypeFromSchema<typeof TlvMoveToLevelRequest> {}\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.2\n */\n export enum MoveMode {\n /**\n * Increase the level\n */\n Up = 0,\n\n /**\n * Decrease the level\n */\n Down = 1\n }\n\n /**\n * Input to the LevelControl move command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2\n */\n export const TlvMoveRequest = TlvObject({\n /**\n * This field shall be one of the non-reserved values in MoveModeEnum.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2.1\n */\n moveMode: TlvField(0, TlvEnum<MoveMode>()),\n\n /**\n * This field shall indicate the rate of movement in units per second. The actual rate of movement SHOULD be as\n * close to this rate as the device is able. If the Rate field is equal to null, then the value in\n * DefaultMoveRate attribute shall be used. However, if the Rate field is equal to null and the DefaultMoveRate\n * attribute is not supported, or if the Rate field is equal to null and the value of the DefaultMoveRate\n * attribute is equal to null, then the device SHOULD move as fast as it is able. If the device is not able to\n * move at a variable rate, this field may be disregarded.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2.2\n */\n rate: TlvField(1, TlvNullable(TlvUInt8)),\n\n optionsMask: TlvField(2, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(3, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl move command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2\n */\n export interface MoveRequest extends TypeFromSchema<typeof TlvMoveRequest> {}\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.3\n */\n export enum StepMode {\n /**\n * Step upwards\n */\n Up = 0,\n\n /**\n * Step downwards\n */\n Down = 1\n }\n\n /**\n * Input to the LevelControl step command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3\n */\n export const TlvStepRequest = TlvObject({\n /**\n * This field shall be one of the non-reserved values in StepModeEnum.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3.1\n */\n stepMode: TlvField(0, TlvEnum<StepMode>()),\n\n /**\n * This field shall indicate the change to CurrentLevel.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3.2\n */\n stepSize: TlvField(1, TlvUInt8),\n\n /**\n * This field shall indicate the time that shall be taken to perform the step, in tenths of a second. A step is\n * a change in the CurrentLevel of StepSize units. The actual time taken SHOULD be as close to this as the\n * device is able. If the TransitionTime field is equal to null, the device SHOULD move as fast as it is able.\n *\n * If the device is not able to move at a variable rate, the TransitionTime field may be disregarded.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3.3\n */\n transitionTime: TlvField(2, TlvNullable(TlvUInt16)),\n\n optionsMask: TlvField(3, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(4, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl step command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3\n */\n export interface StepRequest extends TypeFromSchema<typeof TlvStepRequest> {}\n\n /**\n * Input to the LevelControl stop command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.4\n */\n export const TlvStopRequest = TlvObject({\n optionsMask: TlvField(0, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(1, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl stop command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.4\n */\n export interface StopRequest extends TypeFromSchema<typeof TlvStopRequest> {}\n\n /**\n * A LevelControlCluster supports these elements if it supports feature Lighting.\n */\n export const LightingComponent = MutableCluster.Component({\n attributes: {\n /**\n * Indicates the time remaining until the current command is complete - it is specified in 1/10ths of a\n * second.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.3\n */\n remainingTime: Attribute(0x1, TlvUInt16, { default: 0 }),\n\n /**\n * Indicates the minimum value of CurrentLevel that is capable of being assigned.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.4\n */\n minLevel: OptionalAttribute(0x2, TlvUInt8.bound({ min: 1 }), { default: 1 }),\n\n /**\n * Indicates the desired startup level for a device when it is supplied with power and this level shall be\n * reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel attribute are listed\n * below:\n *\n * This behavior does not apply to reboots associated with OTA. After an OTA restart, the CurrentLevel\n * attribute shall return to its value prior to the restart.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.15\n */\n startUpCurrentLevel: WritableAttribute(\n 0x4000,\n TlvNullable(TlvUInt8),\n { persistent: true, writeAcl: AccessLevel.Manage }\n )\n }\n });\n\n /**\n * A LevelControlCluster supports these elements if doesn't support feature LT.\n */\n export const NotLightingComponent = MutableCluster.Component({\n attributes: {\n /**\n * Indicates the minimum value of CurrentLevel that is capable of being assigned.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.4\n */\n minLevel: OptionalAttribute(0x2, TlvUInt8, { default: 0 })\n }\n });\n\n /**\n * A LevelControlCluster supports these elements if it supports feature Frequency.\n */\n export const FrequencyComponent = MutableCluster.Component({\n attributes: {\n /**\n * Indicates the frequency at which the device is at CurrentLevel. A CurrentFrequency of 0 is unknown.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.6\n */\n currentFrequency: Attribute(0x4, TlvUInt16, { scene: true, default: 0 }),\n\n /**\n * Indicates the minimum value of CurrentFrequency that is capable of being assigned. MinFrequency shall be\n * less than or equal to MaxFrequency. A value of 0 indicates undefined.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.7\n */\n minFrequency: Attribute(0x5, TlvUInt16, { default: 0 }),\n\n /**\n * Indicates the maximum value of CurrentFrequency that is capable of being assigned. MaxFrequency shall be\n * greater than or equal to MinFrequency. A value of 0 indicates undefined.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.8\n */\n maxFrequency: Attribute(0x6, TlvUInt16, { default: 0 })\n },\n\n commands: {\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.5\n */\n moveToClosestFrequency: Command(0x8, TlvMoveToClosestFrequencyRequest, 0x8, TlvNoResponse)\n }\n });\n\n /**\n * These elements and properties are present in all LevelControl clusters.\n */\n export const Base = MutableCluster.Component({\n id: 0x8,\n name: \"LevelControl\",\n revision: 5,\n\n features: {\n /**\n * OnOff\n *\n * Dependency with the On/Off cluster\n */\n onOff: BitFlag(0),\n\n /**\n * Lighting\n *\n * This feature supports an interface for controlling the level of a light source. For the CurrentLevel\n * attribute:\n *\n * A value of 0x00 shall NOT be used.\n *\n * A value of 0x01 shall indicate the minimum level that can be attained on a device. A value of 0xFE shall\n * indicate the maximum level that can be attained on a device. A value of null shall represent an\n * undefined value.\n *\n * All other values are application specific gradations from the minimum to the maximum level.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.2\n */\n lighting: BitFlag(1),\n\n /**\n * Frequency\n *\n * NOTE The Frequency feature is provisional.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.3\n */\n frequency: BitFlag(2)\n },\n\n attributes: {\n /**\n * Indicates the current level of this device. The meaning of 'level' is device dependent.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.2\n */\n currentLevel: Attribute(0x0, TlvNullable(TlvUInt8), { scene: true, persistent: true, default: null }),\n\n /**\n * Indicates the maximum value of CurrentLevel that is capable of being assigned.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.5\n */\n maxLevel: OptionalAttribute(0x3, TlvUInt8.bound({ max: 254 }), { default: 254 }),\n\n /**\n * Indicates the selected options of the device.\n *\n * The Options attribute is a bitmap that determines the default behavior of some cluster commands. Each\n * command that is dependent on the Options attribute shall first construct a temporary Options bitmap that\n * is in effect during the command processing. The temporary Options bitmap has the same format and meaning\n * as the Options attribute, but includes any bits that may be overridden by command fields.\n *\n * This attribute is meant to be changed only during commissioning.\n *\n * Command execution shall NOT continue beyond the Options processing if all of these criteria are true:\n *\n * \u2022 The command is one of the \u2018without On/Off\u2019 commands: Move, Move to Level, Step, or Stop.\n *\n * \u2022 The On/Off cluster exists on the same endpoint as this cluster.\n *\n * \u2022 The OnOff attribute of the On/Off cluster, on this endpoint, is FALSE.\n *\n * \u2022 The value of the ExecuteIfOff bit is 0.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.9\n */\n options: WritableAttribute(0xf, TlvBitmap(TlvUInt8, Options)),\n\n /**\n * Indicates the time taken to move to or from the target level when On or Off commands are received by an\n * On/Off cluster on the same endpoint. It is specified in 1/10ths of a second.\n *\n * The actual time taken SHOULD be as close to OnOffTransitionTime as the device is able. Please note that\n * if the device is not able to move at a variable rate, the OnOffTransitionTime attribute SHOULD NOT be\n * implemented.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.10\n */\n onOffTransitionTime: OptionalWritableAttribute(0x10, TlvUInt16, { default: 0 }),\n\n /**\n * Indicates the value that the CurrentLevel attribute is set to when the OnOff attribute of an On/Off\n * cluster on the same endpoint is set to TRUE, as a result of processing an On/Off cluster command. If the\n * OnLevel attribute is not implemented, or is set to the null value, it has no effect. For more details\n * see Effect of On/Off Commands on the CurrentLevel Attribute.\n *\n * OnLevel represents a mandatory field that was previously not present or optional. Implementers should be\n * aware that older devices may not implement it.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.11\n */\n onLevel: WritableAttribute(0x11, TlvNullable(TlvUInt8), { default: null }),\n\n /**\n * Indicates the time taken to move the current level from the minimum level to the maximum level when an\n * On command is received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a\n * second. If this attribute is not implemented, or contains a null value, the OnOffTransitionTime shall be\n * used instead.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.12\n */\n onTransitionTime: OptionalWritableAttribute(0x12, TlvNullable(TlvUInt16), { default: null }),\n\n /**\n * Indicates the time taken to move the current level from the maximum level to the minimum level when an\n * Off command is received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a\n * second. If this attribute is not implemented, or contains a null value, the OnOffTransitionTime shall be\n * used instead.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.13\n */\n offTransitionTime: OptionalWritableAttribute(0x13, TlvNullable(TlvUInt16), { default: null }),\n\n /**\n * Indicates the movement rate, in units per second, when a Move command is received with a null value Rate\n * parameter.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.14\n */\n defaultMoveRate: OptionalWritableAttribute(0x14, TlvNullable(TlvUInt8))\n },\n\n commands: {\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.1\n */\n moveToLevel: Command(0x0, TlvMoveToLevelRequest, 0x0, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2\n */\n move: Command(0x1, TlvMoveRequest, 0x1, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3\n */\n step: Command(0x2, TlvStepRequest, 0x2, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.4\n */\n stop: Command(0x3, TlvStopRequest, 0x3, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n moveToLevelWithOnOff: Command(0x4, TlvMoveToLevelRequest, 0x4, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n moveWithOnOff: Command(0x5, TlvMoveRequest, 0x5, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n stepWithOnOff: Command(0x6, TlvStepRequest, 0x6, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n stopWithOnOff: Command(0x7, TlvStopRequest, 0x7, TlvNoResponse)\n },\n\n /**\n * This metadata controls which LevelControlCluster elements matter.js activates for specific feature\n * combinations.\n */\n extensions: MutableCluster.Extensions(\n { flags: { lighting: true }, component: LightingComponent },\n { flags: { lighting: false }, component: NotLightingComponent },\n { flags: { frequency: true }, component: FrequencyComponent }\n )\n });\n\n /**\n * @see {@link Cluster}\n */\n export const ClusterInstance = MutableCluster(\n { ...Base, supportedFeatures: { onOff: true }, base: ClusterType(Base) },\n NotLightingComponent\n );\n\n /**\n * This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for\n * example the brightness of a light, the degree of closure of a door, or the power output of a heater.\n *\n * LevelControlCluster supports optional features that you can enable with the LevelControlCluster.with() factory\n * method.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6\n */\n export interface Cluster extends Identity<typeof ClusterInstance> {}\n\n export const Cluster: Cluster = ClusterInstance;\n const LT = { lighting: true };\n const FQ = { frequency: true };\n\n /**\n * @see {@link Complete}\n */\n export const CompleteInstance = MutableCluster({\n id: Cluster.id,\n name: Cluster.name,\n revision: Cluster.revision,\n features: Cluster.features,\n\n attributes: {\n ...Cluster.attributes,\n remainingTime: MutableCluster.AsConditional(\n LightingComponent.attributes.remainingTime,\n { mandatoryIf: [LT] }\n ),\n minLevel: MutableCluster.AsConditional(LightingComponent.attributes.minLevel, { optionalIf: [LT] }),\n currentFrequency: MutableCluster.AsConditional(\n FrequencyComponent.attributes.currentFrequency,\n { mandatoryIf: [FQ] }\n ),\n minFrequency: MutableCluster.AsConditional(\n FrequencyComponent.attributes.minFrequency,\n { mandatoryIf: [FQ] }\n ),\n maxFrequency: MutableCluster.AsConditional(\n FrequencyComponent.attributes.maxFrequency,\n { mandatoryIf: [FQ] }\n ),\n startUpCurrentLevel: MutableCluster.AsConditional(\n LightingComponent.attributes.startUpCurrentLevel,\n { mandatoryIf: [LT] }\n )\n },\n\n commands: {\n ...Cluster.commands,\n moveToClosestFrequency: MutableCluster.AsConditional(\n FrequencyComponent.commands.moveToClosestFrequency,\n { mandatoryIf: [FQ] }\n )\n }\n });\n\n /**\n * This cluster supports all LevelControl features. It may support illegal feature combinations.\n *\n * If you use this cluster you must manually specify which features are active and ensure the set of active\n * features is legal per the Matter specification.\n */\n export interface Complete extends Identity<typeof CompleteInstance> {}\n\n export const Complete: Complete = CompleteInstance;\n}\n\nexport type LevelControlCluster = LevelControl.Cluster;\nexport const LevelControlCluster = LevelControl.Cluster;\nClusterRegistry.register(LevelControl.Complete);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,4BAA+B;AAC/B,qBAQO;AACP,uBAAwD;AACxD,yBAA4B;AAC5B,uBAAoC;AAEpC,0BAAwB;AACxB,yBAA4B;AAE5B,6BAAgC;AAzBhC;AAAA;AAAA;AAAA;AAAA;AA2BO,IAAU;AAAA,CAAV,CAAUA,kBAAV;AAMI,MAAK;AAAL,IAAKC,aAAL;AAMH,IAAAA,SAAA,WAAQ;AAkBR,IAAAA,SAAA,cAAW;AASX,IAAAA,SAAA,eAAY;AAAA,KAjCJ,UAAAD,cAAA,YAAAA,cAAA;AAyCL,EAAMA,cAAA,uCAAmC,4BAAU,EAAE,eAAW,2BAAS,GAAG,0BAAS,EAAE,CAAC;AAYxF,EAAMA,cAAA,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQnB,kBAAc,6BAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASvB,4BAAwB,6BAAQ,CAAC;AAAA,EACrC;AAOO,EAAMA,cAAA,4BAAwB,4BAAU;AAAA,IAC3C,WAAO,2BAAS,GAAG,0BAAS,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC;AAAA,IAC/C,oBAAgB,2BAAS,OAAG,gCAAY,0BAAS,CAAC;AAAA,IAClD,iBAAa,2BAAS,OAAG,4BAAU,2BAAUA,cAAA,OAAO,CAAC;AAAA,IACrD,qBAAiB,2BAAS,OAAG,4BAAU,2BAAUA,cAAA,OAAO,CAAC;AAAA,EAC7D,CAAC;AAYM,MAAK;AAAL,I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;AAAA,MACX,wBAAwB,qCAAe;AAAA,QACnCA,cAAA,mBAAmB,SAAS;AAAA,QAC5B,EAAE,aAAa,CAAC,EAAE,EAAE;AAAA,MACxB;AAAA,IACJ;AAAA,EACJ,CAAC;AAUM,EAAMA,cAAA,WAAqBA,cAAA;AAAA,GAhkBrB;AAokBV,MAAM,sBAAsB,aAAa;AAChD,uCAAgB,SAAS,aAAa,QAAQ;",
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2022-2024 Matter.js Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*** THIS FILE IS GENERATED, DO NOT EDIT ***/\n\nimport { MutableCluster } from \"../mutation/MutableCluster.js\";\nimport {\n Attribute,\n OptionalAttribute,\n WritableAttribute,\n AccessLevel,\n Command,\n TlvNoResponse,\n OptionalWritableAttribute\n} from \"../Cluster.js\";\nimport { TlvUInt16, TlvUInt8, TlvBitmap, TlvEnum } from \"../../tlv/TlvNumber.js\";\nimport { TlvNullable } from \"../../tlv/TlvNullable.js\";\nimport { TlvField, TlvObject, TlvOptionalField } from \"../../tlv/TlvObject.js\";\nimport { TypeFromSchema } from \"../../tlv/TlvSchema.js\";\nimport { BitFlag } from \"../../schema/BitmapSchema.js\";\nimport { ClusterType } from \"../ClusterType.js\";\nimport { Identity } from \"../../util/Type.js\";\nimport { ClusterRegistry } from \"../ClusterRegistry.js\";\n\nexport namespace LevelControl {\n /**\n * These are optional features supported by LevelControlCluster.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4\n */\n export enum Feature {\n /**\n * OnOff (OO)\n *\n * Dependency with the On/Off cluster\n */\n OnOff = \"OnOff\",\n\n /**\n * Lighting (LT)\n *\n * This feature supports an interface for controlling the level of a light source. For the CurrentLevel\n * attribute:\n *\n * A value of 0x00 shall NOT be used.\n *\n * A value of 0x01 shall indicate the minimum level that can be attained on a device. A value of 0xFE shall\n * indicate the maximum level that can be attained on a device. A value of null shall represent an undefined\n * value.\n *\n * All other values are application specific gradations from the minimum to the maximum level.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.2\n */\n Lighting = \"Lighting\",\n\n /**\n * Frequency (FQ)\n *\n * NOTE The Frequency feature is provisional.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.3\n */\n Frequency = \"Frequency\"\n }\n\n /**\n * Input to the LevelControl moveToClosestFrequency command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.5\n */\n export const TlvMoveToClosestFrequencyRequest = TlvObject({ frequency: TlvField(0, TlvUInt16) });\n\n /**\n * Input to the LevelControl moveToClosestFrequency command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.5\n */\n export interface MoveToClosestFrequencyRequest extends TypeFromSchema<typeof TlvMoveToClosestFrequencyRequest> {}\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.1\n */\n export const Options = {\n /**\n * Dependency on On/Off cluster\n *\n * This bit indicates if this cluster has a dependency with the On/Off cluster.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.1.1\n */\n executeIfOff: BitFlag(0),\n\n /**\n * Dependency on Color Control cluster\n *\n * This bit indicates if this cluster has a dependency with the Color Control cluster.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.1.2\n */\n coupleColorTempToLevel: BitFlag(1)\n };\n\n /**\n * Input to the LevelControl moveToLevel command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.1\n */\n export const TlvMoveToLevelRequest = TlvObject({\n level: TlvField(0, TlvUInt8.bound({ max: 254 })),\n transitionTime: TlvField(1, TlvNullable(TlvUInt16)),\n optionsMask: TlvOptionalField(2, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvOptionalField(3, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl moveToLevel command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.1\n */\n export interface MoveToLevelRequest extends TypeFromSchema<typeof TlvMoveToLevelRequest> {}\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.2\n */\n export enum MoveMode {\n /**\n * Increase the level\n */\n Up = 0,\n\n /**\n * Decrease the level\n */\n Down = 1\n }\n\n /**\n * Input to the LevelControl move command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2\n */\n export const TlvMoveRequest = TlvObject({\n /**\n * This field shall be one of the non-reserved values in MoveModeEnum.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2.1\n */\n moveMode: TlvField(0, TlvEnum<MoveMode>()),\n\n /**\n * This field shall indicate the rate of movement in units per second. The actual rate of movement SHOULD be as\n * close to this rate as the device is able. If the Rate field is equal to null, then the value in\n * DefaultMoveRate attribute shall be used. However, if the Rate field is equal to null and the DefaultMoveRate\n * attribute is not supported, or if the Rate field is equal to null and the value of the DefaultMoveRate\n * attribute is equal to null, then the device SHOULD move as fast as it is able. If the device is not able to\n * move at a variable rate, this field may be disregarded.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2.2\n */\n rate: TlvField(1, TlvNullable(TlvUInt8)),\n\n optionsMask: TlvField(2, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(3, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl move command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2\n */\n export interface MoveRequest extends TypeFromSchema<typeof TlvMoveRequest> {}\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.5.3\n */\n export enum StepMode {\n /**\n * Step upwards\n */\n Up = 0,\n\n /**\n * Step downwards\n */\n Down = 1\n }\n\n /**\n * Input to the LevelControl step command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3\n */\n export const TlvStepRequest = TlvObject({\n /**\n * This field shall be one of the non-reserved values in StepModeEnum.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3.1\n */\n stepMode: TlvField(0, TlvEnum<StepMode>()),\n\n /**\n * This field shall indicate the change to CurrentLevel.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3.2\n */\n stepSize: TlvField(1, TlvUInt8),\n\n /**\n * This field shall indicate the time that shall be taken to perform the step, in tenths of a second. A step is\n * a change in the CurrentLevel of StepSize units. The actual time taken SHOULD be as close to this as the\n * device is able. If the TransitionTime field is equal to null, the device SHOULD move as fast as it is able.\n *\n * If the device is not able to move at a variable rate, the TransitionTime field may be disregarded.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3.3\n */\n transitionTime: TlvField(2, TlvNullable(TlvUInt16)),\n\n optionsMask: TlvField(3, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(4, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl step command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3\n */\n export interface StepRequest extends TypeFromSchema<typeof TlvStepRequest> {}\n\n /**\n * Input to the LevelControl stop command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.4\n */\n export const TlvStopRequest = TlvObject({\n optionsMask: TlvField(0, TlvBitmap(TlvUInt8, Options)),\n optionsOverride: TlvField(1, TlvBitmap(TlvUInt8, Options))\n });\n\n /**\n * Input to the LevelControl stop command\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.4\n */\n export interface StopRequest extends TypeFromSchema<typeof TlvStopRequest> {}\n\n /**\n * A LevelControlCluster supports these elements if it supports feature Lighting.\n */\n export const LightingComponent = MutableCluster.Component({\n attributes: {\n /**\n * Indicates the time remaining until the current command is complete - it is specified in 1/10ths of a\n * second.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.3\n */\n remainingTime: Attribute(0x1, TlvUInt16, { default: 0 }),\n\n /**\n * Indicates the minimum value of CurrentLevel that is capable of being assigned.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.4\n */\n minLevel: OptionalAttribute(0x2, TlvUInt8.bound({ min: 1 }), { default: 1 }),\n\n /**\n * Indicates the desired startup level for a device when it is supplied with power and this level shall be\n * reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel attribute are listed\n * below:\n *\n * This behavior does not apply to reboots associated with OTA. After an OTA restart, the CurrentLevel\n * attribute shall return to its value prior to the restart.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.15\n */\n startUpCurrentLevel: WritableAttribute(\n 0x4000,\n TlvNullable(TlvUInt8),\n { persistent: true, writeAcl: AccessLevel.Manage }\n )\n }\n });\n\n /**\n * A LevelControlCluster supports these elements if doesn't support feature LT.\n */\n export const NotLightingComponent = MutableCluster.Component({\n attributes: {\n /**\n * Indicates the minimum value of CurrentLevel that is capable of being assigned.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.4\n */\n minLevel: OptionalAttribute(0x2, TlvUInt8, { default: 0 })\n }\n });\n\n /**\n * A LevelControlCluster supports these elements if it supports feature Frequency.\n */\n export const FrequencyComponent = MutableCluster.Component({\n attributes: {\n /**\n * Indicates the frequency at which the device is at CurrentLevel. A CurrentFrequency of 0 is unknown.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.6\n */\n currentFrequency: Attribute(0x4, TlvUInt16, { scene: true, default: 0 }),\n\n /**\n * Indicates the minimum value of CurrentFrequency that is capable of being assigned. MinFrequency shall be\n * less than or equal to MaxFrequency. A value of 0 indicates undefined.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.7\n */\n minFrequency: Attribute(0x5, TlvUInt16, { default: 0 }),\n\n /**\n * Indicates the maximum value of CurrentFrequency that is capable of being assigned. MaxFrequency shall be\n * greater than or equal to MinFrequency. A value of 0 indicates undefined.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.8\n */\n maxFrequency: Attribute(0x6, TlvUInt16, { default: 0 })\n },\n\n commands: {\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.5\n */\n moveToClosestFrequency: Command(0x8, TlvMoveToClosestFrequencyRequest, 0x8, TlvNoResponse)\n }\n });\n\n /**\n * These elements and properties are present in all LevelControl clusters.\n */\n export const Base = MutableCluster.Component({\n id: 0x8,\n name: \"LevelControl\",\n revision: 5,\n\n features: {\n /**\n * OnOff\n *\n * Dependency with the On/Off cluster\n */\n onOff: BitFlag(0),\n\n /**\n * Lighting\n *\n * This feature supports an interface for controlling the level of a light source. For the CurrentLevel\n * attribute:\n *\n * A value of 0x00 shall NOT be used.\n *\n * A value of 0x01 shall indicate the minimum level that can be attained on a device. A value of 0xFE shall\n * indicate the maximum level that can be attained on a device. A value of null shall represent an\n * undefined value.\n *\n * All other values are application specific gradations from the minimum to the maximum level.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.2\n */\n lighting: BitFlag(1),\n\n /**\n * Frequency\n *\n * NOTE The Frequency feature is provisional.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.4.3\n */\n frequency: BitFlag(2)\n },\n\n attributes: {\n /**\n * Indicates the current level of this device. The meaning of 'level' is device dependent.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.2\n */\n currentLevel: Attribute(0x0, TlvNullable(TlvUInt8), { scene: true, persistent: true, default: null }),\n\n /**\n * Indicates the maximum value of CurrentLevel that is capable of being assigned.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.5\n */\n maxLevel: OptionalAttribute(0x3, TlvUInt8.bound({ max: 254 }), { default: 254 }),\n\n /**\n * Indicates the selected options of the device.\n *\n * The Options attribute is a bitmap that determines the default behavior of some cluster commands. Each\n * command that is dependent on the Options attribute shall first construct a temporary Options bitmap that\n * is in effect during the command processing. The temporary Options bitmap has the same format and meaning\n * as the Options attribute, but includes any bits that may be overridden by command fields.\n *\n * This attribute is meant to be changed only during commissioning.\n *\n * Command execution shall NOT continue beyond the Options processing if all of these criteria are true:\n *\n * \u2022 The command is one of the \u2018without On/Off\u2019 commands: Move, Move to Level, Step, or Stop.\n *\n * \u2022 The On/Off cluster exists on the same endpoint as this cluster.\n *\n * \u2022 The OnOff attribute of the On/Off cluster, on this endpoint, is FALSE.\n *\n * \u2022 The value of the ExecuteIfOff bit is 0.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.9\n */\n options: WritableAttribute(0xf, TlvBitmap(TlvUInt8, Options)),\n\n /**\n * Indicates the time taken to move to or from the target level when On or Off commands are received by an\n * On/Off cluster on the same endpoint. It is specified in 1/10ths of a second.\n *\n * The actual time taken SHOULD be as close to OnOffTransitionTime as the device is able. Please note that\n * if the device is not able to move at a variable rate, the OnOffTransitionTime attribute SHOULD NOT be\n * implemented.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.10\n */\n onOffTransitionTime: OptionalWritableAttribute(0x10, TlvUInt16, { default: 0 }),\n\n /**\n * Indicates the value that the CurrentLevel attribute is set to when the OnOff attribute of an On/Off\n * cluster on the same endpoint is set to TRUE, as a result of processing an On/Off cluster command. If the\n * OnLevel attribute is not implemented, or is set to the null value, it has no effect. For more details\n * see Effect of On/Off Commands on the CurrentLevel Attribute.\n *\n * OnLevel represents a mandatory field that was previously not present or optional. Implementers should be\n * aware that older devices may not implement it.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.11\n */\n onLevel: WritableAttribute(0x11, TlvNullable(TlvUInt8), { default: null }),\n\n /**\n * Indicates the time taken to move the current level from the minimum level to the maximum level when an\n * On command is received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a\n * second. If this attribute is not implemented, or contains a null value, the OnOffTransitionTime shall be\n * used instead.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.12\n */\n onTransitionTime: OptionalWritableAttribute(0x12, TlvNullable(TlvUInt16), { default: null }),\n\n /**\n * Indicates the time taken to move the current level from the maximum level to the minimum level when an\n * Off command is received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a\n * second. If this attribute is not implemented, or contains a null value, the OnOffTransitionTime shall be\n * used instead.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.13\n */\n offTransitionTime: OptionalWritableAttribute(0x13, TlvNullable(TlvUInt16), { default: null }),\n\n /**\n * Indicates the movement rate, in units per second, when a Move command is received with a null value Rate\n * parameter.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.6.14\n */\n defaultMoveRate: OptionalWritableAttribute(0x14, TlvNullable(TlvUInt8))\n },\n\n commands: {\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.1\n */\n moveToLevel: Command(0x0, TlvMoveToLevelRequest, 0x0, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.2\n */\n move: Command(0x1, TlvMoveRequest, 0x1, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.3\n */\n step: Command(0x2, TlvStepRequest, 0x2, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7.4\n */\n stop: Command(0x3, TlvStopRequest, 0x3, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n moveToLevelWithOnOff: Command(0x4, TlvMoveToLevelRequest, 0x4, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n moveWithOnOff: Command(0x5, TlvMoveRequest, 0x5, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n stepWithOnOff: Command(0x6, TlvStepRequest, 0x6, TlvNoResponse),\n\n /**\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6.7\n */\n stopWithOnOff: Command(0x7, TlvStopRequest, 0x7, TlvNoResponse)\n },\n\n /**\n * This metadata controls which LevelControlCluster elements matter.js activates for specific feature\n * combinations.\n */\n extensions: MutableCluster.Extensions(\n { flags: { lighting: true }, component: LightingComponent },\n { flags: { lighting: false }, component: NotLightingComponent },\n { flags: { frequency: true }, component: FrequencyComponent }\n )\n });\n\n /**\n * @see {@link Cluster}\n */\n export const ClusterInstance = MutableCluster(\n { ...Base, supportedFeatures: { onOff: true }, base: ClusterType(Base) },\n NotLightingComponent\n );\n\n /**\n * This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for\n * example the brightness of a light, the degree of closure of a door, or the power output of a heater.\n *\n * LevelControlCluster supports optional features that you can enable with the LevelControlCluster.with() factory\n * method.\n *\n * @see {@link MatterSpecification.v13.Cluster} \u00A7 1.6\n */\n export interface Cluster extends Identity<typeof ClusterInstance> {}\n\n export const Cluster: Cluster = ClusterInstance;\n const LT = { lighting: true };\n const FQ = { frequency: true };\n\n /**\n * @see {@link Complete}\n */\n export const CompleteInstance = MutableCluster({\n id: Cluster.id,\n name: Cluster.name,\n revision: Cluster.revision,\n features: Cluster.features,\n\n attributes: {\n ...Cluster.attributes,\n remainingTime: MutableCluster.AsConditional(\n LightingComponent.attributes.remainingTime,\n { mandatoryIf: [LT] }\n ),\n minLevel: MutableCluster.AsConditional(LightingComponent.attributes.minLevel, { optionalIf: [LT] }),\n currentFrequency: MutableCluster.AsConditional(\n FrequencyComponent.attributes.currentFrequency,\n { mandatoryIf: [FQ] }\n ),\n minFrequency: MutableCluster.AsConditional(\n FrequencyComponent.attributes.minFrequency,\n { mandatoryIf: [FQ] }\n ),\n maxFrequency: MutableCluster.AsConditional(\n FrequencyComponent.attributes.maxFrequency,\n { mandatoryIf: [FQ] }\n ),\n startUpCurrentLevel: MutableCluster.AsConditional(\n LightingComponent.attributes.startUpCurrentLevel,\n { mandatoryIf: [LT] }\n )\n },\n\n commands: {\n ...Cluster.commands,\n moveToClosestFrequency: MutableCluster.AsConditional(\n FrequencyComponent.commands.moveToClosestFrequency,\n { mandatoryIf: [FQ] }\n )\n }\n });\n\n /**\n * This cluster supports all LevelControl features. It may support illegal feature combinations.\n *\n * If you use this cluster you must manually specify which features are active and ensure the set of active\n * features is legal per the Matter specification.\n */\n export interface Complete extends Identity<typeof CompleteInstance> {}\n\n export const Complete: Complete = CompleteInstance;\n}\n\nexport type LevelControlCluster = LevelControl.Cluster;\nexport const LevelControlCluster = LevelControl.Cluster;\nClusterRegistry.register(LevelControl.Complete);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,4BAA+B;AAC/B,qBAQO;AACP,uBAAwD;AACxD,yBAA4B;AAC5B,uBAAsD;AAEtD,0BAAwB;AACxB,yBAA4B;AAE5B,6BAAgC;AAzBhC;AAAA;AAAA;AAAA;AAAA;AA2BO,IAAU;AAAA,CAAV,CAAUA,kBAAV;AAMI,MAAK;AAAL,IAAKC,aAAL;AAMH,IAAAA,SAAA,WAAQ;AAkBR,IAAAA,SAAA,cAAW;AASX,IAAAA,SAAA,eAAY;AAAA,KAjCJ,UAAAD,cAAA,YAAAA,cAAA;AAyCL,EAAMA,cAAA,uCAAmC,4BAAU,EAAE,eAAW,2BAAS,GAAG,0BAAS,EAAE,CAAC;AAYxF,EAAMA,cAAA,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQnB,kBAAc,6BAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASvB,4BAAwB,6BAAQ,CAAC;AAAA,EACrC;AAOO,EAAMA,cAAA,4BAAwB,4BAAU;AAAA,IAC3C,WAAO,2BAAS,GAAG,0BAAS,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC;AAAA,IAC/C,oBAAgB,2BAAS,OAAG,gCAAY,0BAAS,CAAC;AAAA,IAClD,iBAAa,mCAAiB,OAAG,4BAAU,2BAAUA,cAAA,OAAO,CAAC;AAAA,IAC7D,qBAAiB,mCAAiB,OAAG,4BAAU,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