How do you use "changes to any" trigger with a string list?


#1

1) Give a description of the problem
I want to be able to do a “changes to any” against the rainConditions string list but when I try to set a condition against a variable, rainConditions doesn’t show up in the list of variables

2) What is the expected behavior?
Ideally I’d like to be able to use rainConditions list in the condition or anything that would provide the same functionality.

3) What is happening/not happening?
See above

4) Post a Green Snapshot of the pistonimage


#2

I haven’t used the string list as you are using it. I just tried and it seems like the string list is just a way to create an large number of strings each with a different index and value.

Couldn’t you just the current observation variable as a trigger (if it changes). Then the piston detects a change, compare it each of those values with an OR?


#3

This seems to be from a long time ago so you may have figured this out already. If you just use a string variable (instead of string array) you can put all these in the define statement as a comma separated list. Then trigger on weather change or just check once an hour and look for contains(rainConditions, weatherObservation) is true. You can also use indexOf to get an index integer to use in another message string list or other response logic.