Matter Driver Capability Defaults
Within the MatterDriver you will be registering a number of matter_handlers
which
handle incoming Matter interaction response from a device. Provided within the library are a number of default
implementations that follow the natural mapping of “Matter cluster interaction -> SmartThings capability event”. These
can either be manually referenced from your driver by simply requiring the correct default file, or you can have all
the defaults registered by making a call to
register_for_default_handlers(driver_template, { capabilities.switch, capabilities.switchLevel })
listing all the
capabilities you are interested in registering the default handlers for.
Each Matter defaults file will be named according to the single SmartThings capability it is providing defaults for, and will contain several key components.
Any Matter message or capability command handlers that are specific to the capability will be defined within the file. These functions will be one of the Matter handlers for messages from the device or capability handlers for capability commands. The number and types that are present are entirely dependent on the Matter to SmartThings mapping and thus will vary depending on the capability.
Various subscribed_attributes
and subscribed_events
lists are defined which will be included in the driver
template. These list out all the attribute and event cluster elements that a device will need to subscribe to in order to
properly support the capability.