I believe I've found a bug in the Wait for Condition and Wait for Event actions.
I have a rule with both a wait for condition and wait for event. Each has a timeout option. When I set the timeout to a hard coded number, the rule works as expected. When I set it to a local variable, it takes the value, and shows it correctly, but the rule errors out.
This is the rule (with hard coded numbers) which works as expected. I apologize it is longer than necessary, but I've highlighted the areas of interest:
IF I change them to the local variable, called "arm delay",
it appears to be accepted, but I get the following error (on either the wait for event, or wait for condition, depending on which I change):
I originally had it as a number... but then I was thinking that the seconds in a delay allowed decimals, so I switched it to a decimal. I don't need the decimal at all, just that was my last iteration.
I want to say yes, but who knows if I did something wrong (possibly with all my changes I've made I should just create the rule).
But I'll give it a shot now, creating a new variable, that has a new name, that is number only.
I would suggest just doing a simple test rule to see if it works with number instead of decimal. The error you post earlier was specifically about number formatting so that's what let me to the variable being defined incorrectly. I don't think a delay in seconds can be a decimal.
Strange...when I set the delay to a decimal directly it works correctly. But when I set a decimal variable into a delay, then I get an error like you did. So, it does appear to be a variable vs. actual number difference. Don't know if decimals are supported or not but the UI takes them if directly entered.
Update: Just to try, I did use a decimal variable with an actual decimal and that errors as well.. But when the same value is entered directly into the delay it works without error.
I saw that too, which is why I switched to a decimal when it was originally a number. But I also found it interesting the log only said "arm" and not the full variable name. In this test, I'm also leaving out the spaces.
I'm not sure about with a variable, but I've used it before when hard coded.
Wait a second....do you have two waits in a row? Also, do you have a conditional wait? I didn't think we could do that with a simplified condition. Maybe try making that a normal conditional action and see what happens. You might also try putting a delay between the waits just to give it a breath. I see what you're trying to do though...allow yourself to exit before locking the lock. Can I ask why you just aren't using the exit delay in HSM? If you had an arming delay in HSM you could just trigger the locking off the status of Armed Away. It reads Delayed Arming Away until the delay is complete. Would be a lot simpler.
You could just wait for HSM status Armed Away and then lock the lock.
Hey Ryan, my recreating HSM is a little off topic (but not that much)... so I sent you a PM to discuss. Just didn't want you to think I was ignoring your comment!
Regarding the error, I'm fairly convinced it has to do simply with the local variable, not the rule actions themselves, as they appear to work OK when I switch to hard coded numbers.
Specifically about the conditional wait. If you put that out into a normal conditional action rather than a simplified one, that might be different. I've never seen a wait used in a simplified conditional action. Not saying it shouldn't work but just might be the problem, that's all.
This is a bug, and it's been identified and fixed. Fix will be in the next release.
As to the topic of Number vs Decimal variable used in a delay, and as to number vs decimal directly entered into a delay:
The seconds field accepts a number, or a decimal, or a %xyz% type of entry (i.e., a variable, or %value%, etc.). When a variable, it can be of type Number or Decimal. All of the delays accept a decimal number for seconds so that milliseconds of precision is available. When a variable is used in the seconds field, the hours and minutes field should be empty. In other words, a variable delay is allowed, and it must be expressed in seconds (with optional decimal fraction).