I have a custom device. The device has an action that increments a counter, and if that exceeds a threshold it fires a custom event trigger. I give Indigo a Trigger that, when that custom event fires, resets the counter. All that works just fine:
- Code: Select all
Action Group Increment Counter
Cynical Explorer Counter 10/10
Cynical Explorer Counter threshold trigger
Trigger Counter Exceeded Threshold
Cynical Explorer Counter 0/10
Now let's change this action group so it performs the counter-incrementing action three times in a row. What could go wrong? Well...
- Code: Select all
Action Group Increment Counter Thrice
Cynical Explorer Counter 10/10
Cynical Explorer Counter threshold trigger
Trigger Counter Exceeded Threshold
Cynical Explorer Counter 11/10
Cynical Explorer Counter threshold trigger
Trigger Counter Exceeded Threshold
Cynical Explorer Counter 12/10
Cynical Explorer Counter threshold trigger
Trigger Counter Exceeded Threshold
Cynical Explorer Counter 0/10
Cynical Explorer Counter 0/10
Cynical Explorer Counter 0/10
Even though the trigger fires each time, its action does not actually run until all three action-group actions have been done. So instead of the first action triggering the reset, and the second and third not triggering the threshold, we get three resets in a row at the end, and the counter ends up at zero instead of two. In other words, trigger actions for custom event triggers don't actually take effect when they're fired, but some time later.
Is Indigo meant to behave like that?
Cheers
-- perry