Possible to have input list provided by a custom method?

Is it possible to have an input's device selection list populated by a custom method?

For example, I'm using input "sonoses", "capability.musicPlayer"...etc

But that can return non-Sonos based music players. Is it possible to have the input list populated by a custom handler? In this case so that I can filter on only Sonos devices.

I'm not aware of a way to do that. I second this as a feature request. I have had situations where I wanted to be able to filter the list. I had to resort to filtering what the user chose and putting the results in a state variable. It would have been better to not present the improper choices to the user in the first place.

You can use an input of type "device.driverName" where driver name is the name of the driver without spaces.
So for Sonos Player the type would be "device.SonosPlayer"

1 Like

Oh, cool. Thanks for the tip. User defined callbacks would be nifty, but this will do for now.