/**
 * @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 { TlvUInt16 } from "../tlv/TlvNumber.js";
import { TlvNullable } from "../tlv/TlvNullable.js";
import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
var RelativeHumidityMeasurement;
((RelativeHumidityMeasurement2) => {
  RelativeHumidityMeasurement2.ClusterInstance = MutableCluster({
    id: 1029,
    name: "RelativeHumidityMeasurement",
    revision: 3,
    attributes: {
      /**
       * MeasuredValue represents the water content in % as follows:
       *
       * MeasuredValue = 100 x water content
       *
       * Where 0% < = water content < = 100%, corresponding to a MeasuredValue in the range 0 to 10000. The
       * maximum resolution this format allows is 0.01%.
       *
       * MinMeasuredValue and MaxMeasuredValue define the range of the sensor.
       *
       * The null value indicates that the measurement is unknown, otherwise the range shall be as described in
       * Measured Value.
       *
       * MeasuredValue is updated continuously as new measurements are made.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.6.4.1
       */
      measuredValue: Attribute(0, TlvNullable(TlvUInt16)),
      /**
       * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue that can be measured. The
       * null value means this attribute is not defined. See Measured Value for more details.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.6.4.2
       */
      minMeasuredValue: Attribute(1, TlvNullable(TlvUInt16.bound({ max: 9999 }))),
      /**
       * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue that can be measured. The
       * null value means this attribute is not defined. See Measured Value for more details.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.6.4.3
       */
      maxMeasuredValue: Attribute(2, TlvNullable(TlvUInt16.bound({ max: 1e4 }))),
      /**
       * See Measured Value.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.6.4.4
       */
      tolerance: OptionalAttribute(3, TlvUInt16.bound({ max: 2048 }))
    }
  });
  RelativeHumidityMeasurement2.Cluster = RelativeHumidityMeasurement2.ClusterInstance;
  RelativeHumidityMeasurement2.Complete = RelativeHumidityMeasurement2.Cluster;
})(RelativeHumidityMeasurement || (RelativeHumidityMeasurement = {}));
const RelativeHumidityMeasurementCluster = RelativeHumidityMeasurement.Cluster;
ClusterRegistry.register(RelativeHumidityMeasurement.Complete);
export {
  RelativeHumidityMeasurement,
  RelativeHumidityMeasurementCluster
};
//# sourceMappingURL=relative-humidity-measurement.js.map
