Switch
Attributes
- class st.matter.clusters.Switch.NumberOfPositions
- ID: number
0x0000 the ID of this attribute
- NAME: str
“NumberOfPositions” the name of this attribute
- data_type: st.matter.data_types.Uint8
the data type of this attribute
- new_value(...)
Create a Uint8 object of this attribute with any additional features provided for the attribute
This is also usable with the NumberOfPositions(…) syntax
- Parameters
vararg (
vararg
) – the values needed to construct a Uint8- Return type
- read(device, endpoint_id)
Constructs an st.matter.interaction_model.InteractionRequest to read
this attribute from a device
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Returns
containing an Interaction Request
- Return type
- subscribe(device, endpoint_id)
Reporting policy: NumberOfPositions => true => mandatory
Sets up a Subscribe Interaction
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
any
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- build_test_report_data(device, endpoint_id, value, status)
Builds an NumberOfPositions test attribute reponse for the driver integration testing framework
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –value (
any
) –status (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- class st.matter.clusters.Switch.CurrentPosition
- ID: number
0x0001 the ID of this attribute
- NAME: str
“CurrentPosition” the name of this attribute
- data_type: st.matter.data_types.Uint8
the data type of this attribute
- new_value(...)
Create a Uint8 object of this attribute with any additional features provided for the attribute
This is also usable with the CurrentPosition(…) syntax
- Parameters
vararg (
vararg
) – the values needed to construct a Uint8- Return type
- read(device, endpoint_id)
Constructs an st.matter.interaction_model.InteractionRequest to read
this attribute from a device
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Returns
containing an Interaction Request
- Return type
- subscribe(device, endpoint_id)
Reporting policy: CurrentPosition => true => suggested
Sets up a Subscribe Interaction
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
any
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- build_test_report_data(device, endpoint_id, value, status)
Builds an CurrentPosition test attribute reponse for the driver integration testing framework
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –value (
any
) –status (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- class st.matter.clusters.Switch.MultiPressMax
- ID: number
0x0002 the ID of this attribute
- NAME: str
“MultiPressMax” the name of this attribute
- data_type: st.matter.data_types.Uint8
the data type of this attribute
- new_value(...)
Create a Uint8 object of this attribute with any additional features provided for the attribute
This is also usable with the MultiPressMax(…) syntax
- Parameters
vararg (
vararg
) – the values needed to construct a Uint8- Return type
- read(device, endpoint_id)
Constructs an st.matter.interaction_model.InteractionRequest to read
this attribute from a device
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Returns
containing an Interaction Request
- Return type
- subscribe(device, endpoint_id)
Reporting policy: MultiPressMax => true => mandatory
Sets up a Subscribe Interaction
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
any
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- build_test_report_data(device, endpoint_id, value, status)
Builds an MultiPressMax test attribute reponse for the driver integration testing framework
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –value (
any
) –status (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- class st.matter.clusters.Switch.AcceptedCommandList
- ID: number
0xFFF9 the ID of this attribute
- NAME: str
“AcceptedCommandList” the name of this attribute
- data_type: st.matter.data_types.Array
the data type of this attribute
- augment_type(base_type_obj)
Add additional functionality to the base type object
- Parameters
base_type_obj (
st.matter.data_types.Array
) – the base data type object to add functionality to
- new_value(...)
Create a Array object of this attribute with any additional features provided for the attribute
This is also usable with the AcceptedCommandList(…) syntax
- Parameters
vararg (
vararg
) – the values needed to construct a Array- Return type
- read(device, endpoint_id)
Constructs an st.matter.interaction_model.InteractionRequest to read
this attribute from a device
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Returns
containing an Interaction Request
- Return type
- subscribe(device, endpoint_id)
Reporting policy: AcceptedCommandList => true => mandatory
Sets up a Subscribe Interaction
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
any
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- build_test_report_data(device, endpoint_id, value, status)
Builds an AcceptedCommandList test attribute reponse for the driver integration testing framework
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –value (
any
) –status (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- class st.matter.clusters.Switch.EventList
- ID: number
0xFFFA the ID of this attribute
- NAME: str
“EventList” the name of this attribute
- data_type: st.matter.data_types.Array
the data type of this attribute
- augment_type(base_type_obj)
Add additional functionality to the base type object
- Parameters
base_type_obj (
st.matter.data_types.Array
) – the base data type object to add functionality to
- new_value(...)
Create a Array object of this attribute with any additional features provided for the attribute
This is also usable with the EventList(…) syntax
- Parameters
vararg (
vararg
) – the values needed to construct a Array- Return type
- read(device, endpoint_id)
Constructs an st.matter.interaction_model.InteractionRequest to read
this attribute from a device
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Returns
containing an Interaction Request
- Return type
- subscribe(device, endpoint_id)
Reporting policy: EventList => true => mandatory
Sets up a Subscribe Interaction
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
any
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- build_test_report_data(device, endpoint_id, value, status)
Builds an EventList test attribute reponse for the driver integration testing framework
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –value (
any
) –status (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- class st.matter.clusters.Switch.AttributeList
- ID: number
0xFFFB the ID of this attribute
- NAME: str
“AttributeList” the name of this attribute
- data_type: st.matter.data_types.Array
the data type of this attribute
- augment_type(base_type_obj)
Add additional functionality to the base type object
- Parameters
base_type_obj (
st.matter.data_types.Array
) – the base data type object to add functionality to
- new_value(...)
Create a Array object of this attribute with any additional features provided for the attribute
This is also usable with the AttributeList(…) syntax
- Parameters
vararg (
vararg
) – the values needed to construct a Array- Return type
- read(device, endpoint_id)
Constructs an st.matter.interaction_model.InteractionRequest to read
this attribute from a device
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Returns
containing an Interaction Request
- Return type
- subscribe(device, endpoint_id)
Reporting policy: AttributeList => true => mandatory
Sets up a Subscribe Interaction
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
any
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- build_test_report_data(device, endpoint_id, value, status)
Builds an AttributeList test attribute reponse for the driver integration testing framework
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –value (
any
) –status (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
Events
- class st.matter.clusters.Switch.SwitchLatched
- ID: number
0x0000 the ID of this event
- NAME: str
“SwitchLatched” the name of this event
- new_position: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an SwitchLatched test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- class st.matter.clusters.Switch.InitialPress
- ID: number
0x0001 the ID of this event
- NAME: str
“InitialPress” the name of this event
- new_position: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an InitialPress test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- class st.matter.clusters.Switch.LongPress
- ID: number
0x0002 the ID of this event
- NAME: str
“LongPress” the name of this event
- new_position: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an LongPress test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- class st.matter.clusters.Switch.ShortRelease
- ID: number
0x0003 the ID of this event
- NAME: str
“ShortRelease” the name of this event
- previous_position: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an ShortRelease test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- class st.matter.clusters.Switch.LongRelease
- ID: number
0x0004 the ID of this event
- NAME: str
“LongRelease” the name of this event
- previous_position: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an LongRelease test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- class st.matter.clusters.Switch.MultiPressOngoing
- ID: number
0x0005 the ID of this event
- NAME: str
“MultiPressOngoing” the name of this event
- new_position: st.matter.data_types.Uint8
- current_number_of_presses_counted: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an MultiPressOngoing test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
- class st.matter.clusters.Switch.MultiPressComplete
- ID: number
0x0006 the ID of this event
- NAME: str
“MultiPressComplete” the name of this event
- previous_position: st.matter.data_types.Uint8
- total_number_of_presses_counted: st.matter.data_types.Uint8
- augment_type(base_type_obj)
Add field names to each event field
- Parameters
base_type_obj (
st.matter.data_types.Structure
) –
- read(device, endpoint_id)
Constructs a read InteractionRequest for the Event
- Parameters
device (
st.matter.Device
) –endpoint_id (
number or nil
) –
- Return type
- subscribe(device, endpoint_id)
Constructs a subscribe InteractionRequest for the Event
- Parameters
device (
any
) –endpoint_id (
number or nil
) –
- Return type
- build_test_event_report(device, endpoint_id, fields, status)
Builds an MultiPressComplete test event report reponse to be used by
the driver integration testing framework.
- Parameters
device (
st.matter.Device
) – the device to build this message forendpoint_id (
number or nil
) –fields (
table
) – containing the event fieldsstatus (
str
) – Interaction status associated with the path
- Returns
of type REPORT_DATA
- Return type
- deserialize(tlv_buf)
- Parameters
tlv_buf (
any
) –
- set_parent_cluster(cluster)
- Parameters
cluster (
any
) –
Bitmap types
- class st.matter.clusters.Switch.types.Feature
- LATCHING_SWITCH: number
1
- MOMENTARY_SWITCH: number
2
- MOMENTARY_SWITCH_RELEASE: number
4
- MOMENTARY_SWITCH_LONG_PRESS: number
8
- MOMENTARY_SWITCH_MULTI_PRESS: number
16
- is_latching_switch_set()
- Returns
True if the value of LATCHING_SWITCH is non-zero
- Return type
boolean
- set_latching_switch()
Set the value of the bit in the LATCHING_SWITCH field to 1
- unset_latching_switch()
Set the value of the bits in the LATCHING_SWITCH field to 0
- is_momentary_switch_set()
- Returns
True if the value of MOMENTARY_SWITCH is non-zero
- Return type
boolean
- set_momentary_switch()
Set the value of the bit in the MOMENTARY_SWITCH field to 1
- unset_momentary_switch()
Set the value of the bits in the MOMENTARY_SWITCH field to 0
- is_momentary_switch_release_set()
- Returns
True if the value of MOMENTARY_SWITCH_RELEASE is non-zero
- Return type
boolean
- set_momentary_switch_release()
Set the value of the bit in the MOMENTARY_SWITCH_RELEASE field to 1
- unset_momentary_switch_release()
Set the value of the bits in the MOMENTARY_SWITCH_RELEASE field to 0
- is_momentary_switch_long_press_set()
- Returns
True if the value of MOMENTARY_SWITCH_LONG_PRESS is non-zero
- Return type
boolean
- set_momentary_switch_long_press()
Set the value of the bit in the MOMENTARY_SWITCH_LONG_PRESS field to 1
- unset_momentary_switch_long_press()
Set the value of the bits in the MOMENTARY_SWITCH_LONG_PRESS field to 0
- is_momentary_switch_multi_press_set()
- Returns
True if the value of MOMENTARY_SWITCH_MULTI_PRESS is non-zero
- Return type
boolean
- set_momentary_switch_multi_press()
Set the value of the bit in the MOMENTARY_SWITCH_MULTI_PRESS field to 1
- unset_momentary_switch_multi_press()
Set the value of the bits in the MOMENTARY_SWITCH_MULTI_PRESS field to 0