I have a dynamic page that I am reading the available home modes into an array (for analyzing) and then trying to use that array (and a variation of that array) in an enum input type. I am getting the home modes into the array fine, but when I launch the dynamic page in the app, I am getting “Error: There was an error, please try again”.
Initially I am wanting to read in all available home modes into an array. Once I have that working, I want to analyze that and create another array that has most, but not all of the listed home modes to produce an input with home modes, but excluding some. I think I can do this once I figure out what I am doing wrong with creating an array and enum input with the full home mode list.
log.debug “locationmodes=${locationmodes}” – does return as an array with all of the home modes:
IDE Logging shows: locationmodes=[Away, Home, Night, Vacation, Auto-Away]
I was happy to find this post because I was doing something similar and wanted an example. Unfortunately it didn’t work for me, but the code below did.
Good info to know, thanks.
I ended up using: input name: “modePhraseGroup1”, type:“mode”, title:"When mode changes to: ", required:false, multiple:true, refreshAfterSelection:false
That works if your want to select from the list of available modes. For my application I actually need the strings. Thanks.
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
8
yes “enum” option appears to be broken. ST’s done something recently.
I was using this with a device type, initially the sample code said to use type “enum” and the options were listed as
Anyone have success with getting this to work? Funny part, I have a device which I had configured 6 months ago and I knew it worked. Today it doesnt :))
@Jim can you throw some light on this? I’m getting pretty lost trying to keep my apps upto date with ST updates.
enum uses options now. But it no longer works with device apps. I get an error “No available options” when I click on the enum input in a device app (this used to work fine till some time ago, albeit it used to be metadata: values: instead of options:)
1 Like
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
13
yes but that’s not a reliable way especially with enum’s since the graph doesn’t give you the options available and typing in an incorrect options can be disastrous.
Dude, it’s not an issue of documentation, enum is just plain broken for devices right now, and has been for almost three weeks… Booleans (which used to be evaluated as strings) are now booleans as well…
1 Like
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
15
bingo! the boolean was another thing that broke all my apps, I had recode them all as well.
So really am trying to figure out how long before enum get fixed! I can’t do anything with my devices that use enum.
nor can anyone else, jump on the thread i created for this, open a ticket and link to that thread. The ticket I opened was pretty much back burnered until others started joining in and noting the same issues.
Support does triage the number of complaints regarding a specific issue to adjust the priority Q.
Just wanted to mention, I think this is almost fixed now but not quite. If you only select one item in the enum, everything is fine. However if you select more than one, ST just saves the first item even though multiple: true.
I am about ready to release my Denon AV Receiver device type. It works great, but like my Yamaha receiver you cannot select which inputs to use from the settings. This is because the “enum” option is still broken. It was partially fixed a few weeks ago, but does not allow “multiple” and “enum” at the same time.
Rather, it allows it, and the user can click through. The UI even displays the results correctly. However, on a “save”, all but the first result get discarded. Please fix this!
Hi @copyninja, I just came across this forum.
It works for me, thank you!
Now I need to do the opposite : show only the modes which have NOT been selected and for now I can’t figure this out. Any idea?