I would probably set the trigger up with a ‘changes and is not’ and use an arbitrary value (eg. a blank space) to effectively have the rule trigger any time the weather attribute changes.
In the flow, you could do one of the following:
- Always copy the state to a variable (using Context Variables for best performance)
- Use multiple IF conditions for each of your desired states
- Use an expression to determine which states are saved to the variable
Multiple IF conditions is probably the easiest to understand, but requires the most clicks. Expressions are probably the most concise and give you the most control, but require writing the logic you want.
For example, an expression might be:
targetStates = ["Rain", "Light Rain", "Thunderstorm", "Rain Shower", "Showers Near", "Fog", "Wintry Mix"]
isTarget = contains(targetStates, $context.event.value)
isTarget ? $context.event.value : ""
I’ve broken it down into three lines to improve readability, but it’s basically checking if your current event value is included in the list you’re looking for and if so, it outputs that value otherwise it outputs a blank string (using a ternary operator condition ? trueOp : falseOp).
Of course, you’ll want to adjust the example as you see fit, but I wanted to give you crash course since you mentioned you’re coming from webCoRE. ![]()