A capability comprises attributes and commands for a driver. If a driver implements a capability, it tells the system what commands and attributes it supports to allow apps a standardized method of interacting with the device. The Capability object provides a way to programmatically inspect properties.
For more information on capabilities themselves, see: Driver Capability List,
idLong: A unique id for the capability.
nameString: The name of the capability.
referenceString: The reference for a capability. ie capability.refresh for the Refresh capability. This reference is used by App inputs to select devices.
attributesList<Attribute>: A list of attributes supported by this capability.
commandsList<Command>: A list of commands supported by this capability.
versionLong: The database version of this capability.
toMapConvert the capability to a Map.
Map toMap(boolean full = false)full - Optional; defaults to false. If true, include the capability's attribute and command definitions.Map - with these keys:
id - Long: the capability id (may be null)name - String: the capability name (may be null)reference - String: the capability reference (may be null)attributes - only if full is true: a List of Maps with id (Long), dataType (String), name (String), and values (List of possible values)commands - only if full is true: a List of Maps with id (Long), name (String), and arguments (List of argument type names)