Base: {
    attributes: {
        currentPosition: Attribute<number, any>;
        numberOfPositions: FixedAttribute<number, any>;
    };
    extensions: readonly [{
        component: {
            attributes: {
                multiPressMax: FixedAttribute<number, any>;
            };
            events: {
                multiPressComplete: Event<TypeFromFields, any>;
                multiPressOngoing: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitchMultiPress: true;
        };
    }, {
        component: {
            events: {
                switchLatched: Event<TypeFromFields, any>;
            };
        };
        flags: {
            latchingSwitch: true;
        };
    }, {
        component: {
            events: {
                initialPress: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitch: true;
        };
    }, {
        component: {
            events: {
                longPress: Event<TypeFromFields, any>;
                longRelease: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitchLongPress: true;
        };
    }, {
        component: {
            events: {
                shortRelease: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitchRelease: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitch: false;
            momentarySwitchRelease: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitch: false;
            momentarySwitchLongPress: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitchLongPress: true;
            momentarySwitchRelease: false;
        };
    }, {
        component: false;
        flags: {
            momentarySwitch: false;
            momentarySwitchMultiPress: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitchMultiPress: true;
            momentarySwitchRelease: false;
        };
    }, {
        component: false;
        flags: {
            latchingSwitch: true;
            momentarySwitch: true;
        };
    }, {
        component: false;
        flags: {
            latchingSwitch: false;
            momentarySwitch: false;
        };
    }];
    features: {
        latchingSwitch: BitFlag;
        momentarySwitch: BitFlag;
        momentarySwitchLongPress: BitFlag;
        momentarySwitchMultiPress: BitFlag;
        momentarySwitchRelease: BitFlag;
    };
    id: 59;
    name: "Switch";
    revision: 1;
}

These elements and properties are present in all Switch clusters.

Type declaration

  • Readonlyattributes: {
        currentPosition: Attribute<number, any>;
        numberOfPositions: FixedAttribute<number, any>;
    }
    • ReadonlycurrentPosition: Attribute<number, any>

      Indicates the position of the switch. The valid range is zero to NumberOfPositions-1. CurrentPosition value 0 shall be assigned to the default position of the switch: for example the "open" state of a rocker switch, or the "idle" state of a push button switch.

      MatterSpecification.v13.Cluster § 1.13.5.2

    • ReadonlynumberOfPositions: FixedAttribute<number, any>

      Indicates the maximum number of positions the switch has. Any kind of switch has a minimum of 2 positions. Also see Multi Position Details for the case NumberOfPositions>2.

      MatterSpecification.v13.Cluster § 1.13.5.1

  • Readonlyextensions: readonly [{
        component: {
            attributes: {
                multiPressMax: FixedAttribute<number, any>;
            };
            events: {
                multiPressComplete: Event<TypeFromFields, any>;
                multiPressOngoing: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitchMultiPress: true;
        };
    }, {
        component: {
            events: {
                switchLatched: Event<TypeFromFields, any>;
            };
        };
        flags: {
            latchingSwitch: true;
        };
    }, {
        component: {
            events: {
                initialPress: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitch: true;
        };
    }, {
        component: {
            events: {
                longPress: Event<TypeFromFields, any>;
                longRelease: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitchLongPress: true;
        };
    }, {
        component: {
            events: {
                shortRelease: Event<TypeFromFields, any>;
            };
        };
        flags: {
            momentarySwitchRelease: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitch: false;
            momentarySwitchRelease: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitch: false;
            momentarySwitchLongPress: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitchLongPress: true;
            momentarySwitchRelease: false;
        };
    }, {
        component: false;
        flags: {
            momentarySwitch: false;
            momentarySwitchMultiPress: true;
        };
    }, {
        component: false;
        flags: {
            momentarySwitchMultiPress: true;
            momentarySwitchRelease: false;
        };
    }, {
        component: false;
        flags: {
            latchingSwitch: true;
            momentarySwitch: true;
        };
    }, {
        component: false;
        flags: {
            latchingSwitch: false;
            momentarySwitch: false;
        };
    }]

    This metadata controls which SwitchCluster elements matter.js activates for specific feature combinations.

  • Readonlyfeatures: {
        latchingSwitch: BitFlag;
        momentarySwitch: BitFlag;
        momentarySwitchLongPress: BitFlag;
        momentarySwitchMultiPress: BitFlag;
        momentarySwitchRelease: BitFlag;
    }
    • ReadonlylatchingSwitch: BitFlag

      LatchingSwitch

      This feature is for a switch that maintains its position after being pressed (or turned).

      MatterSpecification.v13.Cluster § 1.13.4.1

    • ReadonlymomentarySwitch: BitFlag

      MomentarySwitch

      This feature is for a switch that does not maintain its position after being pressed (or turned). After releasing, it goes back to its idle position.

      MatterSpecification.v13.Cluster § 1.13.4.2

    • ReadonlymomentarySwitchLongPress: BitFlag

      MomentarySwitchLongPress

      This feature is for a momentary switch that can distinguish and report long presses from short presses. When this feature flag MSL is present, MS and MSR shall be present as well.

      MatterSpecification.v13.Cluster § 1.13.4.4

    • ReadonlymomentarySwitchMultiPress: BitFlag

      MomentarySwitchMultiPress

      This feature is for a momentary switch that can distinguish and report double press and potentially multiple presses with more events, such as triple press, etc. When this feature flag MSM is present, MS and MSR shall be present as well.

      MatterSpecification.v13.Cluster § 1.13.4.5

    • ReadonlymomentarySwitchRelease: BitFlag

      MomentarySwitchRelease

      This feature is for a momentary switch that can distinguish and report release events. When this feature flag MSR is present, MS shall be present as well.

      MatterSpecification.v13.Cluster § 1.13.4.3

  • Readonlyid: 59
  • Readonlyname: "Switch"
  • Readonlyrevision: 1