How to select all input preference device by default?

Is there a way to select all input devices by default? I use the following input preference

input( name: "batteries", type: "capability.battery",  title: "Select devices", multiple: true, required: true )

it ask me to select devices myself. If there are 100 devices, I need to click 100 times :scream:

I find some SmartThings Recommends SmartApps can display the enable/disable ā€œuse all devicesā€ switches. e.g. SmartThings Recommends -> Smart Home Monitor - Security -> Security, the Armed/Away Intrusion Sensors page will show the enable/disable ā€œUse every open/close and motion sensorā€. Is it possible for my SmartApp can have the same function?

This will subscribe to every battery device, so that all battery events go to your handler.

subscribe(subscribe(location, "battery", handler)

1 Like

Thanks @bravenel (your code seems incomplete).
My SmartApp just simply display the device current state and does not use the device subscription. Is there any other way to select all input devices?

Not that I am aware of.

Not at this time, but this is a common feature request.