/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
import { Attribute, OptionalAttribute } from "../cluster/Cluster.js";
import { TlvInt16, TlvUInt16 } from "../tlv/TlvNumber.js";
import { TlvNullable } from "../tlv/TlvNullable.js";
import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
var TemperatureMeasurement;
((TemperatureMeasurement2) => {
  TemperatureMeasurement2.ClusterInstance = MutableCluster({
    id: 1026,
    name: "TemperatureMeasurement",
    revision: 4,
    attributes: {
      /**
       * Indicates the measured temperature. The null value indicates that the temperature is unknown.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.3.4.1
       */
      measuredValue: Attribute(0, TlvNullable(TlvInt16)),
      /**
       * Indicates the minimum value of MeasuredValue that is capable of being measured. See Measured Value for
       * more details.
       *
       * The null value indicates that the value is not available.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.3.4.2
       */
      minMeasuredValue: Attribute(1, TlvNullable(TlvInt16.bound({ min: -27315 })), { default: -27315 }),
      /**
       * This attribute indicates the maximum value of MeasuredValue that is capable of being measured. See
       * Measured Value for more details.
       *
       * The null value indicates that the value is not available.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.3.4.3
       */
      maxMeasuredValue: Attribute(2, TlvNullable(TlvInt16.bound({ max: 32767 })), { default: 32767 }),
      /**
       * See Measured Value.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.3.4.4
       */
      tolerance: OptionalAttribute(3, TlvUInt16.bound({ max: 2048 }), { default: 0 })
    }
  });
  TemperatureMeasurement2.Cluster = TemperatureMeasurement2.ClusterInstance;
  TemperatureMeasurement2.Complete = TemperatureMeasurement2.Cluster;
})(TemperatureMeasurement || (TemperatureMeasurement = {}));
const TemperatureMeasurementCluster = TemperatureMeasurement.Cluster;
ClusterRegistry.register(TemperatureMeasurement.Complete);
export {
  TemperatureMeasurement,
  TemperatureMeasurementCluster
};
//# sourceMappingURL=temperature-measurement.js.map
