This cluster supports all OnOff features. It may support illegal feature combinations.

If you use this cluster you must manually specify which features are active and ensure the set of active features is legal per the Matter specification.

interface Complete {
    attributes: Merge<{
        acceptedCommandList: Attribute<CommandId[], never>;
        attributeList: Attribute<AttributeId[], never>;
        clusterRevision: Attribute<number, never>;
        featureMap: Attribute<TypeFromPartialBitSchema<{
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        }>, never>;
        generatedCommandList: Attribute<CommandId[], never>;
        globalSceneControl: Attribute<boolean, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        offWaitTime: WritableAttribute<number, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        onOff: Attribute<boolean, any>;
        onTime: WritableAttribute<number, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
    }, GlobalAttributes<{
        deadFrontBehavior: BitFlag;
        lighting: BitFlag;
        offOnly: BitFlag;
    }>>;
    base: undefined;
    commands: {
        off: Command<void, void, any>;
        offWithEffect: Command<TypeFromFields<{
            effectIdentifier: FieldType<OnOff.EffectIdentifier>;
            effectVariant: FieldType<number>;
        }>, void, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        on: Command<void, void, any> & {
            isConditional: true;
            mandatoryIf: [];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        onWithRecallGlobalScene: Command<void, void, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        onWithTimedOff: Command<TypeFromFields<{
            offWaitTime: FieldType<number>;
            onOffControl: FieldType<TypeFromPartialBitSchema<{
                acceptOnlyWhenOn: BitFlag;
            }>>;
            onTime: FieldType<number>;
        }>, void, any> & {
            isConditional: true;
            mandatoryIf: [] | [{
                lighting: boolean;
            }];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
        toggle: Command<void, void, any> & {
            isConditional: true;
            mandatoryIf: [];
            optional: true;
            optionalIf: [] | ConditionalFeatureList<BitSchema>;
        };
    };
    events: {};
    extensions: undefined;
    features: {
        deadFrontBehavior: BitFlag;
        lighting: BitFlag;
        offOnly: BitFlag;
    };
    id: Branded<Branded<6, "ClusterId">, "ClusterId">;
    name: "OnOff";
    revision: 6;
    supportedFeatures: {};
    unknown: false;
    alter<const AlterationsT>(alterations: AlterationsT): WithAlterations<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, AlterationsT>;
    enable<const FlagsT>(flags: FlagsT): WithFlags<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, FlagsT>;
    set<const ValuesT>(values: ValuesT): WithValues<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, ValuesT>;
    with<const SelectionT>(...selection: SelectionT): Of<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, SelectionT>;
}

Hierarchy (view full)

Properties

attributes: Merge<{
    acceptedCommandList: Attribute<CommandId[], never>;
    attributeList: Attribute<AttributeId[], never>;
    clusterRevision: Attribute<number, never>;
    featureMap: Attribute<TypeFromPartialBitSchema<{
        deadFrontBehavior: BitFlag;
        lighting: BitFlag;
        offOnly: BitFlag;
    }>, never>;
    generatedCommandList: Attribute<CommandId[], never>;
    globalSceneControl: Attribute<boolean, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    offWaitTime: WritableAttribute<number, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    onOff: Attribute<boolean, any>;
    onTime: WritableAttribute<number, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
}, GlobalAttributes<{
    deadFrontBehavior: BitFlag;
    lighting: BitFlag;
    offOnly: BitFlag;
}>>
base: undefined
commands: {
    off: Command<void, void, any>;
    offWithEffect: Command<TypeFromFields<{
        effectIdentifier: FieldType<OnOff.EffectIdentifier>;
        effectVariant: FieldType<number>;
    }>, void, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    on: Command<void, void, any> & {
        isConditional: true;
        mandatoryIf: [];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    onWithRecallGlobalScene: Command<void, void, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    onWithTimedOff: Command<TypeFromFields<{
        offWaitTime: FieldType<number>;
        onOffControl: FieldType<TypeFromPartialBitSchema<{
            acceptOnlyWhenOn: BitFlag;
        }>>;
        onTime: FieldType<number>;
    }>, void, any> & {
        isConditional: true;
        mandatoryIf: [] | [{
            lighting: boolean;
        }];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
    toggle: Command<void, void, any> & {
        isConditional: true;
        mandatoryIf: [];
        optional: true;
        optionalIf: [] | ConditionalFeatureList<BitSchema>;
    };
}
events: {}
extensions: undefined
features: {
    deadFrontBehavior: BitFlag;
    lighting: BitFlag;
    offOnly: BitFlag;
}

Type declaration

  • ReadonlydeadFrontBehavior: BitFlag

    DeadFrontBehavior

    When this feature is supported, the device exposing this server cluster exhibits "dead front" behavior when the "OnOff" attribute is FALSE (Off). This "dead front" behavior includes:

    • clusters other than this cluster that are also exposed may respond with failures to Invoke and Write interactions. Such failure responses when in a "dead front" shall be with an INVALID_IN_STATE status code.

    • clusters other than this cluster may change the values of their attributes to best-effort values, due to the actual values not being defined or available in this state. Device type specifications that require support for the DF feature SHOULD define what these best-effort values are.

    • Report Transactions shall continue to be generated. Such transactions may include best-effort values as noted above.

    • Event generation logic for clusters other than this cluster is unchanged (noting possible use of best-effort attribute values as in the preceding bullets).

    When this feature is supported and the OnOff attribute changes from TRUE to FALSE (e.g. when receiving an Off Command, or due to a manual interaction on the device), it shall start executing this "dead front" behavior.

    When this feature is supported and the OnOff attribute changes from FALSE to TRUE (e.g. when receiving an On Command, or due to a manual interaction on the device), it shall stop executing this "dead front" behavior.

    When this feature is supported, and any change of the "dead front" state leads to changes in attributes of other clusters due to the "dead front" feature, these attribute changes shall NOT be skipped or omitted from the usual processing associated with attribute changes. For example, if an

    attribute changes from value 4 to null on "dead front" behavior due to an Off command being received, this change shall be processed for reporting and subscriptions.

    MatterSpecification.v13.Cluster § 1.5.4.2

  • Readonlylighting: BitFlag

    Lighting

    This cluster is used for a lighting application.

    On receipt of a Level Control cluster command that causes the OnOff attribute to be set to FALSE, the OnTime attribute shall be set to 0.

    On receipt of a Level Control cluster command that causes the OnOff attribute to be set to TRUE, if the value of the OnTime attribute is equal to 0, the server shall set the OffWaitTime attribute to 0.

    MatterSpecification.v13.Cluster § 1.5.4.1

  • ReadonlyoffOnly: BitFlag

    OffOnly

    When this feature is supported, the Off command shall be supported and the On and Toggle commands shall NOT be supported.

    This feature is useful for devices which can be turned off via the Off command received by an instance of this cluster but cannot be turned on via commands received by an instance of this cluster due to regulatory requirements.

    MatterSpecification.v13.Cluster § 1.5.4.3

id: Branded<Branded<6, "ClusterId">, "ClusterId">
name
revision
supportedFeatures: {}
unknown

Methods

  • Modify elements using ElementModifier.alter.

    Type Parameters

    • const AlterationsT extends Alterations<Of<{
          attributes: {
              acceptedCommandList: Attribute<CommandId[], never>;
              attributeList: Attribute<AttributeId[], never>;
              clusterRevision: Attribute<number, never>;
              featureMap: Attribute<TypeFromPartialBitSchema<{
                  deadFrontBehavior: BitFlag;
                  lighting: BitFlag;
                  offOnly: BitFlag;
              }>, never>;
              generatedCommandList: Attribute<CommandId[], never>;
              globalSceneControl: Attribute<boolean, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              offWaitTime: WritableAttribute<number, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onOff: Attribute<boolean, any>;
              onTime: WritableAttribute<number, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
          };
          commands: {
              off: Command<void, void, any>;
              offWithEffect: Command<TypeFromFields<{
                  effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                  effectVariant: FieldType<number>;
              }>, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              on: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onWithRecallGlobalScene: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onWithTimedOff: Command<TypeFromFields<{
                  offWaitTime: FieldType<number>;
                  onOffControl: FieldType<TypeFromPartialBitSchema<{
                      acceptOnlyWhenOn: ...;
                  }>>;
                  onTime: FieldType<number>;
              }>, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              toggle: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
          };
          features: {
              deadFrontBehavior: BitFlag;
              lighting: BitFlag;
              offOnly: BitFlag;
          };
          id: Branded<6, "ClusterId">;
          name: "OnOff";
          revision: 6;
      }>>

    Parameters

    Returns WithAlterations<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, AlterationsT>

  • Modify elements using ElementModifier.enable.

    Type Parameters

    • const FlagsT extends ElementFlags<Of<{
          attributes: {
              acceptedCommandList: Attribute<CommandId[], never>;
              attributeList: Attribute<AttributeId[], never>;
              clusterRevision: Attribute<number, never>;
              featureMap: Attribute<TypeFromPartialBitSchema<{
                  deadFrontBehavior: BitFlag;
                  lighting: BitFlag;
                  offOnly: BitFlag;
              }>, never>;
              generatedCommandList: Attribute<CommandId[], never>;
              globalSceneControl: Attribute<boolean, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              offWaitTime: WritableAttribute<number, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onOff: Attribute<boolean, any>;
              onTime: WritableAttribute<number, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
          };
          commands: {
              off: Command<void, void, any>;
              offWithEffect: Command<TypeFromFields<{
                  effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                  effectVariant: FieldType<number>;
              }>, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              on: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onWithRecallGlobalScene: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onWithTimedOff: Command<TypeFromFields<{
                  offWaitTime: FieldType<number>;
                  onOffControl: FieldType<TypeFromPartialBitSchema<{
                      acceptOnlyWhenOn: ...;
                  }>>;
                  onTime: FieldType<number>;
              }>, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              toggle: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
          };
          features: {
              deadFrontBehavior: BitFlag;
              lighting: BitFlag;
              offOnly: BitFlag;
          };
          id: Branded<6, "ClusterId">;
          name: "OnOff";
          revision: 6;
      }>>

    Parameters

    Returns WithFlags<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, FlagsT>

  • Modify elements using ElementModifier.set.

    Type Parameters

    • const ValuesT extends {
          globalSceneControl?: boolean;
          offWaitTime?: number;
          onOff: boolean;
          onTime?: number;
          startUpOnOff?: null | number;
      }

    Parameters

    Returns WithValues<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, ValuesT>

  • Select features using ClusterComposer.compose.

    Type Parameters

    • const SelectionT extends FeatureSelection<Of<{
          attributes: {
              acceptedCommandList: Attribute<CommandId[], never>;
              attributeList: Attribute<AttributeId[], never>;
              clusterRevision: Attribute<number, never>;
              featureMap: Attribute<TypeFromPartialBitSchema<{
                  deadFrontBehavior: BitFlag;
                  lighting: BitFlag;
                  offOnly: BitFlag;
              }>, never>;
              generatedCommandList: Attribute<CommandId[], never>;
              globalSceneControl: Attribute<boolean, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              offWaitTime: WritableAttribute<number, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onOff: Attribute<boolean, any>;
              onTime: WritableAttribute<number, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
          };
          commands: {
              off: Command<void, void, any>;
              offWithEffect: Command<TypeFromFields<{
                  effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                  effectVariant: FieldType<number>;
              }>, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              on: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onWithRecallGlobalScene: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              onWithTimedOff: Command<TypeFromFields<{
                  offWaitTime: FieldType<number>;
                  onOffControl: FieldType<TypeFromPartialBitSchema<{
                      acceptOnlyWhenOn: ...;
                  }>>;
                  onTime: FieldType<number>;
              }>, void, any> & {
                  isConditional: true;
                  mandatoryIf: [] | [{
                      lighting: boolean;
                  }];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
              toggle: Command<void, void, any> & {
                  isConditional: true;
                  mandatoryIf: [];
                  optional: true;
                  optionalIf: [] | ConditionalFeatureList<BitSchema>;
              };
          };
          features: {
              deadFrontBehavior: BitFlag;
              lighting: BitFlag;
              offOnly: BitFlag;
          };
          id: Branded<6, "ClusterId">;
          name: "OnOff";
          revision: 6;
      }>>

    Parameters

    Returns Of<Of<{
        attributes: {
            acceptedCommandList: Attribute<CommandId[], never>;
            attributeList: Attribute<AttributeId[], never>;
            clusterRevision: Attribute<number, never>;
            featureMap: Attribute<TypeFromPartialBitSchema<{
                deadFrontBehavior: BitFlag;
                lighting: BitFlag;
                offOnly: BitFlag;
            }>, never>;
            generatedCommandList: Attribute<CommandId[], never>;
            globalSceneControl: Attribute<boolean, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            offWaitTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onOff: Attribute<boolean, any>;
            onTime: WritableAttribute<number, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            startUpOnOff: WritableAttribute<null | OnOff.StartUpOnOff, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        commands: {
            off: Command<void, void, any>;
            offWithEffect: Command<TypeFromFields<{
                effectIdentifier: FieldType<OnOff.EffectIdentifier>;
                effectVariant: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            on: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithRecallGlobalScene: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            onWithTimedOff: Command<TypeFromFields<{
                offWaitTime: FieldType<number>;
                onOffControl: FieldType<TypeFromPartialBitSchema<{
                    acceptOnlyWhenOn: ...;
                }>>;
                onTime: FieldType<number>;
            }>, void, any> & {
                isConditional: true;
                mandatoryIf: [] | [{
                    lighting: boolean;
                }];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
            toggle: Command<void, void, any> & {
                isConditional: true;
                mandatoryIf: [];
                optional: true;
                optionalIf: [] | ConditionalFeatureList<BitSchema>;
            };
        };
        features: {
            deadFrontBehavior: BitFlag;
            lighting: BitFlag;
            offOnly: BitFlag;
        };
        id: Branded<6, "ClusterId">;
        name: "OnOff";
        revision: 6;
    }>, SelectionT>