EnergyBalanceComponent: {
    attributes: {
        currentEnergyBalance: WritableAttribute<number, any>;
        energyBalances: FixedAttribute<TypeFromFields<{
            label: OptionalFieldType<string>;
            step: FieldType<number>;
        }>[], any>;
        energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
    };
} = ...

A EnergyPreferenceCluster supports these elements if it supports feature EnergyBalance.

Type declaration

  • Readonlyattributes: {
        currentEnergyBalance: WritableAttribute<number, any>;
        energyBalances: FixedAttribute<TypeFromFields<{
            label: OptionalFieldType<string>;
            step: FieldType<number>;
        }>[], any>;
        energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
    }
    • ReadonlycurrentEnergyBalance: WritableAttribute<number, any>

      Indicates the current preference of the user for balancing different priorities during device use. The value of this attribute is the index, 0-based, into the EnergyBalances attribute for the currently selected balance.

      If an attempt is made to set this attribute to an index outside the maximum index for EnergyBalances, a response with the status code CONSTRAINT_ERROR shall be returned.

      If the value of EnergyBalances changes after an update, the device shall migrate the value of the CurrentEnergyBalance attribute to the index which the manufacturer specifies most closely matches the previous value, while preserving extreme preferences as follows:

      1. If the previous value of CurrentEnergyBalance was zero, indicating a total preference for the priority specified by the first element in EnergyPriorities, the new value of CurrentEnergyBalance shall also be zero.

      2. If the previous value of CurrentEnergyBalance was the index of the last BalanceStruct in the previous value of EnergyBalances, indicating a total preference for the priority specified by the last element in EnergyPriorities, the new value of CurrentEnergyBalance shall be the index of the last element in the updated value of EnergyBalances.

      MatterSpecification.v13.Cluster § 9.5.6.2

    • ReadonlyenergyBalances: FixedAttribute<TypeFromFields<{
          label: OptionalFieldType<string>;
          step: FieldType<number>;
      }>[], any>

      Indicates a list of BalanceStructs, each representing a step along a linear scale

      of relative priorities. A Step field with a value of zero shall indicate that the device SHOULD entirely favor the priority specified by the first element in EnergyPriorities; whereas a Step field with a value of 100 shall indicate that the device SHOULD entirely favor the priority specified by the second element in EnergyPriorities. The midpoint value of 50 shall indicate an even split between the two priorities.

      This shall contain at least two BalanceStructs.

      Each BalanceStruct shall have a Step field larger than the Step field on the previous BalanceStruct in the list.

      The first BalanceStruct shall have a Step value of zero, and the last BalanceStruct shall have a Step value of 100.

      MatterSpecification.v13.Cluster § 9.5.6.1

    • ReadonlyenergyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>

      Indicates two extremes for interpreting the values in the EnergyBalances attribute. These two priorities shall be in opposition to each other; e.g. Comfort vs. Efficiency or Speed vs. WaterConsumption.

      If the value of EnergyPriorities changes after an update to represent a new balance between priorities, the value of the CurrentEnergyBalance attribute shall be set to its default.

      MatterSpecification.v13.Cluster § 9.5.6.3