"use strict";
var import_Resource = require("#models/Resource.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import_Resource.Resource.add({
  tag: "cluster",
  name: "LevelControl",
  pics: "LVL",
  xref: "cluster\xA71.6",
  details: "This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for example the brightness of a light, the degree of closure of a door, or the power output of a heater.",
  children: [
    {
      tag: "attribute",
      name: "FeatureMap",
      xref: "cluster\xA71.6.4",
      children: [
        { tag: "field", name: "OO", details: "Dependency with the On/Off cluster" },
        {
          tag: "field",
          name: "LT",
          xref: "cluster\xA71.6.4.2",
          details: "This feature supports an interface for controlling the level of a light source. For the CurrentLevel attribute:\nA value of 0x00 shall NOT be used.\nA value of 0x01 shall indicate the minimum level that can be attained on a device. A value of 0xFE shall indicate the maximum level that can be attained on a device. A value of null shall represent an undefined value.\nAll other values are application specific gradations from the minimum to the maximum level."
        },
        {
          tag: "field",
          name: "FQ",
          xref: "cluster\xA71.6.4.3",
          details: "NOTE The Frequency feature is provisional."
        }
      ]
    },
    {
      tag: "attribute",
      name: "CurrentLevel",
      xref: "cluster\xA71.6.6.2",
      details: "Indicates the current level of this device. The meaning of 'level' is device dependent.\nChanges to this attribute shall only be marked as reportable in the following cases:\n  \u2022 At most once per second, or\n  \u2022 At the end of the movement/transition, or\n  \u2022 When it changes from null to any other value and vice versa."
    },
    {
      tag: "attribute",
      name: "RemainingTime",
      xref: "cluster\xA71.6.6.3",
      details: "Indicates the time remaining until the current command is complete - it is specified in 1/10ths of a second.\nChanges to this attribute shall only be marked as reportable in the following cases:\n  \u2022 When it changes from 0 to any value higher than 10, or\n  \u2022 When it changes, with a delta larger than 10, caused by the invoke of a command, or\n  \u2022 When it changes to 0.\nFor commands with a transition time or changes to the transition time less than 1 second, changes to this attribute shall NOT be reported.\nAs this attribute is not being reported during a regular countdown, clients SHOULD NOT rely on the reporting of this attribute in order to keep track of the remaining duration."
    },
    {
      tag: "attribute",
      name: "MinLevel",
      discriminator: "[LT]",
      xref: "cluster\xA71.6.6.4",
      details: "Indicates the minimum value of CurrentLevel that is capable of being assigned."
    },
    {
      tag: "attribute",
      name: "MinLevel",
      discriminator: "[!LT]",
      xref: "cluster\xA71.6.6.4",
      details: "Indicates the minimum value of CurrentLevel that is capable of being assigned."
    },
    {
      tag: "attribute",
      name: "MaxLevel",
      xref: "cluster\xA71.6.6.5",
      details: "Indicates the maximum value of CurrentLevel that is capable of being assigned."
    },
    {
      tag: "attribute",
      name: "CurrentFrequency",
      xref: "cluster\xA71.6.6.6",
      details: "Indicates the frequency at which the device is at CurrentLevel. A CurrentFrequency of 0 is unknown.\nChanges to this attribute shall only be marked as reportable in the following cases:\n  \u2022 At most once per second, or\n  \u2022 At the start of the movement/transition, or\n  \u2022 At the end of the movement/transition."
    },
    {
      tag: "attribute",
      name: "MinFrequency",
      xref: "cluster\xA71.6.6.7",
      details: "Indicates the minimum value of CurrentFrequency that is capable of being assigned. MinFrequency shall be less than or equal to MaxFrequency. A value of 0 indicates undefined."
    },
    {
      tag: "attribute",
      name: "MaxFrequency",
      xref: "cluster\xA71.6.6.8",
      details: "Indicates the maximum value of CurrentFrequency that is capable of being assigned. MaxFrequency shall be greater than or equal to MinFrequency. A value of 0 indicates undefined."
    },
    {
      tag: "attribute",
      name: "OnOffTransitionTime",
      xref: "cluster\xA71.6.6.10",
      details: "Indicates the time taken to move to or from the target level when On or Off commands are received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a second.\nThe actual time taken SHOULD be as close to OnOffTransitionTime as the device is able. Please note that if the device is not able to move at a variable rate, the OnOffTransitionTime attribute SHOULD NOT be implemented."
    },
    {
      tag: "attribute",
      name: "OnLevel",
      xref: "cluster\xA71.6.6.11",
      details: "Indicates the value that the CurrentLevel attribute is set to when the OnOff attribute of an On/Off cluster on the same endpoint is set to TRUE, as a result of processing an On/Off cluster command. If the OnLevel attribute is not implemented, or is set to the null value, it has no effect. For more details see Effect of On/Off Commands on the CurrentLevel attribute.\nOnLevel represents a mandatory field that was previously not present or optional. Implementers should be aware that older devices may not implement it."
    },
    {
      tag: "attribute",
      name: "OnTransitionTime",
      xref: "cluster\xA71.6.6.12",
      details: "Indicates the time taken to move the current level from the minimum level to the maximum level when an On command is received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a second. If this attribute is not implemented, or contains a null value, the OnOffTransitionTime shall be used instead."
    },
    {
      tag: "attribute",
      name: "OffTransitionTime",
      xref: "cluster\xA71.6.6.13",
      details: "Indicates the time taken to move the current level from the maximum level to the minimum level when an Off command is received by an On/Off cluster on the same endpoint. It is specified in 1/10ths of a second. If this attribute is not implemented, or contains a null value, the OnOffTransitionTime shall be used instead."
    },
    {
      tag: "attribute",
      name: "DefaultMoveRate",
      xref: "cluster\xA71.6.6.14",
      details: "Indicates the movement rate, in units per second, when a Move command is received with a null value Rate parameter."
    },
    {
      tag: "attribute",
      name: "Options",
      xref: "cluster\xA71.6.6.9",
      details: "Indicates the selected options of the device.\nThe Options attribute is a bitmap that determines the default behavior of some cluster commands. Each command that is dependent on the Options attribute shall first construct a temporary Options bitmap that is in effect during the command processing. The temporary Options bitmap has the same format and meaning as the Options attribute, but includes any bits that may be overridden by command fields.\nThis attribute is meant to be changed only during commissioning.\nCommand execution shall NOT continue beyond the Options processing if all of these criteria are true:\n  \u2022 The command is one of the \u2018without On/Off\u2019 commands: Move, Move to Level, Step, or Stop.\n  \u2022 The On/Off cluster exists on the same endpoint as this cluster.\n  \u2022 The OnOff attribute of the On/Off cluster, on this endpoint, is FALSE.\n  \u2022 The value of the ExecuteIfOff bit is 0."
    },
    {
      tag: "attribute",
      name: "StartUpCurrentLevel",
      xref: "cluster\xA71.6.6.15",
      details: "Indicates the desired startup level for a device when it is supplied with power and this level shall be reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel attribute are listed below:\nThis behavior does not apply to reboots associated with OTA. After an OTA restart, the CurrentLevel attribute shall return to its value prior to the restart."
    },
    { tag: "command", name: "MoveToLevel", xref: "cluster\xA71.6.7.1" },
    {
      tag: "command",
      name: "Move",
      xref: "cluster\xA71.6.7.2",
      children: [
        {
          tag: "field",
          name: "MoveMode",
          xref: "cluster\xA71.6.7.2.1",
          details: "This field shall be one of the non-reserved values in MoveModeEnum."
        },
        {
          tag: "field",
          name: "Rate",
          xref: "cluster\xA71.6.7.2.2",
          details: "This field shall indicate the rate of movement in units per second. The actual rate of movement SHOULD be as close to this rate as the device is able. If the Rate field is null, then the value of the DefaultMoveRate attribute shall be used if that attribute is supported and its value is not null. If the Rate field is null and the DefaultMoveRate attribute is either not supported or set to null, then the device SHOULD move as fast as it is able. If the device is not able to move at a variable rate, this field may be disregarded."
        }
      ]
    },
    {
      tag: "command",
      name: "Step",
      xref: "cluster\xA71.6.7.3",
      children: [
        {
          tag: "field",
          name: "StepMode",
          xref: "cluster\xA71.6.7.3.1",
          details: "This field shall be one of the non-reserved values in StepModeEnum."
        },
        {
          tag: "field",
          name: "StepSize",
          xref: "cluster\xA71.6.7.3.2",
          details: "This field shall indicate the change to CurrentLevel."
        },
        {
          tag: "field",
          name: "TransitionTime",
          xref: "cluster\xA71.6.7.3.3",
          details: "This field shall indicate the time that shall be taken to perform the step, in tenths of a second. A step is a change in the CurrentLevel of StepSize units. The actual time taken SHOULD be as close to this as the device is able. If the TransitionTime field is equal to null, the device SHOULD move as fast as it is able.\nIf the device is not able to move at a variable rate, the TransitionTime field may be disregarded."
        }
      ]
    },
    { tag: "command", name: "Stop", xref: "cluster\xA71.6.7.4" },
    { tag: "command", name: "MoveToLevelWithOnOff", xref: "cluster\xA71.6.7" },
    { tag: "command", name: "MoveWithOnOff", xref: "cluster\xA71.6.7" },
    { tag: "command", name: "StepWithOnOff", xref: "cluster\xA71.6.7" },
    { tag: "command", name: "StopWithOnOff", xref: "cluster\xA71.6.7" },
    { tag: "command", name: "MoveToClosestFrequency", xref: "cluster\xA71.6.7.5" },
    {
      tag: "datatype",
      name: "OptionsBitmap",
      xref: "cluster\xA71.6.5.1",
      children: [
        {
          tag: "field",
          name: "ExecuteIfOff",
          description: "Dependency on On/Off cluster",
          xref: "cluster\xA71.6.5.1.1",
          details: "This bit indicates if this cluster has a dependency with the On/Off cluster."
        },
        {
          tag: "field",
          name: "CoupleColorTempToLevel",
          description: "Dependency on Color Control cluster",
          xref: "cluster\xA71.6.5.1.2",
          details: "This bit indicates if this cluster has a dependency with the Color Control cluster."
        }
      ]
    },
    {
      tag: "datatype",
      name: "MoveModeEnum",
      xref: "cluster\xA71.6.5.2",
      children: [
        { tag: "field", name: "Up", description: "Increase the level" },
        { tag: "field", name: "Down", description: "Decrease the level" }
      ]
    },
    {
      tag: "datatype",
      name: "StepModeEnum",
      xref: "cluster\xA71.6.5.3",
      children: [
        { tag: "field", name: "Up", description: "Step upwards" },
        { tag: "field", name: "Down", description: "Step downwards" }
      ]
    }
  ]
});
//# sourceMappingURL=level-control.resource.js.map
