How to add optional inputs


#1

I want to add 0 or more inputs. I can set multiple inputs but it requires at least one device is checked in the smartApp. Is there a way to save the smartApp settings with no sensor in the input field?

Here is how I am setting up the smartApp field input.
input “windows”, “capability.contactSensor”, title: “Window sensors”, multiple: true


#2

Never mind, I found the required property.
input “windows”, “capability.contactSensor”, title: “Window sensors”, multiple: true, required:false