This cluster provides an interface to specify preferences for how devices should consume energy.

NOTE Support for Energy Preference cluster is provisional.

Per the Matter specification you cannot use EnergyPreferenceCluster without enabling certain feature combinations. You must use the with factory method to obtain a working cluster.

MatterSpecification.v13.Cluster § 9.5

interface Cluster {
    id: ClusterId;
    name: string;
    with: (<const SelectionT>(...selection: SelectionT) => Of<Of<{
        extensions: readonly [{
            component: {
                attributes: {
                    currentEnergyBalance: WritableAttribute<number, any>;
                    energyBalances: FixedAttribute<TypeFromFields<(...)>[], any>;
                    energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
                };
            };
            flags: {
                energyBalance: true;
            };
        }, {
            component: {
                attributes: {
                    currentLowPowerModeSensitivity: WritableAttribute<number, any>;
                    lowPowerModeSensitivities: FixedAttribute<TypeFromFields<(...)>[], any>;
                };
            };
            flags: {
                lowPowerModeSensitivity: true;
            };
        }, {
            component: false;
            flags: {
                energyBalance: false;
                lowPowerModeSensitivity: false;
            };
        }];
        features: {
            energyBalance: BitFlag;
            lowPowerModeSensitivity: BitFlag;
        };
        id: 155;
        name: "EnergyPreference";
        revision: 1;
    }>, SelectionT>);
}

Hierarchy (view full)

Properties

Properties

name: string
with: (<const SelectionT>(...selection: SelectionT) => Of<Of<{
    extensions: readonly [{
        component: {
            attributes: {
                currentEnergyBalance: WritableAttribute<number, any>;
                energyBalances: FixedAttribute<TypeFromFields<(...)>[], any>;
                energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
            };
        };
        flags: {
            energyBalance: true;
        };
    }, {
        component: {
            attributes: {
                currentLowPowerModeSensitivity: WritableAttribute<number, any>;
                lowPowerModeSensitivities: FixedAttribute<TypeFromFields<(...)>[], any>;
            };
        };
        flags: {
            lowPowerModeSensitivity: true;
        };
    }, {
        component: false;
        flags: {
            energyBalance: false;
            lowPowerModeSensitivity: false;
        };
    }];
    features: {
        energyBalance: BitFlag;
        lowPowerModeSensitivity: BitFlag;
    };
    id: 155;
    name: "EnergyPreference";
    revision: 1;
}>, SelectionT>)

Type declaration

    • <const SelectionT>(...selection): Of<Of<{
          extensions: readonly [{
              component: {
                  attributes: {
                      currentEnergyBalance: WritableAttribute<number, any>;
                      energyBalances: FixedAttribute<TypeFromFields<(...)>[], any>;
                      energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
                  };
              };
              flags: {
                  energyBalance: true;
              };
          }, {
              component: {
                  attributes: {
                      currentLowPowerModeSensitivity: WritableAttribute<number, any>;
                      lowPowerModeSensitivities: FixedAttribute<TypeFromFields<(...)>[], any>;
                  };
              };
              flags: {
                  lowPowerModeSensitivity: true;
              };
          }, {
              component: false;
              flags: {
                  energyBalance: false;
                  lowPowerModeSensitivity: false;
              };
          }];
          features: {
              energyBalance: BitFlag;
              lowPowerModeSensitivity: BitFlag;
          };
          id: 155;
          name: "EnergyPreference";
          revision: 1;
      }>, SelectionT>
    • Select features using ClusterComposer.compose.

      Type Parameters

      • const SelectionT extends FeatureSelection<Of<{
            extensions: readonly [{
                component: {
                    attributes: {
                        currentEnergyBalance: WritableAttribute<number, any>;
                        energyBalances: FixedAttribute<TypeFromFields<(...)>[], any>;
                        energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
                    };
                };
                flags: {
                    energyBalance: true;
                };
            }, {
                component: {
                    attributes: {
                        currentLowPowerModeSensitivity: WritableAttribute<number, any>;
                        lowPowerModeSensitivities: FixedAttribute<TypeFromFields<(...)>[], any>;
                    };
                };
                flags: {
                    lowPowerModeSensitivity: true;
                };
            }, {
                component: false;
                flags: {
                    energyBalance: false;
                    lowPowerModeSensitivity: false;
                };
            }];
            features: {
                energyBalance: BitFlag;
                lowPowerModeSensitivity: BitFlag;
            };
            id: 155;
            name: "EnergyPreference";
            revision: 1;
        }>>

      Parameters

      Returns Of<Of<{
          extensions: readonly [{
              component: {
                  attributes: {
                      currentEnergyBalance: WritableAttribute<number, any>;
                      energyBalances: FixedAttribute<TypeFromFields<(...)>[], any>;
                      energyPriorities: FixedAttribute<EnergyPreference.EnergyPriority[], any>;
                  };
              };
              flags: {
                  energyBalance: true;
              };
          }, {
              component: {
                  attributes: {
                      currentLowPowerModeSensitivity: WritableAttribute<number, any>;
                      lowPowerModeSensitivities: FixedAttribute<TypeFromFields<(...)>[], any>;
                  };
              };
              flags: {
                  lowPowerModeSensitivity: true;
              };
          }, {
              component: false;
              flags: {
                  energyBalance: false;
                  lowPowerModeSensitivity: false;
              };
          }];
          features: {
              energyBalance: BitFlag;
              lowPowerModeSensitivity: BitFlag;
          };
          id: 155;
          name: "EnergyPreference";
          revision: 1;
      }>, SelectionT>