I’m trying to create a list of strings and then use that list in a condition.
What’s interesting is that if I provide the strings a value in the condition the logic works, but I can’t figure out how to create my list as a variable to be interpolated in the condition.
What I’m getting at is this works:
But this doesn’t:
In the first example the variable weatherState is still defined but unused. I’ve tried setting it to typ String, or Dynamic. In both cases I get:
An error has occurred while subscribing: groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.startsWith() is applicable for argument types: (java.lang.String) values: [@]
The workaround in this case isn’t that difficult, but is there a way to create list or array variables that I’m missing?