This cluster provides an interface to a boolean state.

MatterSpecification.v13.Cluster § 1.7

interface Cluster {
    attributes: Merge<{
        stateValue: Attribute<boolean, any>;
    }, GlobalAttributes<{}>>;
    base: undefined;
    commands: {};
    events: {
        stateChange: OptionalEvent<TypeFromFields<{
            stateValue: FieldType<boolean>;
        }>, any>;
    };
    extensions: undefined;
    features: {};
    id: Branded<69, "ClusterId">;
    name: "BooleanState";
    revision: 1;
    supportedFeatures: {};
    unknown: false;
    alter<const AlterationsT>(alterations: AlterationsT): WithAlterations<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, AlterationsT>;
    enable<const FlagsT>(flags: FlagsT): WithFlags<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, FlagsT>;
    set<const ValuesT>(values: ValuesT): WithValues<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, ValuesT>;
    with<const SelectionT>(...selection: SelectionT): Of<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, SelectionT>;
}

Hierarchy (view full)

Properties

attributes: Merge<{
    stateValue: Attribute<boolean, any>;
}, GlobalAttributes<{}>>

Type declaration

  • ReadonlystateValue: Attribute<boolean, any>

    This represents a boolean state.

    The semantics of this boolean state are defined by the device type using this cluster.

    For example, in a Contact Sensor device type, FALSE=open or no contact, TRUE=closed or contact.

    MatterSpecification.v13.Cluster § 1.7.4.1

base: undefined
commands: {}
events: {
    stateChange: OptionalEvent<TypeFromFields<{
        stateValue: FieldType<boolean>;
    }>, any>;
}

Type declaration

  • ReadonlystateChange: OptionalEvent<TypeFromFields<{
        stateValue: FieldType<boolean>;
    }>, any>

    If this event is supported, it shall be generated when the StateValue attribute changes.

    MatterSpecification.v13.Cluster § 1.7.5.1

extensions: undefined
features: {}
id: Branded<69, "ClusterId">
name
revision
supportedFeatures: {}
unknown

Methods

  • Modify elements using ElementModifier.alter.

    Type Parameters

    • const AlterationsT extends Alterations<Of<{
          attributes: {
              stateValue: Attribute<boolean, any>;
          };
          events: {
              stateChange: OptionalEvent<TypeFromFields<{
                  stateValue: FieldType<boolean>;
              }>, any>;
          };
          id: 69;
          name: "BooleanState";
          revision: 1;
      }>>

    Parameters

    Returns WithAlterations<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, AlterationsT>

  • Modify elements using ElementModifier.enable.

    Type Parameters

    • const FlagsT extends ElementFlags<Of<{
          attributes: {
              stateValue: Attribute<boolean, any>;
          };
          events: {
              stateChange: OptionalEvent<TypeFromFields<{
                  stateValue: FieldType<boolean>;
              }>, any>;
          };
          id: 69;
          name: "BooleanState";
          revision: 1;
      }>>

    Parameters

    Returns WithFlags<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, FlagsT>

  • Modify elements using ElementModifier.set.

    Type Parameters

    • const ValuesT extends {
          stateValue: boolean;
      }

    Parameters

    Returns WithValues<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, ValuesT>

  • Select features using ClusterComposer.compose.

    Type Parameters

    • const SelectionT extends FeatureSelection<Of<{
          attributes: {
              stateValue: Attribute<boolean, any>;
          };
          events: {
              stateChange: OptionalEvent<TypeFromFields<{
                  stateValue: FieldType<boolean>;
              }>, any>;
          };
          id: 69;
          name: "BooleanState";
          revision: 1;
      }>>

    Parameters

    Returns Of<Of<{
        attributes: {
            stateValue: Attribute<boolean, any>;
        };
        events: {
            stateChange: OptionalEvent<TypeFromFields<{
                stateValue: FieldType<boolean>;
            }>, any>;
        };
        id: 69;
        name: "BooleanState";
        revision: 1;
    }>, SelectionT>