TL;DR: Delay per mode functions as an "exit rule" if no non-zero delay listed for current mode.
Expected
Delay per mode:
Day: 0:02:00
Evening: 0:02:00
Should be logically equivalent to
If mode is Day:
Delay 0:02:00
Else if mode is Evening:
Delay 0:02:00
End if
Actual
Instead, it logically behaves like
If mode is Day:
Delay 0:02:00
Else if mode is Evening:
Delay 0:02:00
Else:
Exit rule
End if
Why this is unexpected
- The action is doing something extra that's not implied by its name.
- It's inconsistent with other "per mode" actions, like setting dimmers per mode, which is intuitively treated as a no-op if no value is specified for the current mode.
- Explicitly setting the delay for a mode to 0 is treated as legal input when configuring the delay per mode action, but doing so removes the mode from the action altogether, causing it to exit the rule instead of setting a delay duration of 0.
Example
When I run these actions on v2.2.3.145 while in mode Day, the variable is 10 after it completes instead of 20:
Even though I listed the current mode Day in the action with duration 0. (I would still expect the var to be set to 20 without delay even if I hadn't listed the Day mode at all.)