Capability "Actuator", whats it for? And Capability "Sensor"?

A Sensor is any device that can DETECT a change in the environment. Examples are Contact, Motion, Temperature, Acceleration, Tilt, Water, Sleep. I think even a Switch could be a Sensor, since it detects and reports when it is turned on or off physically; but I don’t know if the spec would have included it.

An Actuator is any device that can MAKE a change in the environment. Examples are Switch, Thermostat, Garage Door Opener, Valve, Music Player, Siren.

(NB: Notice that all my “examples” are actually the names of “real” Capabilities. Sensor and/or Actuator should really be a Property (“Characteristic” is the word I seemed to use in my Guidelines Document) of each Capability definition, rather than a property of each Device Type. This incorrectness is easy to explain though – simplicity of implementation for use in the input method).

Why have these categories or “base capabilities”?

It’s for the “planned” “Rules Engine” and/or for writing flexible SmartApps with fewer Input statements to bother the user with…

Consider this: Many SmartApps are in the form of:

IF trigger THEN action.

Well… Let’s alter the names of the placeholders a little bit:

IF sensor event THEN activate actuator

In practical use? Instead of having half a dozen input statements for the various sensor types (i.e., “When these doors or windows open?” + “or When motion is detected by?” + “or When any of these switches are turned on?” … THEN … “Turn on these lights?” + “and/or Turn on these Sirens” + etc., etc., etc…

In other words: Grouping Capabilities into a Category gives input the “OR” ability (Contact OR Motion or Temperature OR Switch OR Tilt OR …); just not very flexibly, since it is an all or nothing situation.

How the heck would a SmartApp deal with a Device List variable that contained Devices of heterogeneous Types? :point_right: They would have to use some or all of the these Device Class Properties to determine what specific Attributes and Commands are available: https://graph.api.smartthings.com/ide/doc/device

capabilities (List<Capability>)
supportedAttributes (List<Attribute>)
supportedCommands (List<Command>)
1 Like