Way to choose input devices by commands supported

Is there a way to restrict “Input” to devices that support certain commands?

I know it can be done by capabilities…

Yes and no… when you write an app to ask a user to input a device, you restrict by capability. For example, if I want a light switch, I would ask like this:

input "theSwitches", "capability.switch", title: "Turn off which lights?", multiple: true, required: false

Then only devices that have the capability of “switch” would show up. However, ANYTHING that has that capability would show up: Outlet, bulbs, other devices with switch. There’s not a way that I’m aware of to limit it to just wall switches or just outlets if that’s what you’re looking for.

Yeah, painfully aware capabilities is available, but not commands. I solved my problem another (probably better) way, but this question popped up…

So no bites on commands yet. I’m thinking it’s not possible.

D’oh! Totally missed where you said commands. Sorry.

1 Like

Device List filtering in the input method is far too inflexible. If your SmartApp supports both Dimmers and Switches, for example, you can’t offer two distinct input selection lists. All Dimmers are usually Switches, but not the other way around, so you present the user with confusing overlap or have to sub-filter by Command inside the actual SmartApp logic.

Input method needs at least AND + OR.

I discussed Capability selection granularity here… In the middle of long post…

1 Like

Yeah, I saw that post, it gave me the good kind of headache (where smoke starts coming out of my ears).

1 Like

SmartThings has a nee “Capability Czar” - @yaimavaldivia - (though doubt that’s her title…). Maybe the concerns will get more attention…