This cluster exposes interactions with a switch device, for the purpose of using those interactions by other
devices.
Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push
button), distinguished with their feature flags.
Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both
types of switches).
An interested client may subscribe to these attributes/events and thus be informed of the interactions, and can
perform actions based on this, for example by sending commands to perform an action such as controlling a light
or a window shade.
Per the Matter specification you cannot use SwitchCluster without enabling certain feature combinations.
You must use the with factory method to obtain a working cluster.
This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags.
Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches).
An interested client may subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade.
Per the Matter specification you cannot use SwitchCluster without enabling certain feature combinations. You must use the with factory method to obtain a working cluster.
See
MatterSpecification.v13.Cluster § 1.13