I am updating some pistons that transitioned from SmartThings to Hubitat webCoRE, and I'm encountering a bit of confusion regarding the distinction between:
"is any and stays any of"
versus
"is now and stays"
I'm not entirely clear on which option is the correct one to use and why, particularly in the context of the following example scenarios:
-
If the side door light turns on and remains on for longer than 15 minutes, it should turn off automatically.
-
If the garage door contact is open and remains open for 15 minutes, a notification should be sent.
I understand how to write the piston, but I don’t understand which option is correct to ensure that the piston executes and completes the task.
execute
if
Side Door Light's switch is any and stays any of on for 15 minutes
then
with
Side Door Light
do
Turn off;
end with;
end if;
end execute;
VS
execute
if
Side Door Light's switch is now and stays on for 15 minutes
then
with
Side Door Light
do
Turn off;
end with;
end if;
end execute;
Could someone please clarify the difference and provide guidance on the appropriate usage? Thank you in advance for your help!