The behavior of a mutiple input parameter is different in the IDE simulator and the actual platform.
Examples code:
input “thermostats”, title: “Select thermostat(s) to configure”, “capability.thermostat”, required: true, multiple: true
Select only 1 thermostat
and then you deference the object in the SmartApp
def thermostat = thermostats[0]
This will throw a catastrophic error in the simulator but works fine on the actual platform. Reason being in the platform when you specify multiple:true
it ALWAYS allocates an array object. Where as in the simulator if you select one object is DOESN’T allocate an array but if you select more than one object it allocates an array.
IDE bug, @Aaron @slagle could you pass this onto the right teams