/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import { DatatypeElement as Datatype } from "../../elements/index.js";
const temperature = Datatype(
  {
    name: "temperature",
    type: "int16",
    description: "Temperature",
    isSeed: true,
    details: "This type represents a temperature on the Celsius scale with a resolution of 0.01\xB0C.\n  \u2022 value = (temperature in \xB0C) x 100\nThe range is constrained by absolute zero: -273.15\xB0C to 327.67\xB0C.\nConversion of Temperature Values for Display\nWhen converting temperature values for display manufacturers SHOULD ensure that calculations\nround to the nearest representable value. Particular care is needed when using integer arithmetic.\nSample Conversion Code\nSample code provided to ensure consistent Fahrenheit to Celsius and vice-versa conversion between devices and across vendors.\nFor degF: the value is a int8u representing 2x temperature value in Fahrenheit (to get 0.5 resolution).\nFor degC: the value is a int16s representing Celsius in\n0.01 resolution as expected by the ZCL format.",
    xref: { document: "core", section: "7.18.2.11" }
  }
);
MatterDefinition.children.push(temperature);
export {
  temperature
};
//# sourceMappingURL=temperature.js.map
