Switch¶
Attributes¶
- class st.matter.generated.zap_clusters.Switch.server.attributes.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
- 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.generated.zap_clusters.Switch.server.attributes.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 => mandatory
Sets up a Subscribe Interaction
- Parameters:
device (
any)endpoint_id (
number or nil)
- Return type:
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.generated.zap_clusters.Switch.server.attributes.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
- 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.generated.zap_clusters.Switch.server.attributes.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(data_type_obj)¶
Add additional functionality to the base type object
- Parameters:
data_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
- 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.generated.zap_clusters.Switch.server.attributes.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(data_type_obj)¶
Add additional functionality to the base type object
- Parameters:
data_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
- 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.generated.zap_clusters.Switch.server.events.SwitchLatched: st.matter.data_types.Structure¶
- 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)
- class st.matter.generated.zap_clusters.Switch.server.events.InitialPress: st.matter.data_types.Structure¶
- 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)
- class st.matter.generated.zap_clusters.Switch.server.events.LongPress: st.matter.data_types.Structure¶
- 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)
- class st.matter.generated.zap_clusters.Switch.server.events.ShortRelease: st.matter.data_types.Structure¶
- 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)
- class st.matter.generated.zap_clusters.Switch.server.events.LongRelease: st.matter.data_types.Structure¶
- 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)
- class st.matter.generated.zap_clusters.Switch.server.events.MultiPressOngoing: st.matter.data_types.Structure¶
- 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)
- class st.matter.generated.zap_clusters.Switch.server.events.MultiPressComplete: st.matter.data_types.Structure¶
- 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)
Bitmap types¶
- class st.matter.generated.zap_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
- ACTION_SWITCH: number¶
32
- 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
- is_action_switch_set()¶
- Returns:
True if the value of ACTION_SWITCH is non-zero
- Return type:
boolean
- set_action_switch()¶
Set the value of the bit in the ACTION_SWITCH field to 1
- unset_action_switch()¶
Set the value of the bits in the ACTION_SWITCH field to 0