Hi. I am having a problem trying to use the Routines example code at http://docs.smartthings.com/en/latest/smartapp-developers-guide/routines.html .
I get a valid list of Routines or phrases:
def actions = location.helloHome?.getPhrases()*.label
But there appears to be something wrong with:
input “onAction”, “enum”, title: “Action to execute when turned on”, options: actions, required: true
input “offAction”, “enum”, title: “Action to execute when turned off”, options: actions, required: true
I can see from:
log.debug "Installed with settings: ${settings}"
that if the first phrase in the list is selected for onAction or offAction, then the value is set correctly, but if any other value is selected, then instead of getting the phrase name, I get the possition number
So if I have a list of phrase thus:
Aaaa
Bbbb
Cccc
and I select Aaaa, I get Aaaaa
but if I select Bbbb I get 1
and if I select Cccc I get 2
Is this a bug in the code, in enum, in the Simulator, or am I doing something stupid?
Any help appreciated. I’m a total newby to this. Only programming experience is Bourne Shell, oh and some LISP about 25 years ago!.
Thanks for reading,
Cheth.