/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  CommandElement as Command
} from "../../elements/index.js";
const TemperatureControl = Cluster(
  { name: "TemperatureControl", id: 86, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "TN", conformance: "O.a", constraint: "0", title: "TemperatureNumber" }),
    Field({ name: "TL", conformance: "O.a", constraint: "1", title: "TemperatureLevel" }),
    Field({ name: "STEP", conformance: "[TN]", constraint: "2", title: "TemperatureStep" })
  ),
  Attribute({
    name: "TemperatureSetpoint",
    id: 0,
    type: "temperature",
    access: "R V",
    conformance: "TN",
    constraint: "minTemperature to maxTemperature"
  }),
  Attribute({
    name: "MinTemperature",
    id: 1,
    type: "temperature",
    access: "R V",
    conformance: "TN",
    constraint: "max maxTemperature - 1",
    quality: "F"
  }),
  Attribute({
    name: "MaxTemperature",
    id: 2,
    type: "temperature",
    access: "R V",
    conformance: "TN",
    constraint: "desc",
    quality: "F"
  }),
  Attribute({
    name: "Step",
    id: 3,
    type: "temperature",
    access: "R V",
    conformance: "STEP",
    constraint: "1 to maxTemperature - minTemperature",
    quality: "F"
  }),
  Attribute({
    name: "SelectedTemperatureLevel",
    id: 4,
    type: "uint8",
    access: "R V",
    conformance: "TL",
    constraint: "max 31"
  }),
  Attribute(
    {
      name: "SupportedTemperatureLevels",
      id: 5,
      type: "list",
      access: "R V",
      conformance: "TL",
      constraint: "max 32[max 16]"
    },
    Field({ name: "entry", type: "string" })
  ),
  Command(
    { name: "SetTemperature", id: 0, access: "O", conformance: "M", direction: "request", response: "status" },
    Field({ name: "TargetTemperature", id: 0, type: "temperature", conformance: "TN", constraint: "desc" }),
    Field({ name: "TargetTemperatureLevel", id: 1, type: "uint8", conformance: "TL", constraint: "desc" })
  )
);
MatterDefinition.children.push(TemperatureControl);
export {
  TemperatureControl
};
//# sourceMappingURL=temperature-control.element.js.map
