"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var device_energy_management_cluster_element_exports = {};
__export(device_energy_management_cluster_element_exports, {
  DeviceEnergyManagement: () => DeviceEnergyManagement
});
module.exports = __toCommonJS(device_energy_management_cluster_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const DeviceEnergyManagement = (0, import_elements.ClusterElement)(
  { name: "DeviceEnergyManagement", id: 152, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 4 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "PA", conformance: "O", constraint: "0", title: "PowerAdjustment" }),
    (0, import_elements.FieldElement)({
      name: "PFR",
      conformance: "[!PA].a, STA | PAU | FA | CON, O",
      constraint: "1",
      title: "PowerForecastReporting"
    }),
    (0, import_elements.FieldElement)({ name: "SFR", conformance: "[!PA].a", constraint: "2", title: "StateForecastReporting" }),
    (0, import_elements.FieldElement)({ name: "STA", conformance: "O", constraint: "3", title: "StartTimeAdjustment" }),
    (0, import_elements.FieldElement)({ name: "PAU", conformance: "O", constraint: "4", title: "Pausable" }),
    (0, import_elements.FieldElement)({ name: "FA", conformance: "O", constraint: "5", title: "ForecastAdjustment" }),
    (0, import_elements.FieldElement)({ name: "CON", conformance: "O", constraint: "6", title: "ConstraintBasedAdjustment" })
  ),
  (0, import_elements.AttributeElement)({ name: "EsaType", id: 0, type: "ESATypeEnum", access: "R V", conformance: "M", quality: "F" }),
  (0, import_elements.AttributeElement)({ name: "EsaCanGenerate", id: 1, type: "bool", access: "R V", conformance: "M", quality: "F" }),
  (0, import_elements.AttributeElement)({ name: "EsaState", id: 2, type: "ESAStateEnum", access: "R V", conformance: "M", constraint: "desc" }),
  (0, import_elements.AttributeElement)({ name: "AbsMinPower", id: 3, type: "power-mW", access: "R V", conformance: "M" }),
  (0, import_elements.AttributeElement)({ name: "AbsMaxPower", id: 4, type: "power-mW", access: "R V", conformance: "M", constraint: "min absMinPower" }),
  (0, import_elements.AttributeElement)({
    name: "PowerAdjustmentCapability",
    id: 5,
    type: "PowerAdjustCapabilityStruct",
    access: "R V",
    conformance: "PA",
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)(
    { name: "Forecast", id: 6, type: "ForecastStruct", access: "R V", conformance: "PFR | SFR", quality: "X Q" }
  ),
  (0, import_elements.AttributeElement)({
    name: "OptOutState",
    id: 7,
    type: "OptOutStateEnum",
    access: "R V",
    conformance: "PA | STA | PAU | FA | CON",
    constraint: "desc"
  }),
  (0, import_elements.EventElement)({ name: "PowerAdjustStart", id: 0, access: "V", conformance: "PA", priority: "info" }),
  (0, import_elements.EventElement)(
    { name: "PowerAdjustEnd", id: 1, access: "V", conformance: "PA", priority: "info" },
    (0, import_elements.FieldElement)({ name: "Cause", id: 0, type: "CauseEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 1, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EnergyUse", id: 2, type: "energy-mWh", conformance: "M" })
  ),
  (0, import_elements.EventElement)({ name: "Paused", id: 2, access: "V", conformance: "PAU", priority: "info" }),
  (0, import_elements.EventElement)(
    { name: "Resumed", id: 3, access: "V", conformance: "PAU", priority: "info" },
    (0, import_elements.FieldElement)({ name: "Cause", id: 0, type: "CauseEnum", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "PowerAdjustRequest",
      id: 0,
      access: "O",
      conformance: "PA",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "Power", id: 0, type: "power-mW", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 1, type: "elapsed-s", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Cause", id: 2, type: "AdjustmentCauseEnum", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)({
    name: "CancelPowerAdjustRequest",
    id: 1,
    access: "O",
    conformance: "PA",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.CommandElement)(
    {
      name: "StartTimeAdjustRequest",
      id: 2,
      access: "O",
      conformance: "STA",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "RequestedStartTime", id: 0, type: "epoch-s", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Cause", id: 1, type: "AdjustmentCauseEnum", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "PauseRequest", id: 3, access: "O", conformance: "PAU", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "Duration", id: 0, type: "elapsed-s", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Cause", id: 1, type: "AdjustmentCauseEnum", conformance: "M" })
  ),
  (0, import_elements.CommandElement)({ name: "ResumeRequest", id: 4, access: "O", conformance: "PAU", direction: "request", response: "status" }),
  (0, import_elements.CommandElement)(
    {
      name: "ModifyForecastRequest",
      id: 5,
      access: "O",
      conformance: "FA",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "ForecastId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "SlotAdjustments", id: 1, type: "list", conformance: "M", constraint: "max 10" },
      (0, import_elements.FieldElement)({ name: "entry", type: "SlotAdjustmentStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "Cause", id: 2, type: "AdjustmentCauseEnum", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "RequestConstraintBasedForecast",
      id: 6,
      access: "O",
      conformance: "CON",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)(
      { name: "Constraints", id: 0, type: "list", conformance: "M", constraint: "max 10" },
      (0, import_elements.FieldElement)({ name: "entry", type: "ConstraintsStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "Cause", id: 1, type: "AdjustmentCauseEnum", conformance: "M" })
  ),
  (0, import_elements.CommandElement)({
    name: "CancelRequest",
    id: 7,
    access: "O",
    conformance: "STA | FA | CON",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.DatatypeElement)(
    { name: "CostTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Financial", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GhgEmissions", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Comfort", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Temperature", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ESATypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Evse", id: 0, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "SpaceHeating", id: 1, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "WaterHeating", id: 2, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "SpaceCooling", id: 3, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "SpaceHeatingCooling", id: 4, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "BatteryStorage", id: 5, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "SolarPv", id: 6, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "FridgeFreezer", id: 7, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "WashingMachine", id: 8, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "Dishwasher", id: 9, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "Cooking", id: 10, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "HomeWaterPump", id: 11, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "IrrigationWaterPump", id: 12, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "PoolPump", id: 13, conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "Other", id: 255, conformance: "O" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ESAStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Offline", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Online", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Fault", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PowerAdjustActive", id: 3, conformance: "PA" }),
    (0, import_elements.FieldElement)({ name: "Paused", id: 4, conformance: "PAU" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "OptOutStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "NoOptOut", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LocalOptOut", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GridOptOut", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OptOut", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CauseEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "NormalCompletion", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Offline", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Fault", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "UserOptOut", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Cancelled", id: 4, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AdjustmentCauseEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "LocalOptimization", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GridOptimization", id: 1, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ForecastUpdateReasonEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "InternalOptimization", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LocalOptimization", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GridOptimization", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PowerAdjustReasonEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "NoAdjustment", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LocalOptimizationAdjustment", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GridOptimizationAdjustment", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CostStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "CostType", id: 0, type: "CostTypeEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Value", id: 1, type: "int32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DecimalPoints", id: 2, type: "uint8", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Currency", id: 3, type: "uint16", conformance: "O", constraint: "max 999", default: 0 })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PowerAdjustStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "MinPower", id: 0, type: "power-mW", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MaxPower", id: 1, type: "power-mW", conformance: "M", constraint: "min minPower" }),
    (0, import_elements.FieldElement)({ name: "MinDuration", id: 2, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MaxDuration", id: 3, type: "elapsed-s", conformance: "M", constraint: "min minDuration" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PowerAdjustCapabilityStruct", type: "struct" },
    (0, import_elements.FieldElement)(
      {
        name: "PowerAdjustCapability",
        id: 0,
        type: "list",
        conformance: "M",
        constraint: "max 8",
        quality: "X"
      },
      (0, import_elements.FieldElement)({ name: "entry", type: "PowerAdjustStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "Cause", id: 1, type: "PowerAdjustReasonEnum", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ForecastStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "ForecastId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ActiveSlotNumber", id: 1, type: "uint16", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "StartTime", id: 2, type: "epoch-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EndTime", id: 3, type: "epoch-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EarliestStartTime", id: 4, type: "epoch-s", conformance: "STA", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "LatestEndTime", id: 5, type: "epoch-s", conformance: "STA" }),
    (0, import_elements.FieldElement)({ name: "IsPausable", id: 6, type: "bool", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "Slots", id: 7, type: "list", conformance: "M", constraint: "max 10" },
      (0, import_elements.FieldElement)({ name: "entry", type: "SlotStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "ForecastUpdateReason", id: 8, type: "ForecastUpdateReasonEnum", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "SlotStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "MinDuration", id: 0, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MaxDuration", id: 1, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DefaultDuration", id: 2, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ElapsedSlotTime", id: 3, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RemainingSlotTime", id: 4, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "SlotIsPausable", id: 5, type: "bool", conformance: "PAU" }),
    (0, import_elements.FieldElement)({ name: "MinPauseDuration", id: 6, type: "elapsed-s", conformance: "PAU" }),
    (0, import_elements.FieldElement)({ name: "MaxPauseDuration", id: 7, type: "elapsed-s", conformance: "PAU" }),
    (0, import_elements.FieldElement)({ name: "ManufacturerEsaState", id: 8, type: "uint16", conformance: "SFR" }),
    (0, import_elements.FieldElement)({ name: "NominalPower", id: 9, type: "power-mW", conformance: "PFR" }),
    (0, import_elements.FieldElement)({ name: "MinPower", id: 10, type: "power-mW", conformance: "PFR" }),
    (0, import_elements.FieldElement)({ name: "MaxPower", id: 11, type: "power-mW", conformance: "PFR" }),
    (0, import_elements.FieldElement)({ name: "NominalEnergy", id: 12, type: "energy-mWh", conformance: "PFR" }),
    (0, import_elements.FieldElement)(
      { name: "Costs", id: 13, type: "list", conformance: "O", constraint: "max 5" },
      (0, import_elements.FieldElement)({ name: "entry", type: "CostStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "MinPowerAdjustment", id: 14, type: "power-mW", conformance: "FA & PFR" }),
    (0, import_elements.FieldElement)({ name: "MaxPowerAdjustment", id: 15, type: "power-mW", conformance: "FA & PFR" }),
    (0, import_elements.FieldElement)({ name: "MinDurationAdjustment", id: 16, type: "elapsed-s", conformance: "FA" }),
    (0, import_elements.FieldElement)({ name: "MaxDurationAdjustment", id: 17, type: "elapsed-s", conformance: "FA" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "SlotAdjustmentStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "SlotIndex", id: 0, type: "uint8", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "NominalPower", id: 1, type: "power-mW", conformance: "PFR", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 2, type: "elapsed-s", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ConstraintsStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "StartTime", id: 0, type: "epoch-s", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 1, type: "elapsed-s", conformance: "M", constraint: "max 86400" }),
    (0, import_elements.FieldElement)({ name: "NominalPower", id: 2, type: "power-mW", conformance: "PFR", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "MaximumEnergy", id: 3, type: "energy-mWh", conformance: "PFR" }),
    (0, import_elements.FieldElement)({ name: "LoadControl", id: 4, type: "int8", conformance: "SFR" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(DeviceEnergyManagement);
//# sourceMappingURL=device-energy-management-cluster.element.js.map
